Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
ppwarwick edited this page Aug 1, 2017 · 37 revisions

skyinfoblox - Go library for the Infoblox appliance

Skyinfoblox is the GoLang API wrapper for Infoblox. The wrapper uses the REST API interface provided by Infoblox. Skyinfoblox currently supports v2.3.1 of the Infoblox API. There is also command line interface which can be built by running make in the root of this repo.

The Infoblox API documentation may be accessed by appending /wapidoc/ to the Infoblox server URL. E.g https://example-infoblox.example.com/wapidoc/

Using the CLI

Building the CLI

The CLI may be built by running make in the root of the repo. Make will build the skyinfoblox binary.

$ make

Shell environment variables for the CLI

The Infoblox server credentials may either be passed as options to skyinfoblox on the command line or by setting environment variables.

Passing credentials as options

./skyinfoblox -username example-user -password examplePassword -server https://example-infoblox.example.com ....

Setting credentials through environment variables

$ export IBX_USERNAME="example-user"
$ export IBX_PASSWORD="examplePassword"
$ export IBX_SERVER="https://example-infoblox.example.com"

CLI help

General help

$ ./skyinfoblox-cli -h

Help for a sub-command. E.g. zone-create

$ ./skyinfoblox-cli sub-command -h

CLI options

The CLI has sub-commands for each Infoblox object type. Please see the links under Infoblox Objects for specific examples.

Using the library

Import

import(
    "github.com/sky-uk/skyinfoblox"
)

Get a client object

client := skyinfoblox.NewInfobloxClient(
        infobloxServer, // e.g. https://example-infoblox.example.com
        infobloxUsername,
        infobloxPassword,
        allowUnverifiedSSL, // ignore certificate errors (boolean)
        debug, // enable debugging (boolean)
    )

    // for a simple http client...
    client := skyinfoblox.NewInfobloxClient(infobloxServer, infobloxUsername, infobloxPassword, true, true)

Infoblox Objects

The following Infoblox Objects may be managed through these bindings:

Run Unit tests

$ make test
Clone this wiki locally