Skip to content
A pure jvm client library for interacting with Infoblox API.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.mvn/wrapper
docs
src Fixed connection failure due to `unexpected end of stream`. Dec 20, 2018
.gitignore
.looper.yml
CHANGELOG.md
LICENSE
README.md
mvnw
mvnw.cmd
pom.xml

README.md

Infoblox Infoblox Java Client

Build Status changelog javadoc

A pure java API for Infoblox DNS appliance.

Download

Download the latest JAR or grab via Maven:

<dependency>
   <groupId>com.oneops</groupId>
   <artifactId>infoblox-java</artifactId>
   <version>1.3.5</version>
</dependency>

To see all versions, go here

Examples

Initializing Infoblox Client

InfobloxClient client = InfobloxClient.builder()
            .endPoint("Infoblox Host")
            .userName("Infoblox User")
            .password("Infoblox Password")
            .ttl(60)
            .tlsVerify(false)
            .build();

Default WAPI version is v2.5

Walmart Infoblox Provider

A new InfobloxClientProvider class has been provided to create InfobloxClient transparently based on the FQDN. This will be make use of a /secrets/infoblox-conf.json config file to get all the infoblox endpoint configurations. To get a client (cached) for supported domain,

String fqdn = "test.us.walmart.net";
String ip = "10.11.12.13";

InfobloxClient client = InfobloxClientProvider.forDomain(fqdn);
ARec aRec = client.createARec(fqdn, ip);

TLS config

A Record

String fqdn = "test.xyz.com";
String ip = "10.11.12.13";

// CRUD operations
ARec aRec = client.createARec(fqdn, ip);
List<ARec> rec = client.getARec(fqdn);
List<ARec> aRecs = client.getARec(fqdn, ip);
List<ARec> modifedARec = client.modifyARec(fqdn, newFqdn);
List<String> delARec = client.deleteARec(fqdn);

AAAA Record

String fqdn = "test.xyz.com";
String ipv6 = "fe80:0:0:0:f0ea:f6ff:fd97:5d51";

// CRUD operations
AAAA newAAAARec = client.createAAAARec(fqdn, ipv6);
List<AAAA> aaaaRec = client.getAAAARec(fqdn);
List<AAAA> modAAAARec = client.modifyAAAARec(fqdn, newFqdn);
List<String> delAAAARec = client.deleteAAAARec(fqdn);

CNAME Record

String canonicalName = "test.xyz.com";
String alias = "app.xyz.com";

// CRUD operations
CNAME cname = client.createCNameRec(alias, canonicalName);
List<CNAME> rec = client.getCNameRec(alias);
List<CNAME> modCName = client.modifyCNameRec(alias, newAlias);
List<String> delCName = client.deleteCNameRec(alias);

Refer JavaDocs for all record types (MX, PTR, SRV, TXT, NS, Zone etc) APIs

Building

For doing the release build, go to build job and click Release Build

Testing

Set the following env variables and run ./mvnw clean test to execute the unit tests.

$ ssh -v user@any-prod-server -L 8888:infoblox-api.walmart.com:443
$ export iba_host=localhost:8888
  export iba_user=<Infoblox Username>
  export iba_password=<Infoblox Password>
  export iba_domain=prod.walmart.com

Note: infoblox-api.walmart.com may not be directly accessible from your test machine. As a workaround use SSH tunneling ssh -v user@any-prod-server -L 8888:infoblox-api.walmart.com:443 and use localhost as iba_host.

Dependencies

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.