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

Build 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.

CLI options

CLI help

Infoblox Objects

The following Infoblox Objects may be managed through these bindings:

Environment variables

These environment variables need to be configured in order to test and use the Infoblox binding API:

Environment Variable Description
INFOBLOX_SERVER Infoblox appliance server to connect to, including the proper http protocol
INFOBLOX_USERNAME The user used to authenticate
INFOBLOX_PASSWORD The user passoword
INFOBLOX_ALLOW_UNVERIFIED_SSL If server certificate should not be verified (defaults to "true")
INFOBLOX_CLIENT_DEBUG Enable/disable debugging logs (defaults to "false")

Building the cli binary

make all

Run Unit tests

make test

Using the Command Line Interface

The cli skyinfoblox-cli can be used to interact with InfoBlox API.

$ ./skyinfoblox-cli
  -debug
    	Debug output. Default:false
  -password string
    	Authentication password (Env: IBX_PASSWORD)
  -port int
    	Infoblox API server port. Default:443 (default 443)
  -server string
    	Infoblox API server hostname or address (default "localhost")
  -username string
    	Authentication username (Env: IBX_USERNAME)
  Commands:
      zone-show
      zone-show-all
      zone-update
      record-show
      records-show-all
      zone-create
      zone-delete
      network-show
      network-delete
      network-create
      range-show
      range-create
      range-delete

./skyinfoblox-cli -server=https://serverhostnameOrIP  -username=admin -password=password records-list -a

Development

During your development, you can run the cli with following command.

go run cli/*.go -server=https://infobloxserver.com  -username=admin -password=pass records-list

Clone this wiki locally