Git Product home page Git Product logo

infoblox-java's Introduction

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.

infoblox-java's People

Contributors

bannama avatar sureshg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.