Infoblox API Documentation

NIOS 5.1

Copyright Statements
© 2010, Infoblox Inc.— All rights reserved. The contents of this document may not be copied or duplicated in any form, in whole or in part, without the prior written permission of Infoblox, Inc. The information in this document is subject to change without notice. Infoblox, Inc. shall not be liable for any damages resulting from technical errors or omissions which may be present in this document, or from use of this document. This document is an unpublished work protected by the United States copyright laws and is proprietary to Infoblox, Inc. Disclosure, copying, reproduction, merger, translation, modification, enhancement, or use of this document by anyone other than authorized employees, authorized users, or licensees of Infoblox, Inc. without the prior written consent of Infoblox, Inc. is prohibited. For Open Source Copyright information, refer to the Infoblox NIOS Administrator Guide.

Trademark Statements
Infoblox, the Infoblox logo, Grid, NIOS, bloxTools, NetMRI and PortIQ are trademarks or registered trademarks of Infoblox Inc. All other trademarked names used herein are the properties of their respective owners and are used for identification purposes only.

Company Information
Infoblox is located at: 4750 Patrick Henry Drive Santa Clara, CA 95054-1851, USA Web: www.infoblox.com

www.support.infoblox.com
Phone: 408.625.4200 Toll Free: 888.463.6259 Outside North America: +1.408.716.4300 Fax: 408.625.4201

Product Information
Hardware Models: Infoblox-250, -250-A, -500, -550, -550-A, -1000, -1200, -1050, -1050-A, -1550, -1550-A, -1552, -1552-A, -1852-A, -2000, and -2000-A. Document Number: 400-0257-003, Rev. A Document Updated: February 25, 2011

Warranty Information
Your purchase includes a 90-day software warranty and a one year limited warranty on the Infoblox appliance, plus an Infoblox Warranty Support Plan and Technical Support. For more information about Infoblox Warranty information, refer to the Infoblox Web site, or contact Infoblox Technical Support.

Preface
The API documentation explains how to install Infoblox DMAPI packages. It also describes in detail the objects and methods for writing and running scripts. This preface includes the following topics: • • •

Document Overview on page 4 Related Documentation on page 4 Customer Care on page 5 — User Accounts on page 5 — Software Upgrades on page 5 — Technical Support on page 5

NIOS 5.1r4

Infoblox API Documentation (Rev. A)

3

Preface

Document Overview
Infoblox DMAPI packages and objects are thoroughly documented. You can access the documentation through the Infoblox GUI or directly from a browser in either a Windows or UNIX/Linux environment. Note that when you use a UNIX/Linux environment, you cannot open the API documentation through the Infoblox GUI. You can, however, open the documentation from a browser. Use one of the following to access the API documentation: • • From Grid Manager, select the Help panel, and then click Documentation -> API Documentation In your browser window, type https://<IP address of device>/api/doc/

Related Documentation
Other Infoblox appliance documentation:

Infoblox NIOS Administrator Guide • Infoblox IBOS Administrator Guide • Infoblox API Documentation • Infoblox-500, Infoblox-1000 and Infoblox-1200 Quick Start • Infoblox User Guide for the Infoblox-1050, 1550, and 1552 Appliances • Infoblox User Guide for the Infoblox-500, 550 Appliance • Infoblox Installation Guide for the Infoblox-550, -1050, -1550, and -1552 Appliances • Infoblox Installation Guide for the Infoblox-550-A, -1050-A, -1550-A, and -1552-A Appliances • Infoblox Installation Guide for the Infoblox-1852-A Appliance • Infoblox Installation Guide for the Infoblox-250 Appliance • Infoblox Installation Guide for the Infoblox-250-A Appliance • Infoblox Installation Guide for the Infoblox-2000 Appliance • Infoblox Installation Guide for the Infoblox-2000-A Appliance • Quick Start Guide for Installing vNIOS Software on Riverbed Services Platforms • Quick Start Guide for Installing vNIOS Software on Cisco Application eXtension Platforms • Quick Start Guide for Installing vNIOS Software on VMware Platforms • Quick Start Guide for Installing vIBOS Software on VMware Platforms • Infoblox Safety Guide To provide feedback on any of the Infoblox technical documents, please e-mail techpubs@infoblox.com.

4

Infoblox API Documentation (Rev. A)

NIOS 5.1r4

Customer Care

Customer Care
This section addresses user accounts, software upgrades, licenses and warranties, and technical support.

User Accounts
The Infoblox appliance ships with a default user name and password. Change the default admin account password immediately after the system is installed to safeguard its use. Make sure that the NIOS appliance has at least one administrator account with superuser privileges at all times, and keep a record of your account information in a safe place. If you lose the admin account password, and did not already create another superuser account, the system will need to be reset to factory defaults, causing you to lose all existing data on the NIOS appliance. You can create new administrator accounts, with or without superuser privileges. For more information, refer to the Infoblox Administrator Guide.

Software Upgrades
Software upgrades are available according to the Terms of Sale for your system. Infoblox notifies you when an upgrade is available. Register immediately with Infoblox Technical Support at http://www.infoblox.com/en/support/product-registration.html to maximize your Technical Support.

Technical Support
Infoblox Technical Support provides assistance via the Web, e-mail, and telephone. The Infoblox Support web site at http://www.infoblox.com/en/support/support-center-login.html provides access to product documentation and release notes, but requires the user ID and password you receive when you register your product online at: http://www.infoblox.com/en/support/product-registration.html.

NIOS 5.1r4

Infoblox API Documentation (Rev. A)

5

Preface

6

Infoblox API Documentation (Rev. A)

NIOS 5.1r4

Infoblox API Documentation

Infoblox - API Installation and Usage Instructions
NAME VERSION Infoblox API Installation Instructions Windows Management System Requirements for Windows Management Systems 1. Install Crypt::SSLeay and libwww-perl. 2. PPM 3.x: Add the Infoblox device as a repository. 3. PPM 3.x: Search the Infoblox device for Infoblox packages. 4. PPM 3.x: Install Infoblox packages on your management system. 5. PPM 4.0: Fetch and install Infoblox packages. Unix Management System Requirements for Unix Management Systems DIRECT INSTALLATION CPAN INSTALLATION First Time CPAN Installation 1. Install Crypt::SSLeay and CPAN::Site on your management system. 2. Run CPAN::Site, instead of CPAN. 3. Add the Infoblox device URL to the top of the CPAN URL list. 4. (Optional) Reduce the number of CPAN fetch methods. 5. Reload the CPAN::Site index. 6. Install the Infoblox package on your management system. Infoblox API Usage Guidelines UTF8 Considerations search() Considerations Available Infoblox API Objects

NAME
Infoblox - API Installation and Usage Instructions

VERSION
5.1r4-0-116238

Infoblox API Installation Instructions
Infoblox provides a Perl API (application programming interface) to help facilitate the integration of the Infoblox device into network environments. The Infoblox DMAPI (Data and Management API) is a set of packages delivered with the Infoblox device to install the package. Use the usual Perl module installation tools on your management system to install the package. For Windows systems using the ActiveState build of Perl, the package is called PPM ("Perl Package Manager" or "Programmer's Package Manager"). For UNIX systems, the package is called CPAN, a global archive of Perl resources. Windows Management System Unix Management System

Windows Management System
To install the Infoblox DMAPI packages on a Windows management system, download and install PPM (from http://www.activestate.com/). Then do the following: 1. Install Crypt::SSLeay and libwww-perl. 2. PPM 3.x: Add the Infoblox device as a repository. 3. PPM 3.x: Search the Infoblox device for Infoblox packages. 4. PPM 3.x: Install Infoblox packages on your management system. 5. PPM 4.0: Fetch and install Infoblox packages.

Requirements for Windows Management Systems
- Perl 5.8.8 or later - For Windows management systems: the ActiveState version of Perl 5.8.8 or later with PPM 3.x or later

NIOS 5.1r4

Page 7 (Rev. A)

Infoblox API Documentation

- Crypt::SSLeay version 0.51 or later (and its dependencies: ssleay32.dll and libeay32.dll) - LWP::UserAgent version 5.813 or later - XML::Parser

1. Install Crypt::SSLeay and libwww-perl.
1.0 Check your Perl version. The Crypt::SSLeay package is Perl version sensitive. Perl version 5.8.x requires different packages than 5.10.x. To check the Perl version installed, enter the command: perl -v. If Perl 5.8.x is installed, the command will return the following:

C:###BOT_TEXT###gt;perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread...
If Perl 5.10.x is installed, the command will return the following:

C:###BOT_TEXT###gt;perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread...
1.1 Install Crypt-SSLeay. The Crypt::SSLeay package allows you to make an HTTPS connection to the Infoblox device. Crypt::SSLeay is not part of the core Perl distribution. To check if it is installed, enter the command: ppm query Crypt-SSLeay. If the Crypt-SSLeay package is already installed, the query returns the following result:

C:###BOT_TEXT###gt;ppm query Crypt-SSLeay Querying target 1 (ActivePerl 5.8.8.817) 1. Crypt-SSLeay [0.51] OpenSSL glue that provides LWP https
If the Crypt::SSLeay package is not installed, the query returns the following:

C:###BOT_TEXT###gt;ppm query Crypt-SSLeay Querying target 1 (ActivePerl 5.8.8.817) No matches for 'Crypt-SSLeay; see 'help query'.
To install Crypt::SSLeay (and its dependencies ssleay32.dll and libeay32.dll), use the following PPM command: If the Perl version is 5.8.x:

C:###BOT_TEXT###gt; ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
If the Perl version is 5.10.x:

C:###BOT_TEXT###gt; ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/Crypt-SSLeay.ppd
1.2 Install libwww-perl. If you need to update LWP::UserAgent, then you will have to install the latest libwww-perl package. If the PPM version is 3.x, you will first need to add a PPM repository:

C:###BOT_TEXT###gt; ppm repo add bribes http://www.bribes.org/perl/ppm
To install libwww-perl:

C:###BOT_TEXT###gt; ppm install libwww-perl -force 2. PPM 3.x: Add the Infoblox device as a repository.
The following steps add the Infoblox device as a repository in your PPM 3.x configuration, included with Active Perl from version 5.8.0.802 to 5.8.8.817. (For PPM 4.0, included with ActivePerl 5.8.8.818 and later, see "5. PPM 4.0: Fetch and install Infoblox packages.") 2.1 Add a PPM repository to the configuration by issuing the ppm repository command; * For <repo_name>, type a meaningful name for the repository, such as 'Infoblox-device'. * For <ip_addr>, type the IP address that you use for managing the Infoblox device or a resolvable domain name (for a grid, use the address or domain name of the grid master).

C:###BOT_TEXT###gt; ppm repo add <repo_name> https://<ip_addr>/api/dist/ppm Repositories: [1] <repo_name> [2] ActiveState Package Repository
(Note that the packages are connected via HTTPS, not HTTP. You only need to add the repository once.)

NIOS 5.1r4

Page 8 (Rev. A)

Infoblox API Documentation

2.2 To ensure that you have the correct URL, open a Web browser and visit the URL you specified for the repository. If the URL is correct, you can see a directory listing.

3. PPM 3.x: Search the Infoblox device for Infoblox packages.
Start PPM from a command shell:

C:###BOT_TEXT###gt; ppm PPM - Programmer's Package Manager version 3.4. Copyright (c) 2001 ActiveState Software Inc. All Rights Reserved. Entering interactive shell. Using Term::ReadLine::Perl as readline library. Type 'help' to get started. ppm> Use PPM to find the Infoblox package: ppm> search Infoblox Searching in Active Repositories 1. Infoblox [4.9999990014709] Infoblox Data and Management API 4.x 4. PPM 3.x: Install Infoblox packages on your management system.
Install the Infoblox package with PPM:

ppm> install Infoblox ==================== Install 'Infoblox' version 4.9999990014709 in ActivePerl 5.8.8.817. ==================== Downloaded 167481 bytes. ... Successfully installed Infoblox version 4.9999990014709 in ActivePerl 5.8.8.817. 5. PPM 4.0: Fetch and install Infoblox packages.
There is a bug in PPM version 4.0 which is included in ActivePerl 5.8.8.818 and 5.8.8.819 which prevents PPM 4.0 from accessing a module archive with https. This bug, and ActiveState's workaround is described at: http://bugs.activestate.com/show_bug.cgi?id=52508 If you have ActivePerl 5.8.8.818 or 5.8.8.819 (use perl -v at a command line to see), either upgrade to ActivePerl 5.8.8.820 or use the workaround described in the bug: http://bugs.activestate.com/show_bug.cgi?id=52508 You can also work around the bug by following the steps in section 5.3. If you have ActivePerl 5.8.8.820 installed, skip the patch step in 5.1 and immediately install the package by following the steps in section 5.2. 5.1 PPM 4.0: Patch lib/ActivePerl/PPM/limited_inc.pm If you have ActivePerl 5.8.8.818 or 5.8.8.819, please patch your PPM installation so PPM will be able to find modules stored in repositories accessed by https. As shown in http://bugs.activestate.com/show_bug.cgi?id=52508 apply this patch one time to your ActiveState PPM installation for each win32 client:

Index: lib/ActivePerl/PPM/limited_inc.pm --- lib/ActivePerl/PPM/limited_inc.pm.~1~ Tue Nov 28 16:01:09 2006 +++ lib/ActivePerl/PPM/limited_inc.pm Tue Nov 28 16:01:09 2006 @@ -9,7 +9,7 @@ (my $dir = __FILE__) =~ s,/ActivePerl/PPM/.*,,; Make a new directory, naming it something like "ibpack", and then change the command prompt to that directory. if (grep $_ eq $dir, @INC) { - shift(@INC) while $INC[0] ne $dir; + push(@INC, shift(@INC)) while $INC[0] ne $dir; } 1;
To find the full path to this file on your system, use perl -V at the command line. The contents of @INC are at the end of the output. The limited_inc.pm file is in the lib directory, not in the site/lib directory. If you are unfamiliar with diffs, the + and - notation just means to replace the line:

NIOS 5.1r4

Page 9 (Rev. A)

Infoblox API Documentation

shift(@INC) while $INC[0] ne $dir;
line with the

push(@INC, shift(@INC)) while $INC[0] ne $dir;
When complete, the lines of the patched limited_inc.pm should look like:

if (grep $_ eq $dir, @INC) { # patch from http://bugs.activestate.com/show_bug.cgi?id=52508 # shift(@INC) while $INC[0] ne $dir; push(@INC, shift(@INC)) while $INC[0] ne $dir; }
Continue on to step 5.2 5.2 PPM 4.0: Install the Infoblox modules Enter the following command, substituting the IP address or resolvable hostname of the Infoblox device for <ip_addr>: C:\tmp>ppm install https://<ip_addr>/api/dist/ppm/Infoblox.ppd or you can use the GUI version of PPM by running the GUI, searching for the Infoblox module and installing it in the usual way. 5.3 PPM 4.0 Alternate Work Around to Install Make a new directory and name the directory, for example, "ibpack". Then change the command prompt to that directory. Make a new directory, naming it something like "ibpack", and then change the command prompt to that directory.

C:###BOT_TEXT###gt; md ibpack C:###BOT_TEXT###gt; cd ibpack C:\ibpack>
Next, transfer the files that contain the module distribution from the Infoblox device to your management system using 'lwp-request'. You must transfer two files: a description file, and the main distribution. The description file is always named "Infoblox.ppd". Enter the following command, substituting the IP address or resolvable hostname of the Infoblox device for <ip_addr>:

C:\ibpack> lwp-request https://<ip_addr>/api/dist/ppm/Infoblox.ppd > Infoblox.ppd
View the Infoblox.ppd file:

C:\ibpack> type Infoblox.ppd <?xml version="1.0" encoding="UTF-8"?> <SOFTPKG NAME="Infoblox" VERSION="4,999999001478,0,0"> <TITLE>Infoblox</TITLE> <ABSTRACT>Infoblox Data and Management API 4.x</ABSTRACT> <AUTHOR>Infoblox, Inc.</AUTHOR> <IMPLEMENTATION> <CODEBASE HREF="Infoblox-4.999999001478.tar.gz" /> </IMPLEMENTATION> </SOFTPKG>
The file name of the main distribution package is contained in the HREF attributes of the CODEBASE element. In the output shown above, it is "Infoblox-4.999999001478.tar.gz". Use lwp-request to fetch that file.

C:\ibpack> lwp-request https://<ip_addr>/api/dist/ppm/Infoblox-4.999999001478.tar.gz > Infoblox4.999999001478.tar.gz
Use PPM to install the Infoblox DMAPI from the local file system:

C:\ibpack> ppm install Infoblox.ppd Unpacking Infoblox-4.999999001478...done Generating HTML for Infoblox-4.999999001478...done Installing to site area...done 64 files installed
The installation is complete. Uninstalling and Reinstalling the Infoblox Package After you configure PPM to search the Infoblox repository, use the appropriate command to uninstall and reinstall the Infoblox package:

ppm> uninstall Infoblox ==================== Remove 'Infoblox' version 4.9999990014709 in ActivePerl 5.8.8.817. ==================== ... Successfully removed Infoblox version 4.9999990014709 from ActivePerl 5.8.8.817. ppm> install Infoblox

NIOS 5.1r4

Page 10 (Rev. A)

Infoblox API Documentation

==================== Install 'Infoblox' version 4.9999990014709 in ActivePerl 5.8.8.817. ==================== ... Successfully installed Infoblox version 4.9999990014709 in ActivePerl 5.8.8.817.

Unix Management System
Requirements for Unix Management Systems
A working CPAN installation on the client UNIX machine when using CPAN::Site pre 1.02. Otherwise, a direct installation is required.

DIRECT INSTALLATION
To install the Infoblox DMAPI packages on a UNIX management system, first download and install the API package from:

https://<ip_addr>/api/dist/CPAN/authors/id/INFOBLOX/
where ip_addr is the IP address of the appliance. Then locate and download the file Infoblox-xxxxxxx.tar.gz where xxxxxxx is an integer depending on your API package version. After you download the package, extract it to a temporary directory with:

tar xvfz Infoblox-xxxxxxx.tar.gz
Then execute the following commands:

cd Infoblox-xxxxxxx/ perl Makefile.PL make make install
Optionally, before you install, test the package by running:

make test
The installation is complete.

CPAN INSTALLATION
To install the Infoblox DMAPI packages on a UNIX management system, first download and install ActivePerl (from www.activestate.com), and then do the following steps: 1. Install Crypt::SSLeay and CPAN::Site on your management system. 2. Run CPAN::Site, instead of CPAN. 3. Add the Infoblox device URL to the top of the CPAN URL list. 4. (Optional) Reduce the number of CPAN fetch methods. 5. Reload the CPAN::Site index. 6. Install the Infoblox package on your management system. Typically, the installation is done at the root level. See perlfaq8 under the question "How do I keep my own module/library directory?" for instructions on how to install a module as a user other than root. If you have never used CPAN on the client UNIX machine, you will need to follow the instructions, when you run it for the first time, you will be prompted for many configuration variables. Follow the procedure at 0. First Time CPAN Installation CPAN::Site Overview The Infoblox modules are installed using a variant of CPAN named CPAN::Site. See http://search.cpan.org/search?mode=module&query=CPAN%3A%3ASite for more information on CPAN::Site. In the usual CPAN model, there is a single CPAN repository, and every copy is a full and complete copy of every available package. In the CPAN::Site model, there are multiple repositories which may have a given module. As the Infoblox modules are deployed with CPAN::Site, you must use CPAN::Site instead of CPAN to install them. This is covered in more detail in step 2. If you use CPAN instead of CPAN::Site, typically the installation process will not find the Infoblox module in step 5. One consequence of using CPAN::Site is the installation searches multiple sites for the same set of files, finding some of them in some locations but not in others. This is a normal result. Additionally, CPAN has the ability to search for and fetch files using several different mechanisms: curl, FTP, lynx, ncftpget, wget, and LWP. Both CPAN and CPAN::Site use each of these methods in turn when it tries to find files. If the CPAN configuration lists many sites in its URL list and many access methods, the installation may take a long time while CPAN::Site tries each of the access methods on each of the listed sites. For this reason, Infoblox recommends that you reduce the
NIOS 5.1r4 Page 11 (Rev. A)

Infoblox API Documentation

number of sites in the URL list and the number of access methods as described in step 4. If you are installing a new version of the Infoblox modules and your urllist configuration still includes the Infoblox appliance, skip directly to steps 5 and 6. First Time CPAN Installation If you have never used CPAN on this client machine before, enter the following command:

[root@lx2 ~]# perl -MCPAN -e shell
and follow the prompts through the CPAN configuration. You can accept all of the defaults, except for the list of CPAN sites close to your physical location. Navigate the menus and choose 1 or 2 CPAN sites that are close to your site. When your configuration choices are complete, exit CPAN by typing exit at the prompt. 1. Install Crypt::SSLeay and CPAN::Site on your management system. The Crypt::SSLeay package allows you to make an HTTPS connection to the Infoblox device. If Crypt::SSLeay is not already installed, open a terminal window, login as the root user, and use CPAN to install the Crypt::SSLeay package and all its dependencies:

lx> perl -MCPAN -e 'install Crypt::SSLeay'
Install the CPAN::Site module:

lx> perl -MCPAN -e 'install CPAN::Site'
When the system prompts: "Running client or server?", enter 'client'. The installation process is asking if you want to install CPAN::Site as a server or as a client. Since CPAN::Site retrieves the Infoblox modules from a server, CPAN::Site acts as a client. 2. Run CPAN::Site, instead of CPAN. Use CPAN::Site instead of CPAN:

lx> perl -MCPAN::Site -e shell CPAN: File::HomeDir loaded ok cpan shell -- CPAN exploration and modules installation (v1.87) ReadLine support enabled
You must use CPAN::Site every time to access the Infoblox modules. 3. Add the Infoblox device URL to the top of the CPAN URL list. 3.0 You can manipulate the contents of the urllist with the usual perl functions push, pop, shift and unshift. push and pop operate on the end of the list, while shift and unshift operate on the beginning of the list. To empty the urllist, issue repeated shift or pop operands like this:

cpan> o conf urllist urllist [ftp://mirrors.kernel.org/pub/CPAN] [http://mirrors.kernel.org/pub/CPAN] Type 'o conf' to view all configuration items cpan> o conf urllist shift cpan> o conf urllist shift cpan> o conf urllist urllist Type 'o conf' to view all configuration items
You can put an item on the list at the beginning with unshift and at the end of the list with push:

cpan> o conf urllist unshift ftp://mirrors.kernel.org/pub/CPAN cpan> o conf urllist push ftp://bogus.site.at.end.of.list/CPAN cpan> o conf urllist urllist [ftp://mirrors.kernel.org/pub/CPAN] [ftp://bogus.site.at.end.of.list/CPAN] Type 'o conf' to view all configuration items
When you finish configuring the urllist, you must have the Infoblox appliance as the first item in the list. This is a requirement of CPAN::Site. The best configuration of urllist is a two-item list with the Infoblox appliance first and one other close, fast CPAN site second. For example, at the Infoblox headquarters a good set of choices for urllist is:

cpan> o conf urllist urllist [https://<ip_addr>/api/dist/CPAN]
NIOS 5.1r4 Page 12 (Rev. A)

Infoblox API Documentation

[ftp://mirrors.kernel.org/pub/CPAN] Type 'o conf' to view all configuration items
The complete list of CPAN sites can be found at: http://www.cpan.org/SITES.html 3.1 Configure the Infoblox device first in the CPAN URL list, so that CPAN::Site finds it first when searching for packages. Type the IP address or domain name of your Infoblox device for <ip_addr> (for a grid, use the address of the grid master): cpan> o conf urllist unshift https://<ip_addr>/api/dist/CPAN (Note: You only need to add the repository to the URL list once.) 3.2 You must have at least one other normal CPAN site in the list in case your client needs other public packages. The following is a sample URL list for a set of CPAN sites in North America:

cpan> o conf urllist urllist [https://<ip_addr>/api/dist/CPAN] [ftp://mirrors.kernel.org/pub/CPAN] [ftp://cpan.pair.com/pub/CPAN/] Type 'o conf' to view all configuration items
If you do not have any other CPAN sites in your URL list, add at least one before continuing. Use the command o conf urllist push <url_string> 3.3 To ensure that you have the correct URL for the Infoblox modules, open a Web browser and visit the URL you specified for the repository, in this example https://<ip_addr>/api/dist/CPAN. If the URL is correct, you can see a directory listing of the module files. 3.4 Save your CPAN configuration:

cpan> o conf commit commit: wrote '/usr/lib/perl5/5.8.8/CPAN/Config.pm'
4. (Optional) Reduce the number of CPAN fetch methods. By reducing the number of CPAN fetch methods, you can shorten the installation process. For an explanation why Infoblox recommends this step, see the note in the introduction (before step 1).

CPAN (and CPAN::Site) supports up to six different ways to search for and fetch files: curl, FTP, lynx, ncftpget, wget, and LWP. Infoblox recommends that you choose the method that work best for you and only configure those methods. For the typical cases, Infoblox recommends keeping LWP, FTP, and ncftpget enabled and disabling curl, lynx and wget. To disable a fetch method, set it to an empty string and then commit the configuration. In the example below, you first display the configuration parameters for curl, lynx, and wget, and then set them to an empty string: cpan> o conf curl curl cpan> o conf curl "" curl cpan> o conf lynx lynx cpan> o conf lynx "" lynx cpan> o conf wget wget cpan> o conf wget "" wget [/usr/bin/curl] [] [/usr/bin/lynx] [] [/usr/bin/wget] []

cpan> o conf commit commit: wrote '/usr/lib/perl5/5.8.8/CPAN/Config.pm'
5. Reload the CPAN::Site index. Use CPAN to reload the CPAN::Site index:

cpan> reload index CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Sat, 09 Sep 2006 22:32:52 GMT CPAN: LWP::UserAgent loaded ok Fetching with LWP: https://<ip_addr>/api/dist/CPAN/authors/01mailrc.txt.gz ... Fetching with LWP: https://<ip_addr>/api/dist/CPAN/modules/03modlist.data.gz
NIOS 5.1r4 Page 13 (Rev. A)

Infoblox API Documentation

LWP failed with code[404] message[Not Found] Fetching with LWP: ftp://mirrors.kernel.org/pub/CPAN/modules/03modlist.data.gz Going to read /root/.cpan/sources/modules/03modlist.data.gz Going to write /root/.cpan/Metadata
Note: Unlike CPAN, CPAN::Site is designed so that some of the files that describe the available packages are not found in all of the locations in your URL list. It is normal to see some "file not found" errors during the index reload. 6. Install the Infoblox package on your management system. The usual CPAN process for installing Perl modules is: 6.1 Search 6.2 Test 6.3 Install 6.4 Uninstall and Reinstall 6.1 Search Use the m operator to search for the Infoblox module:

cpan> m /Infoblox/ CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Mon, 18 Sep 2006 06:29:55 GMT CPAN: LWP::UserAgent loaded ok . . . Fetching with LWP: https://<ip_addr>/api/dist/CPAN/site/01mailrc.txt.gz Going to read /root/.cpan/sources/site/01mailrc.txt.gz Module id = Infoblox CPAN_USERID INFOBLOX (Infoblox Technical Support <support@infoblox.com>) CPAN_VERSION 4.9999990014709 CPAN_FILE INFOBLOX/Infoblox-4.9999990014709.tar.gz INST_FILE (not installed)
If the search cannot find the Infoblox modules: a. Ensure that you are using CPAN::Site, not CPAN as shown in 2. Run CPAN::Site, instead of CPAN. b. Check the Infoblox appliance in the urllist as shown in step 3.3. 6.2 Test You can optionally test the package before the installation:

cpan> test Infoblox Running test for module Infoblox Running make for Infoblox-4.999990014709.tar.gz ... All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.74 cusr + /usr/bin/make test - OK
6.3 Install Install the Infoblox package:

0.08 csys =

0.82 CPU)

cpan> install Infoblox Running install for module Infoblox Running make for INFOBLOX/Infoblox-4.9999990014709.tar.gz ... Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Infoblox/.packlist Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod /usr/bin/make install -- OK
To exit the CPAN::Site shell:

cpan> quit
The installation is complete. 6.4 Uninstalling and Reinstalling the Infoblox Package Although not directly supported by CPAN, it is simple to uninstall the Infoblox package using published techniques. One way to do it is provided by the modrm program that is described in the ExtUtils::Packlist documentation. See http://search.cpan.org/~yves/ExtUtilsInstall-1.41/lib/ExtUtils/Packlist.pm#EXAMPLE for the modrm program. To reinstall it, repeat steps 5 and 6 above.

Infoblox API Usage Guidelines

NIOS 5.1r4

Page 14 (Rev. A)

Infoblox API Documentation

The usage instructions are provided to assist you in using the Infoblox API.

UTF8 Considerations
If there are utf-8 characters in your script, remember to use the pragma 'use utf8'. If you need more information, please see http://search.cpan.org/~nwclark/perl-5.8.8/lib/utf8.pm on the utf8 pragma.

search() Considerations
When using the search() method, you could retrieve more information than expected. Include additional checks for exact matches. Example

my @result_array = $session->search( "object" => "Infoblox::DNS::Record::A", "name" => "infoblox.com" ); my $obj; foreach my $match (@result_array) { if( ($match->name() eq "infoblox.com") && ($match->ipv4addr() eq "2.2.2.2") ) { print "Matches\n"; $obj = $match; } }

Available Infoblox API Objects
Infoblox::Cursor - Manages paged searches. Infoblox::DHCP::ExclusionRange - DHCP ExclusionRange object. Infoblox::DHCP::ExclusionRangeTemplate - DHCP ExclusionRangeTemplate object. Infoblox::DHCP::ExpandNetwork - Join or Expand an existing network Infoblox::DHCP::FailOver - DHCP Failover object. Infoblox::DHCP::Filter::MAC - DHCP MAC Address Filter object. Infoblox::DHCP::Filter::MatchRule - DHCP Option Filter MatchRule object. Infoblox::DHCP::Filter::NAC - DHCP NAC Filter object. Infoblox::DHCP::Filter::Option - DHCP filter option object Infoblox::DHCP::Filter::RelayAgent - DHCP relay agent filter object Infoblox::DHCP::FilterRule::MAC - DHCP MAC Address Filter Rule object. Infoblox::DHCP::FilterRule::NAC - DHCP NAC Filter Rule object. Infoblox::DHCP::FilterRule::Option - DHCP filter rule option object. Infoblox::DHCP::FilterRule::RelayAgent - DHCP RelayAgent Filter Rule object. Infoblox::DHCP::FixedAddr - DHCP Fixed Address object. Infoblox::DHCP::FixedAddrTemplate - DHCP Fixed Address template object. Infoblox::DHCP::IPv6Network - DHCP IPv6 Network object Infoblox::DHCP::IPv6NetworkContainer - DHCP IPv6 Network Container object Infoblox::DHCP::Lease - DHCP Lease object. Infoblox::DHCP::MAC - DHCP MAC object. Infoblox::DHCP::MSOption - Microsoft (r) Server DHCP Option object. Infoblox::DHCP::MSServer - Microsoft (r) DHCP Server object. Infoblox::DHCP::MSSuperscope - Microsoft (r) Server Superscope object. Infoblox::DHCP::Member - DHCP Member object.
NIOS 5.1r4 Page 15 (Rev. A)

Infoblox API Documentation

Infoblox::DHCP::Network - DHCP Network object Infoblox::DHCP::NetworkContainer - DHCP Network Container object Infoblox::DHCP::NetworkTemplate - DHCP Network Template object Infoblox::DHCP::Option - DHCP Option object. Infoblox::DHCP::Option60MatchRule - DHCP Option60MatchRule object. Infoblox::DHCP::OptionDefinition - DHCP option definition object Infoblox::DHCP::OptionSpace - DHCP OptionSpace object. Infoblox::DHCP::OrderedRanges - Ordered Ranges object. Infoblox::DHCP::Range - DHCP Range object. Infoblox::DHCP::RangeTemplate - DHCP RangeTemplate object. Infoblox::DHCP::RoamingHost - DHCP Roaming Host object. Infoblox::DHCP::SharedNetwork - DHCP Shared Network object Infoblox::DHCP::SplitNetwork - Split network object. Infoblox::DHCP::Statistics - Manages DHCP statistics. Infoblox::DHCP::Template - DHCP Template object. Infoblox::DHCP::View - DHCP Network View object Infoblox::DNS::AllRecords - A synthetic object used to return all record object types belonging to a zone. Infoblox::DNS::BulkHost - Create a group of hosts. Infoblox::DNS::DnssecTrustedKey - DNSSEC trusted key object. Infoblox::DNS::GlueRecordAddr - Infoblox DNS Glue Record Object. Infoblox::DNS::Host - DNS Host record object. Infoblox::DNS::MSServer - Microsoft (r) DNS Server object Infoblox::DNS::Member - DNS Member object Infoblox::DNS::NSEC3PARAM - NSEC3PARAM Record object Infoblox::DNS::Nameserver - DNS Nameserver object Infoblox::DNS::Nameserver::Address - NS Name Server object. Infoblox::DNS::Record::A - DNS A record object. Infoblox::DNS::Record::AAAA - DNS AAAA record object. Infoblox::DNS::Record::CNAME - DNS CNAME record object. Infoblox::DNS::Record::DNAME - DNAME record object. Infoblox::DNS::Record::DNSKEY - DNSKEY Record object. Infoblox::DNS::Record::DS - DS Record object. Infoblox::DNS::Record::MX - DNS MX record object Infoblox::DNS::Record::NAPTR - NAPTR record object. Infoblox::DNS::Record::NS - DNS NS record object Infoblox::DNS::Record::NSEC - NSEC Record object Infoblox::DNS::Record::NSEC3 - NSEC3 Record object. Infoblox::DNS::Record::PTR - DNS PTR record object. Infoblox::DNS::Record::RRSIG - RRSIG Record object Infoblox::DNS::Record::SRV - DNS SRV record object

NIOS 5.1r4

Page 16 (Rev. A)

Infoblox API Documentation

Infoblox::DNS::Record::TXT - DNS TXT record object. Infoblox::DNS::RootNameServer - Custom root name server object. Infoblox::DNS::SRG - Create a shared record group. Infoblox::DNS::SharedRecord::A - DNS shared A record object. Infoblox::DNS::SharedRecord::AAAA - DNS AAAA shared record object. Infoblox::DNS::SharedRecord::MX - DNS shared MX record object Infoblox::DNS::SharedRecord::SRV - DNS shared SRV record object Infoblox::DNS::SharedRecord::TXT - DNS shared TXT record object. Infoblox::DNS::Sortlist - DNS Sortlist Object. Infoblox::DNS::TSIGKey - DNS TSIGKey object Infoblox::DNS::View - DNS View object Infoblox::DNS::Zone - DNS Zone object Infoblox::Grid - Manages the Grid settings. Infoblox::Grid::Admin::AdAuthServer - Active Directory Authentication Server object Infoblox::Grid::Admin::AdAuthService - Active Directory Authentication Service object Infoblox::Grid::Admin::Group - Admin Group object. Infoblox::Grid::Admin::Permission - Admin Permission object. Infoblox::Grid::Admin::RadiusAuthServer - RADIUS Authentication Server object Infoblox::Grid::Admin::RadiusAuthService - RADIUS Authentication Service object Infoblox::Grid::Admin::Role - Admin Role object. Infoblox::Grid::Admin::User - User Admin object. Infoblox::Grid::DHCP - Grid DHCP services object. Infoblox::Grid::DNS - DNS objects management and configuration Infoblox::Grid::DNS::BulkHostNameTemplate - Manages the DNS bulk host name formats defined at the grid level. Infoblox::Grid::DNS::Nsgroup - Creates a name server group. Infoblox::Grid::DateTime - Grid date and time object. Infoblox::Grid::ExtensibleAttributeDef - Extensible Attribute Definition object. Infoblox::Grid::ExtensibleAttributeDef::ListValue - Extensible Attribute Definition List Value object. Infoblox::Grid::FileDistributionDir - Grid FileDistributionDir object. Infoblox::Grid::GlobalSmartFolder - Global Smart Folder object. Infoblox::Grid::IFMap - interface to configure the IF-MAP server object properties. Infoblox::Grid::KerberosKey - Grid kerberos key object. Infoblox::Grid::MSServer - Microsoft (r) Grid Server object. Infoblox::Grid::MSServer::DHCP - Grid Microsoft (r) Server DHCP object. Infoblox::Grid::MSServer::DNS - Grid Microsoft (r) Server DNS object. Infoblox::Grid::Member - Grid Member object. Infoblox::Grid::Member::CaptivePortal - Captive Portal object. Infoblox::Grid::Member::CaptivePortal::File - Captive Portal File object Infoblox::Grid::Member::DHCP - DHCP member object. Infoblox::Grid::Member::DNS - Grid Member DNS object. Infoblox::Grid::Member::FileDistribution - Grid Member FileDistribution object.
NIOS 5.1r4 Page 17 (Rev. A)

Infoblox API Documentation

Infoblox::Grid::Member::Interface - Interface member object. Infoblox::Grid::Member::License - License object. Infoblox::Grid::Member::OSPF - OSPF (Open Shortest Path First) member object. Infoblox::Grid::Member::ServiceStatus - Service Status object. Infoblox::Grid::Member::StaticRoute - Static route member object Infoblox::Grid::NTPAccess - Grid Network Time Protocol (NTP) access object. Infoblox::Grid::NTPKey - Grid Network Time Protocol (NTP) key object. Infoblox::Grid::NTPServer - Grid Network Time Protocol (NTP) server object. Infoblox::Grid::NatGroup - NAT Group object. Infoblox::Grid::PersonalSmartFolder - Personal Smart Folder object. Infoblox::Grid::RecordNamePolicy - Manages the DNS record name policies defined at the grid level. Infoblox::Grid::RootNameServer - Custom root name server object. Infoblox::Grid::SNMP::Admin - Manages a SNMP Admin object. Infoblox::Grid::ScheduledBackup - Scheduled Backup object. Infoblox::Grid::ScheduledTask - Scheduled Task object. Infoblox::Grid::ScheduledTask::ChangedObject - Scheduled Task Changed Object. Infoblox::Grid::SmartFolder::GroupBy - Smart Folder Group By object Infoblox::Grid::SmartFolder::GroupByValue - Smart Folder Group By Value object Infoblox::Grid::SmartFolder::QueryItem - Smart Folder Query Item object Infoblox::Grid::SmartFolderChildren - Smart Folder retrieval item. Infoblox::Grid::SyslogServer - Syslog server object. Infoblox::Grid::TimeZone - Grid time zone object. Infoblox::IFMap::AuthRule - IF-MAP Authorization Rules object. Infoblox::IFMap::CACertificate - IF-MAP CA Certificate object. Infoblox::IFMap::Client - IF-MAP Client object Infoblox::IFMap::Client::Certificate - IF-Map Client Certificate object Infoblox::IPAM::Address - IPAM address object Infoblox::IPAM::DiscoveryTask - Network discovery configuration Infoblox::IPAM::DiscoveryTask::VServer - VMWare discovery server object. Infoblox::IPAM::Statistics - Manages IPAM statistics. Infoblox::IPAM::TCPPort - Network discovery TCP port Infoblox::Session - Session object to manipulate data within a grid.

NIOS 5.1r4

Page 18 (Rev. A)

Infoblox API Documentation

Infoblox::Cursor - Manages paged searches.
NAME DESCRIPTION CONSTRUCTOR METHODS fetch_size( ) other parameters Supported object types SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT

NAME
Infoblox::Cursor - Manages paged searches.

DESCRIPTION
This class enables users to conduct database searches returning large datasets in an object-by-object manner.

CONSTRUCTOR
my $cursor=$session->new_cursor( fetch_size object return_methods name ); => => => => 200, "Infoblox::DNS::AllRecords", ['name'], ".*"

METHODS
This section describes all the methods that you can use when creating a cursor used for paged searches.

fetch_size( )
This method is used to set the amount of records returned from the back-end to the client for every request. Larger values will cause less requests to be sent to the back-end and more memory used on the client-side; smaller values will cause more requests. The default value is 100.

other parameters
Other parameters for this constructor are any valid search parameters as described in Infoblox::Session->search()

Supported object types
Paged search is supported for the following object types: Infoblox::DNS::AllRecords

SAMPLE CODE
The following sample code demonstrates how to execute a paged search.

#PROGRAM STARTS: Include all the modules that will be used $cursor=$session->new_cursor( fetch_size => 100, object => "Infoblox::DNS::AllRecords", name => '.*', ); while ($current_record = $cursor->fetch()) { # $current_record will contain a matching record object }

NIOS 5.1r4

Page 19 (Rev. A)

Infoblox API Documentation

AUTHOR
Infoblox Inc. http://www.infoblox.com/

SEE ALSO
Infoblox::Session, Infoblox::Session->search()

COPYRIGHT
Copyright (c) 1999-2010 Infoblox Inc.

NIOS 5.1r4

Page 20 (Rev. A)

Infoblox API Documentation

Infoblox::DHCP::ExclusionRange - DHCP ExclusionRange object.
NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::Range->exclude( ) METHODS comment( ) end_address( ) start_address( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT

NAME
Infoblox::DHCP::ExclusionRange - DHCP ExclusionRange object.

DESCRIPTION
The DHCP exclusion range describes the range of IP addresses that can be excluded in an address range. If static addresses are assigned to certain hosts in the middle of an address range, those addresses can be excluded from the address range so the DHCP server does not assign those IP addresses to clients.

CONSTRUCTOR
my $exclusion_range end_address start_address comment ); = Infoblox::DHCP::ExclusionRange->new( => $ipv4addr, #Required => $ipv4addr, #Required => $string, #Optional / Default is empty

MODULE METHODS
The following functions are available to apply to a DHCP exclusion range object.

Infoblox::DHCP::Range->exclude( )
Use this function to specify exclusion range for the DHCP range. See Infoblox::DHCP::Range->exclude() for parameters and return values. Example

#Construct a DHCP ExclusionRange object my $exclusion_range = Infoblox::DHCP::ExclusionRange->new( end_address => "10.0.0.8", start_address => "10.0.0.5", comment => "Exclude four IP addresses" ); # Configure DHCP ExclusionRange on the DHCP Range object my $response = $dhcp_range->exclude([$exclusion_range]);

METHODS
This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP exclusion range object.

comment( )
Use this method to set or retrieve a descriptive comment of a DHCP exclusion range object. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter Desired comment in string format with a maximum of 256 bytes.
NIOS 5.1r4 Page 21 (Rev. A)

Parameter Specify the start address of the DHCP exclusion range in IPv4 address format.Infoblox API Documentation Returns If you specified a parameter. #Modify start_address $exclusion_range->start_address("10. Returns If you specified a parameter. Example #Get end_address my $end_address = $exclusion_range->end_address().1. Include the specified parameter to set the attribute value. An IPv4 address is a 32-bit number in dotted decimal notation.0. Example #Get start_address my $start_address = $exclusion_range->start_address(). and returns false when the operation fails. the method returns true when the modification succeeds. #Modify comment $exclusion_range->comment("Modifying the DHCP exclusion range comment").1. Also.0. the method returns the attribute value. #Modify end_address $exclusion_range->end_address("10.0. and remove. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. Omit the parameter to retrieve the attribute value. this sample includes error handling for the operations. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( NIOS 5.2). modify. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.168. An end address is the last IP address in the DHCP exclusion range which is not available for the clients. A start address is the first IP address in the DHCP exclusion range which is not available for the clients. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP exclusion range object such as add. use Infoblox.1r4 Page 22 (Rev. If you did not specify a parameter. #Preparation prior to a DHCP exclusion range object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. Parameter Specify the end address of the DHCP exclusion range in IPv4 address format. Omit the parameter to retrieve the attribute value. start_address( ) Use this method to set or retrieve the start address of a DHCP exclusion range object. end_address( ) Use this method to set or retrieve the end address of a DHCP exclusion range object. and returns false when the operation fails.168. Returns If you specified a parameter. the method returns true when the modification succeeds. A) . Include the specified parameter to set the attribute value.0. If you did not specify a parameter. the method returns true when the modification succeeds.2). Example #Get comment my $comment = $exclusion_range->comment(). the method returns the attribute value.6").9"). If you did not specify a parameter. the method returns the attribute value. An IPv4 address is a 32-bit number in dotted decimal notation. and returns false when the operation fails.

":" .0.0.0. Infoblox::status_code() . Infoblox::status_detail()). my $object = $retrieved_objs[0]. Infoblox::status_code() .2".0.0. ":" .0. Infoblox::status_code() .0/8". } print "DHCP Range object created successfully\n". $session->status_detail()). #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ".0. Infoblox::status_detail()). unless ($object) { die("Get DHCP Range object failed: ".5".0. unless($dhcp_range) { die("Construct DHCP Range object failed: ".0. ":" . #Apply the changes to the DHCP Range object $object->exclude([$exclusion_range]).168. ":" . $session->status_code() . } print "Network object created successfully\n".1".0/8". #Create the DHCP Range object my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10.1r4 Page 23 (Rev. ":" .8".0.0. #Submit the changes to the Session $session->modify($object) NIOS 5. unless ($session) { die("Construct session failed: ". #appliance user login password => "infoblox" #appliance password ). print "Network object added to Infoblox appliance successfully\n". unless($exclusion_range) { die("Construct DHCP exclusion range object failed: ". #Add DHCP exclusion range to DHCP Range #Get the DHCP Range object my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range".Infoblox API Documentation master => "192. #appliance host ip username => "admin". A) . } print "DHCP exclusion range object created successfully\n". network => "10.1. $session->status_code() .10". } print "Session created successfully\n". ). Infoblox::status_code() . #Create a DHCP exclusion range object my $exclusion_range = Infoblox::DHCP::ExclusionRange->new( end_address => "10. Infoblox::status_detail()).0. $session->status_detail()). start_addr => "10. comment => "add network".0. ":" . #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ". start_address => "10. ":" . } print "Get DHCP Range object found at least 1 matching entry\n". start_addr => "10. print "DHCP Range object added to Infoblox appliance successfully\n". $session->status_detail()). $session->status_code() . #Create the Network object my $network = Infoblox::DHCP::Network->new( network => "10. ). Infoblox::status_detail()).1" ). comment => "Exclude four IP addresses" ). unless($network) { die("Construct Network object failed: ".0.

A) .com/ SEE ALSO Infoblox::Session. #Modifying the start address of the DHCP exclusion range object. $object->exclude([]).0. ":" . $exclusion_range->start_address("10. $session->status_detail()). #Modify DHCP exclusion range #Modifying the end address of the DHCP exclusion range object.Infoblox API Documentation or die("Adding DHCP exclusion range to DHCP Range object failed: ".0. $session->status_code() .Infoblox::DHCP::Network COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.6"). #Update DHCP Range object through the Infoblox session. ":" . http://www. Infoblox::Session->add(). $object->exclude([$exclusion_range]).Infoblox::Session->get(). print "DHCP Range object with modified DHCP exclusion range updated to Infoblox appliance successfully\n". $exclusion_range->comment("Modified DHCP Exclusion Range"). print "Removed DHCP exclusion range from DHCP Range successfully\n". $session->status_code() . $session->status_code() . #Apply changes to the DHCP Range object. #Update DHCP Range object through the Infoblox session. #Modifying the comment of the DHCP exclusion range object.infoblox. ":" . NIOS 5. #Remove DHCP exclusion range #Remove the exclusion range from the DHCP Range object.Infoblox::Session>modify().9"). $session->modify($object) or die("Modify DHCP Range object failed: ".0. print "DHCP Range with exclusion range updated to Infoblox appliance successfully\n". $session->status_detail()). ####PROGRAM ENDS#### AUTHOR Infoblox Inc. $session->modify($object) or die("Modify DHCP Range object failed: ".0. $session->status_detail()).Infoblox::DHCP::Range. $exclusion_range->end_address("10.1r4 Page 24 (Rev.

1r4 Page 25 (Rev. #Required comment => $string. #Required number_of_addresses => $num. MODULE METHODS The following functions are available to be applied to a DHCP exclusion range template object. DESCRIPTION The DHCP exclusion range template describes the range of IP addresses that can be excluded in an address range template. Omit the parameter to retrieve the attribute value. comment => "Exclude five IP addresses" ).DHCP ExclusionRangeTemplate object. Example #Construct a DHCP ExclusionRangeTemplate object my $exclusion_range_template = Infoblox::DHCP::ExclusionRangeTemplate->new( offset => "10". Include the specified parameter to set the attribute value. See Infoblox::DHCP::RangeTemplate->exclude() for parameters and return values. comment( ) Use this method to set or retrieve a descriptive comment of a DHCP exclusion range template object. #Optional / Default is empty ).Infoblox API Documentation Infoblox::DHCP::ExclusionRangeTemplate . Parameter NIOS 5. those addresses can be excluded from the address range so the DHCP server does not assign those IP addresses to the clients. CONSTRUCTOR my $exclusion_range_template = Infoblox::DHCP::ExclusionRangeTemplate->new( offset => $num. number_of_addresses => "5". If static IP addresses are assigned to certain hosts in the middle of an address range. A) . NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::RangeTemplate->exclude( ) METHODS comment( ) number_of_addresses( ) offset( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::ExclusionRangeTemplate . # Configure DHCP ExclusionRangeTemplate on the DHCP Range template object my $response = $dhcp_range_template->exclude([$exclusion_range_template]).DHCP ExclusionRangeTemplate object. Infoblox::DHCP::RangeTemplate->exclude( ) Use this function to specify exclusion range for the DHCP range template object. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP exclusion range template object.

then start address of exclusion range created from this exclusion range template will be 10.2".0. A) . #Modify comment $exclusion_range_template->comment("Modifying the DHCP exclusion range template comment"). the method returns the attribute value.Infoblox API Documentation Desired comment in string format with a maximum of 256 bytes. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP exclusion range object such as add. Include the specified parameter to set the attribute value.10 and end address will be 10. #appliance host ip username => "admin". this sample includes error handling for the operations. Example #Get number_of_addresses my $number_of_addresses = $exclusion_range_template->number_of_addresses(). #PROGRAM STARTS: Include all the modules that will be used use strict. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. Parameter The address offset of this exclusion range template. For example. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. #appliance user login NIOS 5. number_of_addresses( ) Use this method to set or retrieve the number of addresses in the DHCP exclusion range template object. Returns If you specified a parameter.0.20. use Infoblox. Example #Get comment my $comment = $exclusion_range_template->comment(). and remove. #Modify number_of_addresses $exclusion_range_template->number_of_addresses("10").168. offset( ) Use this method to set or retrieve the address offset of the DHCP exclusion range template object. If you did not specify a parameter.0. Include the specified parameter to set the attribute value.1r4 Page 26 (Rev. Returns If you specified a parameter. the method returns the attribute value. and returns false when the operation fails.0/8. Example #Get offset my $offset = $exclusion_range_template->offset(). if offset is set to 10 and number_of_addresses is set to 10. the method returns true when the modification succeeds. Parameter The number of addresses in this exclusion range template.1. Also. #Modify offset $exclusion_range_template->offset("10").0. If you did not specify a parameter.0. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. The offset is calculated from the start address of network template to which the DHCP range template is assigned to. and network is set to 10. the method returns true when the modification succeeds. the method returns the attribute value. Returns If you specified a parameter.0. modify. If you did not specify a parameter. the method returns true when the modification succeeds.

bootfile => "bootfile1. Infoblox::status_code() . ":" . unless($exclusion_range_template) { die("Construct DHCP exclusion range template object failed: ". #Update DHCP Range template object through the Infoblox session. $session->status_detail()). print "Removed DHCP exclusion range template from DHCP Range successfully\n". $session->status_code() . unless ($session) { die("Construct session failed: ". name => "custom_range_template" ). } print "DHCP Range template object created successfully\n". Infoblox::status_detail()). Infoblox::status_detail()). $session->status_detail()). $session->status_code() . #Add DHCP exclusion range template to DHCP Range template #Get the DHCP Range template object my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RangeTemplate". #Apply the changes to the DHCP Range template object $object->exclude([$exclusion_range_template]). #Create the DHCP Range template object my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template". ). ":" . $session->modify($object) or die("Modify DHCP Range template object failed: ". $object->exclude([]). Infoblox::status_code() . ":" . print "DHCP Range template with exclusion range template updated to Infoblox appliance successfully\n". $session->status_detail()). $session->status_code() . my $object = $retrieved_objs[0]. ":" . } print "Session created successfully\n". ":" . unless ($object) { die("Get DHCP Range template object failed: ". $session->status_code() . authority => "TRUE". ":" . Infoblox::status_detail()). A) . #Create a DHCP exclusion range templat object my $exclusion_range_template = Infoblox::DHCP::ExclusionRangeTemplate->new( offset => "10". ####PROGRAM ENDS#### NIOS 5. #Remove DHCP exclusion range template #Remove the exclusion range template from the DHCP Range template object. ":" . } print "DHCP exclusion range template object created successfully\n". comment => "Exclude five IP addresses" ). $session->status_detail()). offset => "10".com". number_of_addresses => "5". number_of_addresses => "10". print "DHCP Range object added to Infoblox appliance successfully\n". Infoblox::status_code() .Infoblox API Documentation password => "infoblox" #appliance password ). } print "Get DHCP Range template object found at least 1 matching entry\n".1r4 Page 27 (Rev. unless($dhcp_range_template) { die("Construct DHCP Range template object failed: ". #Submit the changes to the Session $session->modify($object) or die("Adding DHCP exclusion range to DHCP Range template object failed: ". #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range_template) or die("Add DHCP Range template object failed: ".

NIOS 5.1r4 Page 28 (Rev.infoblox.Infoblox API Documentation AUTHOR Infoblox Inc.Infoblox::DHCP::NetworkTemplate COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.com/ SEE ALSO Infoblox::Session.Infoblox::DHCP::RangeTemplate. A) . http://www.

1r4 Page 29 (Rev. #Optional / Default is "false" ).Join or Expand an existing network DESCRIPTION Expanding/Joining multiple networks into a larger network is the opposite of spliting a network.0/16". $session->add($expand_network). auto_create_reversezone => "false" ). See Infoblox::Session-> add() for parameters and return values Example # construct the network to be expanded my $network = Infoblox::DHCP::Network->new( network => "123. Infoblox::Session->add( ) Use this method to expand an existing network on the Infoblox appliance. #Required prefix => $num. # Submit the Expand network operation.0. #Required auto_create_reversezone => "true" | "false". prefix => "13". auto_create_reversezone( ) Use this method to set the auto_create_reversezone flag. METHODS This section describes all the methods that you can use to configure and retrieve the attribute value of a Expand Network. this flag will automatically create reverse-mapping zones for the subnet. CONSTRUCTOR #Constructor a DHCP Expand Network object my $expand_network = Infoblox::DHCP::ExpandNetwork->new ( network => $Network|$IPv6Network.Infoblox API Documentation Infoblox::DHCP::ExpandNetwork .0. NIOS 5. SESSION METHODS This section describes all the methods in Infoblox::Session that you can apply to a DHCP ExpandNetwork object. You can select a network and expand it into a larger network with smaller netmask.Join or Expand an existing network NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) METHODS auto_create_reversezone( ) network( ) prefix( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::ExpandNetwork . # construct a Expand Network object my $expand_network = Infoblox::DHCP::ExpandNetwork->new ( network => $network. ). When set. A) .

1. SAMPLE CODE The following sample code demonstrates different operations that can be applied to an object such as create. Example #Set auto_create_reversezone $split_network->auto_create_reversezone("true"). Returns If you specified a parameter. $expand_network->network($network). Parameter Specify "true" to set auto_create_reversezone flag or "false" to deactivate/unset it. and returns false when the operation fails. and returns false when the operation fails. Include the specified parameter to set the attribute value. and returns false when the operation fails.0/16". $expand_network->network($network). Example #Specify network my $network = Infoblox::DHCP::Network->new( network => "123. and remove an object. modify. network( ) Use this method to specify the network to be expanded. The minimuim value is 8. the method returns true when the modification succeeds. Returns If you specified a parameter. Include the specified parameter to set the attribute value.1r4 Page 30 (Rev. Returns If you specified a parameter.0.2". The default value is "false". use Infoblox. prefix( ) Use this method to specify the appropriate subnet mask to be expanded on the network. the method returns true when the modification succeeds. the method returns true when the modification succeeds. This value must be 1 smaller then the subnet mask of the network to be expanded. Parameter Number with the subnet mask value.168. A) .Infoblox API Documentation Include the specified parameter to set the attribute value. ). #PROGRAM STARTS: Include all the modules that will be used use strict. Example #Specify prefix $expand_network->prefix(13). #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. Parameter The valid values are either Infoblox::DHCP::Network or Infoblox::DHCP::IPv6Network objects.0. ). username => "admin". #Specify IPv6 network my $network = Infoblox::DHCP::IPv6Network->new( network => "12::/68". password => "infoblox" NIOS 5. This sample code also includes error handling for the operations.

Infoblox::DHCP::Network COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. } print"Network object created successfully.Infoblox::status_detail()). http://www. ":" . Infoblox::status_detail()). } print"Expand network object created successfully.Infoblox::status_detail()). ":" .0. unless($object){ print"Network does not exist on server. safe to add the network.com/ SEE ALSO Infoblox::Session. } print"Network added successfully.\n". $session->add($network) or die("Add network failed: ". Infoblox::status_code(). ). $session->status_code(). #Create network prior to splitting the network my $network = Infoblox::DHCP::Network->new( network => "123. ":" . Infoblox::Session->add().infoblox.\n".$session->status_detail()).\n".0. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. unless($network){ die("Construct network object fail: ".\n". print "Expand network successfully. #Expand the network $session->add( $expand_network ) or die("Expand network fail:". ). auto_create_reversezone => "false".$session->status_detail()). ":" .\n". network => "123. unless ($session) { die("Construct session failed: ". NIOS 5.0.0. #Expand the network my $expand_network = Infoblox::DHCP::ExpandNetwork->new ( network => $network. Infoblox::status_code() .1r4 Page 31 (Rev. unless($expand_network){ die("Construct expand network object fail: ". } print "Session created successfully\n".0/16". #Verify if the network exists my $object = $session->get( object => "Infoblox::DHCP::Network".Infoblox API Documentation ). ":" . A) . Infoblox::status_code(). comment => "add network". prefix => "13". $session->status_code().0/16" ).

Infoblox API Documentation Infoblox::DHCP::FailOver .. . .1r4 new Page 32 (Rev. See Infoblox::Session->add() for parameters and return values. #Optional / Default is empty extensible_attributes => { $string => $string | $num.. #Optional / Default value is 10 max_response_delay => $num. Example #Create a DHCP Member object my $memberdhcp Infoblox::DHCP::Member NIOS 5. SESSION METHODS This section describes all the methods in Infoblox::Session module that can be applied to a DHCP failover object.DHCP Failover object. #Optional / Default value is 3 max_client_lead_time => $num. #Optional / Default is undefined load_balance_split => $num. #Optional / Default value is 3600 max_unacked_updates => $num. #Required primary => $ipv4addr | $Member #Required secondary => $ipv4addr | $Member #Required comment => $string. Infoblox::Session->add( ) Use this method to add a DHCP failover object to the Infoblox appliance.DHCP Failover object. $string => [ $string | $num. DESCRIPTION DHCP failover is a protocol designed to allow a backup DHCP server to take over for a main server if the main server is taken off the network for any reason. #Optional / Default value is 128 max_load_balance_delay => $num. ]. CONSTRUCTOR my $dhcp_failover = Infoblox::DHCP::FailOver->new( name => $string. }.. #Optional / Default value is 60 recycle_leases => "true" | "false" | undef. #Optional / Default value is undefined ). A) .. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS name( ) primary( ) secondary( ) comment( ) extensible_attributes( ) load_balance_split( ) max_load_balance_delay( ) max_client_lead_time( ) max_unacked_updates( ) max_response_delay( ) primary_state( ) recycle_leases( ) secondary_state( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::FailOver . DHCP failover can be used to configure two DHCP servers to operate as a redundant pair.

max_response_delay => 60. A) . Infoblox::Session->modify( ) Use this method to modify a DHCP failover object in the Infoblox appliance. ipv4addr => "192. Example # Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FailOver". # Submit for removal my $response = $session->remove( $desired_dhcp_failover ). See Infoblox::Session->get() for parameters and return values. max_client_lead_time => 3600. Example my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FailOver". Infoblox::Session->search( ) Use this method to search for DHCP failover objects in the Infoblox appliance.1. See Infoblox::Session->modify() for parameters and return values.1r4 Page 33 (Rev. # Submit for addition my $response = $session->add( $dhcp_failover ). Example # Use method to modify the load_balance_split. Key References Apply the following attributes to get a specific DHCP failover object: name .1.2" ). max_unacked_updates => 10.1. # Submit modification my $response = $session->modify( $dhcp_failover ). Name of a DHCP failover in string format. max_load_balance_delay => 3.Required.1". to search for a DHCP failover object: NIOS 5. load_balance_split => 128. ( #Construct an object my $dhcp_failover = Infoblox::DHCP::FailOver->new( name => "peer1". name => "peer1" ). Key References Apply the following attributes. name => "peer1" ). $dhcp_failover->load_balance_split(130). See Infoblox::Session->search() for parameters and return values. # Find the desired object from the retrieved list. my $desired_dhcp_failover = $retrieved_objs[0]. secondary => "1. recycle_leases => "false". primary => $memberdhcp.localdomain".168. first use get() or search() to retrieve the specific DHCP failover object. See Infoblox::Session->remove() for parameters and return values. and then submit this object for removal. To remove a specific object. ). Infoblox::Session->remove( ) Use this method to remove a DHCP failover object from the Infoblox appliance.Infoblox API Documentation = -> name => "infoblox. Infoblox::Session->get( ) Use this method to retrieve all the matching DHCP failover objects from the Infoblox appliance.

the method returns the attribute value. A) . The comment of the DHCP failover object. A hash reference containing extensible attributes. Include the specified parameter to set the attribute value. NIOS 5. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP failover object. Parameter Specify external primary server in IPv4 address format or grid primary server in a defined Infoblox::DHCP::Member object. and returns false when the operation fails. and returns false when the operation fails. name( ) Use this method to set or retrieve the name of a DHCP failover object.2). If you did not specify a parameter. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. Include the specified parameter to set the attribute value. primary( ) Use this method to set or retrieve primary server of a DHCP failover object.Infoblox API Documentation name . Returns If you specified a parameter. Example # search for DHCP failover object with name as peer1 my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FailOver". # search all DHCP failover associations with the extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FailOver". The name of a DHCP failover object. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. extensible_attributes => { 'Site' => 'Santa Clara' }). An IPv4 address is a 32-bit number in dotted decimal notation. name => "pe. #$member is a Infoblox::DHCP::Member object secondary( ) Use this method to set or retrieve secondary server of a DHCP failover object. comment .168. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. Parameter Specify the name in string format. Parameter Specify external secondary server in IPv4 address format or grid secondary server in a defined Infoblox::DHCP::Member object. Returns If you specified a parameter. Regular expression supported.Optional.Optional. If you did not specify a parameter.Optional. Regular expression supported.1r4 Page 34 (Rev. #Modify primary $dhcp_failover->primary($member). the method returns true when the modification succeeds.*" ). #Modify name $dhcp_failover->name("peer2"). Example #Get primary my $primary = $dhcp_failover->primary(). extensible_attributes .1. the method returns the attribute value. Example #Get name my $name = $dhcp_failover->name().

1r4 Page 35 (Rev. Returns If you specified a parameter. If you did not specify a parameter. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. the method returns the attribute value. This parameter is specified on the primary only. For email. #Modify extensible attributes $dhcp_failover->extensible_attributes({ 'Site' => 'Santa Clara'. A) . Omit the parameter to retrieve the attribute value. NIOS 5. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds.2. Include the specified parameter to set the attribute value.Infoblox API Documentation An IPv4 address is a 32-bit number in dotted decimal notation.2"). #Modify secondary $dhcp_failover->secondary("2.2. and string types. 1970 UTC. Load balancing split determines which server handles IP address requests.2). the value is a string with a maximum of 64 characters. If you did not specify a parameter. If you did not specify a parameter. For a date.168. # Modify comment $dhcp_failover->comment("add a network"). URL. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP failover object. The default value is 128. Parameter Specify the value of the maximum load balancing delay in a 8-bit integer format (range from 0 to 255). 'Tom' ] }). Returns If you specified a parameter. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. The default value is undefined. Parameter Enter a descriptive comment for the network in string format with a maximum of 256 bytes. the value is an integer from -2147483648 through 2147483647. Returns If you specified a parameter. the method returns true when the modification succeeds. Example #Get extensible attributes my $ref_extensible_attributes = $dhcp_failover->extensible_attributes(). load_balance_split( ) Use this method to set or retrieve a load balancing split value of a DHCP failover object. The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. and returns false when the operation fails. comment( ) Use this method to set or retrieve a descriptive comment about a DHCP failover object. the method returns the attribute value. and returns false when the operation fails. Example #Get secondary my $secondary = $dhcp_failover->secondary(). Include the specified parameter to set the attribute value. the value is the number of seconds that have elapsed since January 1st. For an integer. 'Administrator' => [ 'Peter'. the value is a string with a maximum of 256 characters. Example # Get comment my $comment = $dhcp_failover->comment(). the method returns the attribute value. and returns false when the operation fails.1. For a list.

Omit the parameter to retrieve the attribute value. max_unacked_updates( ) Use this method to set or retrieve the maximum number of unacked updates value of a DHCP failover object. If you did not specify a parameter. the longer it takes for the peer server to recover IP addresses after moving to the Partner Down mode. Include the specified parameter to set the attribute value. Parameter Specify the value of the maximum load balancing delay in a 32-bit integer format (range from 0 to 4294967295) that represents the duration in seconds. #Modify max_load_balance_delay $dhcp_failover->max_load_balance_delay("500"). If you did not specify a parameter. Example #Get max_load_balance_delay my $max_load_balance_delay = $dhcp_failover->max_load_balance_delay(). Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. the more load your servers experience when they are not communicating. Parameter Specify the value of the maximum client lead time in a 32-bit integer format (range from 0 to 4294967295) that represents the duration in seconds. Maximum load balancing delay specifies the cutoff after which load balancing is disabled. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. The cutoff is based on the number of seconds since the client sent its first DHCPDISCOVER or DHCPREQUEST message. A) . If you did not specify a parameter. Example #Get load_balance_split my $load_balance_split = $dhcp_failover->load_balance_split(). Returns If you specified a parameter. For instance. the method returns the attribute value. Maximum number of unacked updates value specifies how many update messages the server can send before it should receive an ACK from the failover peer. The smaller the number. and returns false when the operation fails. if one of the failover peers gets into a state where it is responding to failover messages. the method returns true when the modification succeeds. This is specified on the primary server only. #Modify load_balance_split $dhcp_failover->load_balance_split(200). The default value is 3.1r4 Page 36 (Rev. but not responding to some client requests. If no ACK is received after these messages are sent. NIOS 5. The larger the number. Maximum client lead time value specifies the length of time that a failover peer can renew a lease without contacting the other peer. The default value is 3600.Infoblox API Documentation Returns If you specified a parameter. the method returns the attribute value. and returns false when the operation fails. failover occurs. the method returns the attribute value. max_load_balance_delay( ) Use this method to set or retrieve the maximum load balancing delay value of a DHCP failover object. max_client_lead_time( ) Use this method to set or retrieve the maximum client lead time value of a DHCP failover object. the other failover peer will take over its client load automatically as the clients retry. #Modify max_client_lead_time $dhcp_failover->max_client_lead_time(600). Returns If you specified a parameter. the method returns true when the modification succeeds. Example #Get max_client_lead_time my $max_client_lead_time = $dhcp_failover->max_client_lead_time().

Returns If you specified a parameter. max_response_delay( ) Use this method to set or retrieve the maximum response delay value of a DHCP failover object. #Modify max_unacked_updates $dhcp_failover->max_unacked_updates(700). the method returns true when the modification succeeds. the method returns the attribute value. A) . Maximum response delay value before failover specifies how many seconds can transpire before the primary server assumes its peer (the secondary server) is not sending messages due to failure. Returns If you specified a parameter. and returns false when the operation fails. If you did not specify a parameter. If you did not specify a parameter. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Example #Get primary_state my $primary_state = $dhcp_failover->primary_state().1r4 Page 37 (Rev. Parameter Specify the value of the maximum response delay in a 32-bit integer format (range from 0 to 4294967295) that represents the duration in seconds. Example #Get max_unacked_updates my $max_unacked_updates = $dhcp_failover->max_unacked_updates(). recycle_leases( ) Use this method to set or retrieve the recycle leases flag of a DHCP failover object. The default value is 10. Returns If you specified a parameter. primary_state( ) Use this method to retrieve the primary server status of a DHCP failover object. the method returns the attribute value. and returns false when the operation fails. If the flag is enabled.Infoblox API Documentation Include the specified parameter to set the attribute value. the leases are kept in recycle bin until one week after expiration and when the flag is disabled. Parameter None Returns The method returns the attribute value. #Modify max_response_delay $dhcp_failover->max_response_delay(800). NIOS 5. the leases are irrecoverably deleted. the method returns true when the modification succeeds. The default value is 60. The default value for this field is undefined. Parameter Specify the value of the maximum number of unacked updates in a 32-bit integer format (range from 0 to 4294967295) that represents the number of messages. Parameter Specify "true" to set the recycle_leases flag or "false" to deactivate/unset it. Example #Get max_response_delay my $max_response_delay = $dhcp_failover->max_response_delay(). the method returns true when the modification succeeds.

0.Infoblox API Documentation If you did not specify a parameter. Infoblox::status_detail()). #Create a DHCP Member object my $memberdhcp = Infoblox::DHCP::Member->new( name => "infoblox. #Un-override recycle_leases $dhcp_failover->recycle_leases(undef). #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. secondary_state( ) Use this method to retrieve the secondary server status of a DHCP failover object. Example #Get recycle_leases my $recycle_leases = $dhcp_failover->recycle_leases(). A) . members => [ $memberdhcp ] ). #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". ":" . search. Also.2" ).2". } print "Session created successfully\n". NIOS 5. unless ($session) { die("Construct session failed: ". modify. the method returns the attribute value.localdomain". #Create the Network object with member my $network = Infoblox::DHCP::Network->new( network => "10.0/8". Infoblox::status_code() . and remove. ":" . ":" . Parameter None Returns The method returns the attribute value.1. } print "Network object created successfully\n".168. Infoblox::status_detail()). Infoblox::status_code() . SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP failover object such as add.1r4 Page 38 (Rev. ipv4addr => "192. #appliance user login password => "infoblox" #appliance password ).168. } print "DHCP Member object created successfully\n". this sample includes error handling for the operations.0. Example #Get secondary_state my $secondary_state = $dhcp_failover->secondary_state(). #appliance host ip username => "admin".1. Infoblox::status_code() . unless($network) { die("Construct Network object failed: ". use Infoblox. #Modify recycle_leases $dhcp_failover->recycle_leases("true"). unless($memberdhcp) { die("Construct member failed: ". #Preparation prior to a DHCP failover object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. comment => "add network". Infoblox::status_detail()).

} print "Get DHCP failover object found at least 1 matching entry\n".1". start_addr => "10. recycle_leases => "true". ":" . Infoblox::status_code() . ":" .1. max_unacked_updates => 10.1r4 Page 39 (Rev. $session->status_code() . load_balance_split => 128. $session->status_detail()). #Search a DHCP failover # search for DHCP failover object with name starting with letter "pe" my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FailOver". max_client_lead_time => 3600. $session->status_code() . $session->status_code() . unless ($object) { die("Get DHCP failover failed: ". max_load_balance_delay => 3. name => "peer1".10". A) .1". #Modify one of the attributes of the specified DHCP failover $object->max_client_lead_time(3500). } print "Search DHCP failover object found at least 1 matching entry\n".1. print "DHCP failover object added to the network successfully\n". ":" . unless($dhcp_range) { die("Construct DHCP Range object with failover failed: ". print "Network object added to Infoblox appliance successfully\n". #Create a DHCP failover object my $dhcp_failover = Infoblox::DHCP::FailOver->new( name => "peer1". unless($dhcp_failover) { die("Construct DHCP failover object failed: ". unless ($object) { die("Search DHCP failover failed: ". ":" . #Add a DHCP range with failover #Construct the DHCP range with failover peer1 my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10. my $object = $retrieved_objs[0]. failover_assoc => "peer1" ). secondary => "1.*" ). ). $session->status_detail()). #Get and modify a DHCP failover #Get a DHCP failover through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FailOver". ":" . print "DHCP failover object modified successfully \n". $session->status_code() . NIOS 5. Infoblox::status_detail()). $session->status_detail()). $session->status_detail()). #Add a DHCP failover object into the Infoblox appliance through a session $session->add($dhcp_failover) or die("Add DHCP failover object failed: ". name => "pe.0.0/8".0.Infoblox API Documentation $session->status_code() . $session->status_detail()).0. my $object = $retrieved_objs[0]. max_response_delay => 60. #Apply the changes $session->modify($object) or die("Modify DHCP failover failed: ". network => "10. } print "DHCP failover object created successfully\n".0. ":" .0. primary => $memberdhcp.0. ).

#submit the network object for removal $session->remove($network) or die("Remove Network failed: ".infoblox.com/ SEE ALSO Infoblox::Session. Infoblox::Session->search(). Infoblox::Session->modify(). ":" . unless ($object) { die("Get DHCP failover failed: ". $session->status_detail()). name => "peer1" ). Infoblox::DHCP::Member COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. $session->status_code() . $session->status_code() . } print "Get DHCP failover object found at least 1 matching entry\n". print "Network removed successfully \n". http://www. ":" . $session->status_code() . ":" . #submit the object for removal $session->remove($object) or die("Remove DHCP failover failed: ". my $object = $retrieved_objs[0]. A) . Infoblox::status_detail()). #Add the DHCP Range object with failover into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object with failover failed: ". Infoblox::Session->remove(). $session->status_detail()). Infoblox::Session->add(). } print "DHCP Range object with failover peer1 created successfully\n". NIOS 5. ":" . $session->status_detail()).Infoblox API Documentation Infoblox::status_code() . Infoblox::Session->get(). $session->status_detail()). $session->status_code() . #Remove a DHCP failover #Get a DHCP failover through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FailOver".1r4 Page 40 (Rev. print "DHCP Range object with failover added to the network successfully\n". ":" . print "DHCP failover object removed successfully \n".

e. The filter instructs the infoblox appliance either to grant or deny an address request if the requesting host matches the filter.DHCP MAC Address Filter object. . .1r4 Page 41 (Rev. A) .DHCP MAC Address Filter object. reserved_for_infoblox => "This is reserved for infoblox". #Submit for addition my $response = $session->add($mac_filter) Infoblox::Session->get( ) NIOS 5. }. DESCRIPTION An Infoblox appliance can filter address requests by the MAC address and/or vendor prefix (i. enforce_expiration_times => "true".. #Optional / Default is undefined reserved_for_infoblox => $string. CONSTRUCTOR my $mac_filter = Infoblox::DHCP::Filter::MAC->new( name => $string. the first 6 hexadecimal characters in MAC address) of a requesting host. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS comment( ) default_mac_address_expiration( ) enforce_expiration_times( ) extensible_attributes( ) name( ) reserved_for_infoblox( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Filter::MAC . Infoblox::Session->add( ) Use this method to add a DHCP MAC Address Filter object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.. ).. #Optional / Default is empty ).. ]. #Optional / Default is empty default_mac_address_expiration => $num. Example #Construct a DHCP MAC Address Filter object my $mac_filter = Infoblox::DHCP::Filter::MAC->new ( name => "filter_script". comment => "Created through script". SESSION METHODS This section describes all the methods in Infoblox::Session module that can be applied to a DHCP MAC Address Filter object. #Optional / Default is "true" extensible_attributes => { $string => $string | $num. #Required comment => $string. default_mac_address_expiration => "70".. #Optional / Default is 0 for never expire enforce_expiration_times => "true" | "false".Infoblox API Documentation Infoblox::DHCP::Filter::MAC . $string => [ $string | $num.

See Infoblox::Session->modify() for parameters and return values. comment . first use get() or search() to retrieve the specific DHCP MAC Address Filter object. name => "filter_script".Name of the MAC Address Filter (regular expression). Infoblox::Session->search( ) Use this method to search for DHCP MAC Address Filter objects in the Infoblox appliance. name => "filter_script". then submit this object for removal.Optional.1r4 Page 42 (Rev. Key References Apply the following attributes to search for a specific DHCP MAC Address Filter object: name . Key References Apply the following attributes to get a specific DHCP MAC Address Filter object: name . extensible_attributes . A) . Example #Get DHCP MAC Address Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MAC". extensible_attributes . Infoblox::Session->modify( ) Use this method to modify a DHCP MAC Address Filter object in the Infoblox appliance. ). Either name or comment must be specified. See Infoblox::Session->remove() for parameters and return values.*". #Submit modification my $response = $session->modify( $mac_filter ).Optional. A hash reference containing extensible attributes. my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::MAC". my $desired_mac_filter = $retrieved_objs[0]. Example #Use method to modify the default_mac_address_expiration $mac_filter->default_mac_address_expiration("1234"). See Infoblox::Session->get() for parameters and return values. Infoblox::Session->remove( ) Use this method to remove a DHCP MAC Address Filter object from the Infoblox appliance. Example #Get DHCP MAC Address Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MAC". A hash reference containing extensible attributes. name => "filter. extensible_attributes => { 'Site' => 'Santa Clara' } ). ). #Find the desired object from the retrieved list.Infoblox API Documentation Use this method to retrieve all the matching objects from the Infoblox appliance. ).Comment string for the MAC Address Filter (regular expression). Name of the MAC Address Filter. NIOS 5. Example # search for all DHCP MAC Address Filter objects whose name starts with "filter". To remove a specific object. # get all objects with a given extensible attribute my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MAC". #Submit for removal my $response = $session->remove( $desired_mac_filter ). See Infoblox::Session->search() for parameters and return values.Required.

A) . The minimum value is 60 secs (1 min). Determines whether lease requests will be denied from expired MAC Addresses. comment => "user1. the method returns true when the modification succeeds. and returns false when the operation fails. it is the absolute interval when the MAC address filter expires. and returns false when the operation fails. #Modify default_mac_address_expiration $mac_filter->default_mac_address_expiration("1234"). default_mac_address_expiration( ) Use this method to set or retrieve the default mac address expiration time of a DHCP MAC Address Filter object. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. METHODS This section describes all the methods that can be used to set and retrieve the attribute values of a DHCP MAC Address Filter object. the method returns the attribute value. The maximum value can extend up to 4294967295 secs.*".1r4 Page 43 (Rev. the method returns true when the modification succeeds. If you did not specify a parameter. ). NIOS 5. and returns false when the operation fails. extensible_attributes => { 'Site' => 'Santa Clara' }). Parameter Desired comment in string format with a maximum of 256 bytes. my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::MAC". Returns If you specified a parameter. Parameter By default. Returns If you specified a parameter. If you did not specify a parameter. Returns If you specified a parameter. #Modify comment $mac_filter->comment("Modified DHCP MAC Address Filter comment"). Include the specified parameter to set the attribute value. Example #Get default_mac_address_expiration my $default_mac_address_expiration = $mac_filter->default_mac_address_expiration(). Parameter Specify "true" to set the expired flag or "false" to deactivate/unset it. the method returns the attribute value. the MAC address filter never expires. Example #Get comment my $comment = $mac_filter->comment(). the method returns true when the modification succeeds. Default value is "true". Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. otherwise.Infoblox API Documentation # search for all DHCP MAC Address Filter objects whose comment starts with "user1". enforce_expiration_times( ) Use this method to set or retrieve the enforce_expiration_times flag of a DHCP MAC Address Filter object. Include the specified parameter to set the attribute value. comment( ) Use this method to set or retrieve a descriptive comment of a DHCP MAC Address Filter object. # search all DHCP MAC Address Filter associations with the extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::MAC".

Example #Get enforce_expiration_times my $enforce_expiration_times = $mac_filter->enforce_expiration_times(). Returns If you specified a parameter. the value is the number of seconds that have elapsed since January 1st. For a list. Include the specified parameter to set the attribute value. Returns If you specified a parameter. Example #Get extensible attributes my $ref_extensible_attributes = $mac_filter->extensible_attributes(). the method returns true when the modification succeeds. the method returns the attribute value. Example #Get reserved_for_infoblox NIOS 5.Infoblox API Documentation If you did not specify a parameter. Parameter Name of the DHCP MAC Address filter. For an integer. The default value is undefined. and returns false when the operation fails. the method returns the attribute value. and string types. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. and returns false when the operation fails. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP MAC Address Filter object. If you did not specify a parameter. The length of comment cannot exceed 1024 bytes long. reserved_for_infoblox( ) Set this flag to reserve the MAC address filter for an Infoblox appliance. #Modify name $mac_filter->name("filter1"). Maximum length up to 1024 bytes is supported. the value is an integer from -2147483648 through 2147483647. Parameter Reserved to write comment related to this particular MAC address filter. the value is a string with a maximum of 64 characters. For email. the value is a string with a maximum of 256 characters. A) . URL. name( ) Use this method to set or retrieve the name of a DHCP MAC Address Filter object. For a date. and returns false when the operation fails. the method returns the attribute value. #Modify enforce_expiration_times $mac_filter->enforce_expiration_times("false"). The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. the method returns true when the modification succeeds. Returns If you specified a parameter. the method returns the attribute value. 1970 UTC. 'Administrator' => [ 'Peter'. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. 'Tom' ] }). Example #Get name my $name = $mac_filter->name().1r4 Page 44 (Rev. If you did not specify a parameter. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. #Modify extensible attributes $mac_filter->extensible_attributes({ 'Site' => 'Santa Clara'.

":" . ":" . name => "script_filter" ). comment => "Create through script". this sample includes error handling for the operations.2". reserved_for_infoblox => "This is reserved for infoblox". NIOS 5.168. Infoblox::status_detail()). unless($mac_filter) { die("Construct mac address filter failed: ". #Preparation prior to a DHCP MAC Address Filter object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. unless ($session) { die("Construct session failed: ". ":" . } print "Search MAC Address Filter object found at least 1 matching entry\n". Infoblox::status_detail()). safe to add the mac address filter\n". name => "script_filter"). A) . unless ($object) { print "Mac address filter does not exist on server. modify. and remove. #Modify reserved_for_infoblox $mac_filter->reserved_for_infoblox("reserved for Infoblox"). my $object = $retrieved_objs[0]. $session->status_code() . enforce_expiration_times => "true". #Create a DHCP MAC Address Filter object #Create a DHCP MAC Address Filter object my $mac_filter = Infoblox::DHCP::Filter::MAC->new ( name => "script_filter". $session->status_detail()). #Get and modify a MAC Address Filter object #Get MAC Address Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MAC". #appliance host ip username => "admin".1. Infoblox::status_code() . $session->status_code() .1r4 Page 45 (Rev. #Verify if the DHCP MAC Address Filter exists in the Infoblox appliance my $object = $session->get(object => "Infoblox::DHCP::Filter::MAC". $session->status_detail()). #Search for a specific DHCP MAC Address Filter object #Search for all DHCP MAC address filter objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::MAC".*" ). ":" . use Infoblox. unless ($object) { die("Search for MAC Address Filter object failed: ". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. #appliance user login password => "infoblox" #appliance password ). search. Also.Infoblox API Documentation my $reserved_for_infoblox = $mac_filter->reserved_for_infoblox(). $session->add($mac_filter) or die("Add mac address filter failed: ". ). #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. name => ". default_mac_address_expiration => "70". } print "DHCP MAC Address Filter added successfully\n". } print "MAC Address Filter object created successfully\n". } print "Session created successfully\n". Infoblox::status_code() .

#Modify one of the attributes of the obtained MAC Address Filter object $object->default_mac_address_expiration("1234").com/ SEE ALSO Infoblox::DHCP::MAC. print "MAC Address Filter object removed successfully \n". Infoblox::DHCP::Lease. $session->status_detail()). ":" . } print "Get MAC Address Filter object found at least 1 matching entry\n". ":" . #Apply the changes $session->modify($object) or die("Modify MAC Address Filter object failed: ".1r4 Page 46 (Rev.Infoblox::Session->search(). Infoblox::DHCP::Filter::RelayAgent. $session->status_code() . ). A) . $session->status_detail()). } print "Get MAC Address Filter object found at least 1 matching entry\n". unless ($object) { die("Get MAC Address Filter object failed: ". unless ($object) { die("Get MAC Address Filter object failed: ". print "MAC Address Filter object modified successfully \n". $session->status_code() . ####PROGRAM ENDS#### AUTHOR Infoblox Inc. http://www.infoblox. NIOS 5. #Remove a MAC Address Filter object #Get MAC Address Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MAC". ":" . $session->status_code() . #Submit the object for removal $session->remove($object) or die("Remove MAC Address Filter object failed: ". Infoblox::Session. $session->status_code() .Infoblox::Session>get().Infoblox API Documentation my $object = $retrieved_objs[0]. ":" . $session->status_detail()). name => "script_filter".Infoblox::Session->modify(). my $object = $retrieved_objs[0].Infoblox::Session->remove() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. $session->status_detail()).

CONSTRUCTOR my $match_rule = Infoblox::DHCP::Filter::MatchRule->new ( filter => $string. To define a match rule. Infoblox::Session->add( ) Use this method to add an object to the Infoblox appliance. #Optional / Default is "false" reserved_for_infoblox => $string. value => $num | $string |"true"|"false". # Submit for addition NIOS 5.DHCP Option Filter MatchRule object. #Required. name => "vendor-class-identifier". DESCRIPTION A MatchRule defines the (option. value => "solaris-i86pc" ). #Optional . SESSION METHODS This section describes all the methods in Infoblox::Session module that can be applied to a DHCP Option Filter MatchRule object. Example #Construct an object my $match_rule = Infoblox::DHCP::Filter::MatchRule->new ( filter => "filter1". #Optional / Default is empty substring_length => $string. A) . #Optional / Default is empty ). #Required name => $string. #Optional / Default is empty num => $num.1r4 Page 47 (Rev. add MatchRule to the DHCP Filter object. it is the matched if statement within the class declaration.One of name or num must be specified / Default is undefined comment => $string. #Optional / Default is empty substring_offset => $string.Infoblox API Documentation Infoblox::DHCP::Filter::MatchRule . #Optional . In the ISC DHCP terms. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS filter( ) name( ) comment( ) num( ) is_substring( ) reserved_for_infoblox( ) substring_offset( ) substring_length( ) value( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Filter::MatchRule . See Infoblox::Session->add() for parameters and return values.One of name or num must be specified / Default is undefined is_substring => "true" | "false". value) pair match rule for an option filter.DHCP Option Filter MatchRule object.

A filter name in string format (regular expression). NIOS 5. Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. filter => "filter1". Example # Use method to modify the value. name => "vendor-class-identifier". value => "solaris-i86pc"). Optional . Infoblox::Session->search( ) Use this method to search for DHCP Filter::MatchRule objects in the Infoblox appliance. Example my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MatchRule". # Find the desired object from the retrieved list. my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::MatchRule". and then submit this object for removal. filter => "f*" ). Infoblox::Session->modify( ) Use this method to modify an object in the Infoblox appliance. filter => "filter1". value => "solaris"). A) . # Submit for removal my $response = $session->remove( $desired_match_rule ).1r4 Page 48 (Rev. A filter name in string format.Infoblox API Documentation my $response = $session->add( $match_rule ). See Infoblox::Session->search() for parameters and return values.Required. Infoblox::Session->remove( ) Use this method to submit to remove an object from the Infoblox appliance. Optional. A match option name or code in string format. value . my $desired_match_rule = $retrieved_objs[0]. # search for all DHCP Filter::MatchRule objects. See Infoblox::Session->modify() for parameters and return values.Required. Key References Apply the following attributes to search for a DHCP Filter MatchRule object: filter name/num value comment Example - Required. $match_rule->value("solaris"). Optional. See Infoblox::Session->remove() for parameters and return values. num => "60". See Infoblox::Session->get() for parameters and return values. To remove a specifc object. A comment in string format (regular expression). Example # Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MatchRule". A match option value in string format. Key References Apply the following attributes to get a specific DHCP Filter MatchRule object: filter . first use get() to retrieve the specific object. name/num . A match option name or code in string format (regular expression if name). A match option value in string format. # Submit modification my $response = $session->modify( $match_rule ).Required.

Example #Get comment my $comment = $match_rule->comment(). Omit the parameter to retrieve the attribute value. Parameter Desired comment in string format with a maximum of 256 bytes. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. #Modify filter $match_rule->filter("filter2").Infoblox API Documentation METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of an Option Filter MatchRule. #Modify name $match_rule->name(dhcp-client-identifier). the method returns true when the modification succeeds. Parameter Desired filter name in string format. Example #Get name my $match_name = $match_rule->name(). Example #Get filter my $filter = $match_rule->filter(). and returns false when the operation fails. filter( ) Use this method to set or retrieve filter name of a match rule. #Modify comment $match_rule->comment("Modified DHCP matchrule filter object comment"). num( ) Use this method to set or retrieve the match option code of a match rule. the method returns the attribute value. Returns If you specified a parameter. Parameter Desired match option name in string format. and returns false when the operation fails. Include the specified parameter to set the attribute value. comment( ) Use this method to set or retrieve the descriptive comment of a DHCP matchrule filter object. the method returns true when the modification succeeds. If you did not specify a parameter.1r4 Page 49 (Rev. A) . the method returns the attribute value. name( ) Use this method to set or retrieve the match option name of a match rule. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. NIOS 5. Include the specified parameter to set the attribute value. If you did not specify a parameter. and returns false when the operation fails. the method returns true when the modification succeeds. the method returns the attribute value. If you did not specify a parameter. parameter to retrieve the attribute value. Returns If you specified a parameter.

NIOS 5. Parameter Boolean values "true" or "false". Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. Returns If you specified a parameter. Example #Get num my $match_num = $match_rule->num(). and returns false when the operation fails. reserved_for_infoblox( ) Use this method to set or retrieve the reserved_for_infoblox value of a match rule. A) .Infoblox API Documentation Parameter Desired match option code in string format. If you did not specify a parameter. the method returns true when the modification succeeds. the method returns true when the modification succeeds. #Modify num $match_rule->num("77"). Returns If you specified a parameter. Returns If you specified a parameter. #Modify reserved_for_infoblox $match_rule->reserved_for_infoblox("reserved for Infoblox"). substring_offset( ) Use this method to set or retrieve the substring_offset value of a match rule. Parameter Reserved to write comment related to this particular option match rule filter. and returns false when the operation fails. the method returns the attribute value Example #Get reserved_for_infoblox my $reserved_for_infoblox = $match_rule->reserved_for_infoblox(). Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. #Modify is_substring $match_rule->is_substring("true"). If you did not specify a parameter. Parameter Desired substring offset number in string format. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. The default value is "false". the method returns the attribute value. and returns false when the operation fails. The length of comment cannot exceed 1024 bytes long. the method returns true when the modification succeeds. Returns If you specified a parameter.1r4 Page 50 (Rev. is_substring( ) Use this method to set or retrieve the is_substring value of a match rule. the method returns the attribute value Example #Get is_substring my $is_substring = $match_rule->is_substring(). Include the specified parameter to set the attribute value.

the method returns true when the modification succeeds. Returns If you specified a parameter. . a-f. .Specify IPV4 address.Specify the value in ASCII text string or a list of hexadecimal characters (0-9.Specify the numeric value between 0 and 255. Example . NIOS 5.1r4 Page 51 (Rev. Include the specified parameter to set the attribute value. "ipv4addrs" "string" separated by colons. An IPv4 address is a 32-bit number in dotted It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.Specify the numeric value between -2147483648 and 2147483647. and returns false when the operation fails. the method returns the attribute value. the method returns the attribute value. Example #Get substring_offset my $offset = $match_rule->substring_offset().Specify the numeric value between 0 and 4294967295. "32-bit unsigned integer" . and returns false when the operation fails.1. If you did not specify a parameter.Specify the numeric value between -128 and 127. A) . the method returns the attribute value. Omit the parameter to retrieve the attribute value. #Modify value $match_rule->value("solaris-i86pc"). the method returns true when the modification succeeds. #Modify substring_length $match_rule->substring_length("9"). #Get value my $value = $match_rule->value().Specify the value in array reference that contains IPv4 addresses. . Include the specified parameter to set the attribute value. value( ) Use this method to set or retrieve the value of the DHCP filter rule.Specify the value in ASCII text string. Parameter Specify the value of the DHCP filter rule based on the name of the DHCP option.Infoblox API Documentation If you did not specify a parameter. .2). Parameter Desired substring length number in string format. .Specify the numeric value between 0 and 65535. Example #Get substring_length my $substring_length = $match_rule->substring_length(). Valid values are "boolean" "ipv4addr" decimal notation.Specify the numeric value between -32768 and 32767. #Modify substring_offset $match_rule->substring_offset("2"). If you did not specify a parameter. substring_length( ) Use this method to set or retrieve the substring_length value of a match rule. or A-F) without spaces and . 168.Specify "true" or "false" for boolean values. "text" "8-bit unsigned integer" . "16-bit unsigned integer" . Omit the parameter to retrieve the attribute value. "8-bit signed integer" "16-bit signed integer" "32-bit signed integer" Returns If you specified a parameter. .

$session->status_detail()). username => "admin". unless ($match_rule) { die("Construct DHCP Filter::MatchRule failed: ". #Add the filter rule option object into the Infoblox appliance> $session->add($option_filter) or die("Add option Filter object failed: ". ).1. print "DHCP Filter::MatchRule object added to server successfully\n". Infoblox::status_detail()). option_list => [$opt1]. unless($option_filter) { die("Construct option Filter object failed: ". value => "255. my $opt1 = Infoblox::DHCP::Option->new( name => "user-class" . Infoblox::status_detail()). #Create a session to the Infoblox Appliance my $session = Infoblox::Session->new( master => "192. ":" .0.0. name => "subnet-mask". ":" . ":" . use Infoblox. this sample also includes error handling for the operations.2". $session->status_code() . modify.168. password => "infoblox" ).0".1r4 Page 52 (Rev. $session->status_detail()). #Create a DHCP Filter::MatchRule #Construct a DHCP Filter::MatchRule object my $match_rule = Infoblox::DHCP::Filter::MatchRule->new( filter => "filter1". ":" . #Preparation prior to a DHCP Filter::MatchRule insertion #PROGRAM STARTS: Include all the modules that will be used use strict. $session->status_code() . #Get and modify a DHCP Filter::MatchRule #Get Filter::MatchRule through the session NIOS 5. $session->status_code() . search and remove. # Add the DHCP Filter::MatchRule object to Infoblox DHCPone appliance through a session $session->add($match_rule) or die("Add Filter::MatchRule failed: ". Infoblox::status_code() . ). unless ($session) { die("Construct session failed: ". print "Option Filter object added to Infoblox appliance successfully\n". #Create the Option Filter object my $option_filter = Infoblox::DHCP::Filter::Option->new( name => 'filter1' . } print "Option Filter object created successfully\n". $session->status_detail()). get. A) . } print "DHCP Filter::MatchRule object created successfully\n". ":" . } print "Session created successfully\n".Infoblox API Documentation SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. value => "77" ). Infoblox::status_code() . Also.

Infoblox::Session->add(). $session->status_code() . #Apply the changes $session->modify($object) or die("Modify Filter::MatchRule failed: ". filter => "filter1". A) .255. unless ($object) { die("Get Filter::MatchRule failed: ".1r4 Page 53 (Rev. #Search for match rule filter my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::MatchRule". unless ($object) { die("Get Filter::MatchRule failed: ".com/ SEE ALSO Infoblox::Session. my $object = $retrieved_objs[0]. } print "Get DHCP Filter::MatchRule object found at least 1 matching entry\n". $session->status_code() .0. #Modify one of the attributes of the specified Filter::MatchRule $object->value("255. $session->status_code() .0. } print "Get DHCP Filter::MatchRule object found at least 1 matching entry\n". name => "subnet-mask" ).255. http://www. $session->status_detail()). my $object = $retrieved_objs[0]. print "DHCP Filter::MatchRule object modified successfully \n". unless ($object) { die("Search MatchRule filter failed: ".0". $session->status_detail()). Infoblox::Session->modify() NIOS 5. print "DHCP Filter::MatchRule object removed successfully \n". ":" . ). ":" .0". Infoblox::Session->search().0. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. $session->status_detail()). my $object = $retrieved_objs[0]. name => "subnet-mask". value => "255. value => "255. Infoblox::Session->remove(). } print "Search MatchRule Filter object found at least 1 matching entry\n". ":" . ).infoblox. name => "subnet-mask". $session->status_detail()). filter => "filter1".0.0"). #Remove a DHCP Filter::MatchRule #Get Filter::MatchRule through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MatchRule". ":" . $session->status_detail()). $session->status_code() . Infoblox::Session->get(). ":" . $session->status_code() .Infoblox API Documentation my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::MatchRule". #Submit the object for removal $session->remove($object) or die("Remove Filter::MatchRule failed: ".

Infoblox API Documentation COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.1r4 Page 54 (Rev. NIOS 5. A) .

#Submit for addition my $response = $session->add($nac_filter) Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. the appliance receives authentication responses from NAC authentication servers.Optional. A) . See Infoblox::Session->add() for parameters and return values. extensible_attributes .DHCP NAC Filter object.ComplianceState="PartialCompliant"'. ). Example #Construct a DHCP NAC Filter object my $nac_filter = Infoblox::DHCP::Filter::NAC->new ( name => "filter_script".Infoblox API Documentation Infoblox::DHCP::Filter::NAC . NIOS 5. Infoblox::Session->add( ) Use this method to add a DHCP NAC Filter object to the Infoblox appliance. DESCRIPTION If NAC authentication is configured. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS comment( ) expression( ) name( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Filter::NAC .Required. comment => "Created through script". Name of the NAC Filter.1r4 Page 55 (Rev. expression => $string. CONSTRUCTOR my $nac_filter = Infoblox::DHCP::Filter::NAC->new( name => $string. and it grants or denies a lease request if the authentication response matches conditions defined by the NAC filters. See Infoblox::Session->get() for parameters and return values. comment => $string. A hash reference containing extensible attributes. expression => 'Sophos.DHCP NAC Filter object. ). #Required #Optional / Default is empty #Optional / Default is empty SESSION METHODS This section describes all the methods in the Infoblox::Session module that can be applied to a DHCP NAC Filter object. Key References Apply the following attributes to get a specific DHCP NAC Filter object: name .

Infoblox API Documentation Example #Get DHCP NAC Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::NAC". Infoblox::Session->modify( ) Use this method to modify a DHCP NAC Filter object in the Infoblox appliance. extensible_attributes => { 'Site' => 'Santa Clara' } ). A hash reference that contains extensible attributes.Comment string for the NAC filter (regular expression). See Infoblox::Session->modify() for parameters and return values. #Submit for removal my $response = $session->remove( $desired_nac_filter ).*". comment => "user1. name => "filter_script". Infoblox::Session->remove( ) Use this method to remove a DHCP NAC Filter object from the Infoblox appliance.1r4 Page 56 (Rev. Key References Apply the following attributes to search for a specific DHCP NAC Filter object: name . # search all DHCP NAC Filter associations with the extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::NAC". # search for all DHCP NAC Filter objects whose comment starts with "user1". name => "filter. comment . my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::NAC". #Find the desired object from the retrieved list. See Infoblox::Session->remove() for parameters and return values. ). A) . NIOS 5. To remove a specific object. name => "filter_script". Either a name or comment must be specified. first use get() or search() to retrieve the specific DHCP NAC Filter object. See Infoblox::Session->search() for parameters and return values. Example # search for all DHCP NAC Filter objects whose name starts with "filter". Example #Use method to modify the default_nac_address_expiration $nac_filter->comment("modified comment"). # get all objects with a given extensible attribute my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::NAC".*".Name of the NAC filter (regular expression). Infoblox::Session->search( ) Use this method to search for DHCP NAC Filter objects in the Infoblox appliance. ). Example #Get DHCP NAC Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::NAC". ).Optional. #Submit modification my $response = $session->modify( $nac_filter ). my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::NAC". ). my $desired_nac_filter = $retrieved_objs[0]. extensible_attributes . then submit this object for removal.

Include the specified parameter to set the attribute value. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. the method returns the attribute value. with a maximum of 4096 characters. The maximum length supported is 1024 bytes. with a maximum of 256 bytes. The expression must comply with the NAC filter expression syntax. #Modifying expression $nac_filter->expression('Sophos. the method returns the attribute value. Parameter The name of the DHCP NAC filter. A) .ComplianceState="PartialCompliant"'). If you did not specify a parameter. Parameter Desired comment in string format. expression( ) Use this method to set or retrieve the conditional expression of a DHCP NAC Filter object. the method returns the attribute value.Infoblox API Documentation extensible_attributes => { 'Site' => 'Santa Clara' }).1r4 Page 57 (Rev. the method returns true when the modification succeeds. Example #Getting expression my $expression = $nac_filter->expression( ). comment( ) Use this method to set or retrieve a descriptive comment of a DHCP NAC Filter object. and returns false when the operation fails. METHODS This section describes all the methods that can be used to set and retrieve the attribute values of a DHCP NAC Filter object. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. #Modify comment $nac_filter->comment("Modified DHCP NAC Filter comment"). Example #Get name my $name = $nac_filter->name(). and returns false when the operation fails. If you did not specify a parameter. NIOS 5. name( ) Use this method to set or retrieve the name of a DHCP NAC Filter object. #Modify name $nac_filter->name("filter1"). and returns false when the operation fails. Include the specified parameter to set the attribute value. Parameter An expression in string format. Include the specified parameter to set the attribute value. Example #Get comment my $comment = $nac_filter->comment(). Returns If you specified a parameter. Returns If you specified a parameter. the method returns true when the modification succeeds. Returns If you specified a parameter.

#Get and modify a NAC Filter object #Get a NAC Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::NAC".168. } print "DHCP NAC Filter added successfully\n".Infoblox API Documentation SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. ":" . $session->status_detail()). NIOS 5. modify. this sample includes error handling for the operations. my $object = $retrieved_objs[0]. safe to add the nac filter\n". ":" . } print "NAC Filter object created successfully\n". ":" . unless ($session) { die("Construct session failed: ". use Infoblox. ":" . #appliance host ip username => "admin". #Create a DHCP NAC Filter object #Create a DHCP NAC Filter object my $nac_filter = Infoblox::DHCP::Filter::NAC->new ( name => "script_filter". } print "Session created successfully\n". $session->status_code() . A) . #Preparation prior to a DHCP NAC Filter object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. #Search for a specific DHCP NAC Filter object #Search for all DHCP NAC filter objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::NAC". expression => 'Sophos.1r4 Page 58 (Rev. Infoblox::status_detail()). unless($nac_filter) { die("Construct nac filter failed: ". $session->status_code() . Also. Infoblox::status_detail()). $session->add($nac_filter) or die("Add nac filter failed: ". name => "script_filter" ).2".1. $session->status_detail()). #Verify if the DHCP NAC Filter exists in the Infoblox appliance my $object = $session->get(object => "Infoblox::DHCP::Filter::NAC".*" ). #appliance user login password => "infoblox" #appliance password ). name => "script_filter"). Infoblox::status_code() . comment => "Create through script". my $object = $retrieved_objs[0]. } print "Search NAC Filter object found at least 1 matching entry\n". Infoblox::status_code() . $session->status_detail()). name => ". $session->status_code() .ComplianceState="PartialCompliant"'. ). unless ($object) { die("Search for NAC Filter object failed: ". ":" . #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. and remove. unless ($object) { print "nac filter does not exist on server. } print "Get NAC Filter object found at least 1 matching entry\n". search. unless ($object) { die("Get NAC Filter object failed: ".

} print "Get NAC Filter object found at least 1 matching entry\n". ). Infoblox::DHCP::Lease. $session->status_detail()). $session->status_code() . #Apply the changes $session->modify($object) or die("Modify NAC Filter object failed: ". ####PROGRAM ENDS#### AUTHOR Infoblox Inc.com/ SEE ALSO Infoblox::DHCP::Filter::RelayAgent. $session->status_detail()).Infoblox::Session->remove() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.1r4 Page 59 (Rev. Infoblox::Session. ":" . #Submit the object for removal $session->remove($object) or die("Remove NAC Filter object failed: ".infoblox.Infoblox::Session->get(). name => "script_filter". ":" . ":" . my $object = $retrieved_objs[0].Infoblox API Documentation #Modify one of the attributes of the obtained NAC Filter object $object->comment("Modified comment"). NIOS 5. $session->status_code() . A) . $session->status_code() . print "NAC Filter object removed successfully \n". #Remove a NAC Filter object #Get a NAC Filter object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::NAC". unless ($object) { die("Get NAC Filter object failed: ". print "NAC Filter object modified successfully \n".Infoblox::Session->modify(). http://www.Infoblox::Session>search(). $session->status_detail()).

].. . See Infoblox::Session->add() for parameters and return values. SESSION METHODS This section describes all the methods in Infoblox::Session module that can be applied to a DHCP filter option object.DHCP filter option object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS name( ) boot_file( ) boot_server( ) comment( ) extensible_attributes( ) lease_time( ) next_server( ) option_list( ) option_space( ) pxe_lease_time( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Filter::Option . value) pair. #Optional / Default is empty next_server => $fqdn | undef.DHCP filter option object DESCRIPTION A Filter::Option defines a DHCP option filter. NIOS 5. #Optional / Default is empty boot_file => $filename | undef. In the ISC DHCP terms. it defines a class of clients that match a particular (option. }.. #Optional / Default is undefined option_list => [$Option1. #Optional / Default is empty ). To define an option filter. ]. $Option2. CONSTRUCTOR my $optionFilter = Infoblox::DHCP::Filter::Option->new( name => $string. Infoblox::Session->add( ) Use this method to add a DHCP filter option object to the Infoblox device... #Optional / Default is undefined extensible_attributes => { $string => $string | $num. add Option to the DHCP Filter object. #Optional / Default is undefined lease_time => $time. Example #Construct an object my $optionFilter = Infoblox::DHCP::Filter::Option->new( name => "option_filter". #Optional / Default is undefined boot_server => $fqdn | undef. #Optional / Default is empty option_space => $string. #Optional / Default is "DHCP" pxe_lease_time => $time.1r4 Page 60 (Rev.. $string => [ $string | $num. . #Required comment => $string.Infoblox API Documentation Infoblox::DHCP::Filter::Option .. A) ..

See Infoblox::Session->modify() for parameters and return values. Infoblox::Session->remove( ) Use this method to remove a DHCP option filter object from the Infoblox device. Key References Apply the following attributes to search for a DHCP Network object: name .Optional. my $desired_obj = $retrieved_objs[0]. extensible_attributes => { 'Site' => 'Santa Clara' } ).Optional . See Infoblox::Session->get() for parameters and return values. Infoblox::Session->search( ) Use this method to search for DHCP option filter object in the Infoblox device. Infoblox::Session->get( ) Use this method to retrieve all the matching DHCP option filter objects from the Infoblox device. # get all objects with a given extensible attribute my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::Option". See Infoblox::Session->remove() for parameters and return values. first use get() or search() to retrieve the specific object. # Submit for removal my $response = $session->remove( $desired_obj). Example my ). A comment in string format (regular expression). An option filter name in string format. name => "option_filter". Example #Use method to modify boot_server method. @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::Option" . ). To remove a specifc object. # Submit modification my $response = $session->modify( $object ). A) . extensible_attributes . "name" => "option_filter".Required. Example NIOS 5. An option filter name in string format (regular expression). See Infoblox::Session->search() for parameters and return values. $object->boot_server("myboot_server. comment . # find the desired object from retrieved list. Infoblox::Session->modify( ) Use this method to modify a DHCP option filter object in the Infoblox device. extensible_attributes .Optional. Example # Get the object under the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::Option" .com"). and then submit this object for removal. A hash reference containing extensible attributes.1r4 Page 61 (Rev. Key References Apply the following attributes to get a specific DHCP relayagent filter object: name .Infoblox API Documentation ).Required. # Submit for adding a option Filter my $response = $session->add( $optionFilter ). A hash reference containing extensible attributes.

Include the specified parameter to set the attribute value. ). Omit the parameter to retrieve the attribute value. # search all DHCP option filter associations with the extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::Option". Omit the parameter to retrieve the attribute value. Parameter Specify the name in string format. A boot server name can have a maximum of 256 bytes. the method returns the attribute value. The default value for this field is empty. NIOS 5. Include the specified parameter to set the attribute value. The FQDN consists of the host name followed by the domain name (example: abc. the method returns the attribute value. Parameter The name of the file that the client must download. If you did not specify a parameter. Include the specified parameter to set the attribute value. If this attribute is not set. Omit the parameter to retrieve the attribute value. If this attribute is not set. Example # Get boot_file my $boot_file = $optionFilter->boot_file().Infoblox API Documentation # search for all DHCP option filter objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::Option". the method returns true when the modification succeeds. You can specify the name and/or IP address of the boot server that host needs to boot. If you did not specify a parameter. boot_server( ) Use this method to set or retrieve a bootserver attribute of a DHCP filter option object. A) . extensible_attributes => { 'Site' => 'Santa Clara' }). Returns If you specified a parameter. it will inherit the member level setting. name => "option.1r4 Page 62 (Rev. # Modify boot_file $optionFilter->boot_file("bootfile1"). boot_file( ) Use this method to set or retrieve a boot_file attribute of a DHCP filter option object. and returns false when the operation fails.com). METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of DHCP option filter object name( ) Use this method to set or retrieve the name of a DHCP option filter object. Parameter The boot server IP address or name in FQDN (Fully Qualified Domain Name) format. the method returns true when the modification succeeds. Example # Get name my $name = $optionFilter->name(). it will inherit the member level setting. Returns If you specified a parameter. #Un-override boot_file $optionFilter->boot_file(undef). #Modify name $optionFilter->name("option_filter").*". and returns false when the operation fails. The default value is undefined.

NIOS 5. Example # Get boot_server my $bootserver = $optionFilter->bootserver(). Omit the parameter to retrieve the attribute value. the method returns the attribute value. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. If you did not specify a parameter. #Modify extensible attributes $optionFilter->extensible_attributes({ 'Site' => 'Santa Clara'. Omit the parameter to retrieve the attribute value. the method returns the attribute value. 'Tom' ] }). and returns false when the operation fails. Example #Get comment my $comment = $optionFilter->comment(). #Un-override boot_server $optionFilter->boot_server(undef). #Modify comment $optionFilter->comment("Modified DHCP filter option object comment"). Include the specified parameter to set the attribute value. URL. Returns If you specified a parameter. 'Administrator' => [ 'Peter'. Parameter Desired comment in string format with a maximum of 256 bytes. the value is a string with a maximum of 256 characters. the value is an integer from -2147483648 through 2147483647. the method returns the attribute value.Infoblox API Documentation Returns If you specified a parameter. the value is a string with a maximum of 64 characters. Returns If you specified a parameter. lease_time( ) Use this method to set or retrieve a lease_time attribute of a DHCP filter option object. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. Include the specified parameter to set the attribute value.domain.com"). Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. For a date. and returns false when the operation fails. and string types. If you did not specify a parameter. The default value is undefined. Returns If you specified a parameter. the method returns true when the modification succeeds. Example #Get extensible attributes my $ref_extensible_attributes = $optionFilter->extensible_attributes(). 1970 UTC. and returns false when the operation fails. For email. and returns false when the operation fails. For an integer. the method returns true when the modification succeeds. # Modify boot_server $optionFilter->boot_server("abc. A) .1r4 Page 63 (Rev. the method returns true when the modification succeeds. the value is the number of seconds that have elapsed since January 1st. Parameter Enter appropriate values in seconds. comment( ) Use this method to set or retrieve the descriptive comment of a DHCP filter option object. For a list. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP Filter Option object.

#Modify option_list $optionFilter->option_list([$option1]). The next server name can have a maximum of 256 bytes. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. # Modify lease_time $optionFilter->lease_time("7200"). the method returns true when the modification succeeds. the method returns the attribute value. Example NIOS 5.1r4 Page 64 (Rev. Option list describe filter option configuration settings and various services. A) . and returns false when the operation fails.Infoblox API Documentation If you did not specify a parameter. # Modify next_server $optionFilter->next_server("blue. If you did not specify a parameter. #Un-override next_server $optionFilter->next_server(undef). If you did not specify a parameter. option_list( ) Use this method to set or retrieve the option_list of a DHCP filter option object. Include the specified parameter to set the attribute value. and returns false when the operation fails. If you did not specify a parameter. Example # Get next_server my $nextserver = $optionFilter->next_server(). the method returns the attribute value. If this attribute is not set. Example # Get lease_time my $lease_time = $optionFilter->lease_time(). the method returns true when the modification succeeds. the method returns the attribute value. You can specify the name and/or IP address of the next server that the host needs to boot. Example #Get option_list my $options = $optionFilter->option_list(). Returns If you specified a parameter. and returns false when the operation fails. next_server( ) Use this method to set or retrieve a next_server attribute of a DHCP filter option object. it will inherit the member level setting. Parameter Specify the option space value in string format.domain. The FQDN consists of the host name followed by the domain name (example: abc. the method returns the attribute value.com"). Omit the parameter to retrieve the attribute value.com). Include the specified parameter to set the attribute value. option_space( ) Use this method to retrieve the option_space of a DHCP filter option object. Include the specified parameter to set the attribute value. The default value of option_space is DHCP. Returns If you specified a parameter. Parameter The valid value is an array reference that contains Infoblox::DHCP::Option objects. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. The default value is undefined. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value.

Infoblox::status_detail()). "file1" . SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. search. #Create a session to the Infoblox device my $session = Infoblox::Session->new( master => "192. pxe_lease_time( ) Use this method to set or retrieve a pxe_lease_time attribute of a DHCP filter option object. Returns If you specified a parameter. ":" . Include the specified parameter to set the attribute value.com" . unless ($optionfilter) { die("Construct DHCP Filter::Option failed: ". ":" . print "DHCP Filter Option added successfully\n". username => "admin".Infoblox API Documentation #Get option_space my $options = $optionFilter->option_space(). Omit the parameter to retrieve the attribute value.2". # Modify pxe_lease_time $optionFilter->pxe_lease_time("3600"). Example # Get pxe_lease_time my $pxe_lease_time = $optionFilter->pxe_lease_time(). "boot_server. and returns false when the operation fails. "abc_server. Also. modify.1. the method returns true when the modification succeeds. => => => => => => "option_filter". #Preparation prior to a DHCP option filter object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. "3600". If you did not specify a parameter.168. } print "Session created successfully\n". #Modify option_space $optionFilter->option_space("Infoblox_DHCP"). A) .com" .1r4 Page 65 (Rev. unless ($session) { die("Construct session failed: ". Infoblox::status_code() . and remove. } print "DHCP Filter::Option object created successfully\n". Infoblox::status_code() . the method returns the attribute value. my $response = $session->add($optionfilter) or die("Add DHCP Filter Option failed: ". ":" . Parameter Enter appropriate values in seconds. $session->status_code() . #Search for a specific DHCP Filter Option NIOS 5. password => "infoblox" ). this sample includes error handling for the operations. $session->status_detail()). Infoblox::status_detail()). use Infoblox. #Create a DHCP Filter Option object my $optionfilter = Infoblox::DHCP::Filter::Option->new( name next_server boot_file boot_server lease_time pxe_lease_time ). "7200".

#Submit the object for removal $session->remove($object) or die("Remove a DHCP Filter Option failed: ". $session->status_code() . unless ($object) { die("Search DHCP Filter Option failed: ". name => "option. unless ($object) { die("Get option filter object failed: ". my $object = $retrieved_objs[0]. print "DHCP Filter Option object modified successfully \n". $session->status_detail()). ).1r4 Page 66 (Rev. #Get object through the session my @retrieved_objs = $session->get( object "name" => "Infoblox::DHCP::Filter::Option" . $session->status_code() . $session->status_code() . $session->status_detail()). #Modify one of the attributes of the specified DHCP Filter Option attribute $object->boot_server("another_Server"). ":" . => "option_filter".infoblox. } print "Get DHCP Filter Option found at least 1 matching entry\n". Infoblox::Session->add(). ). my $object = $retrieved_objs[0]. ":" . Infoblox::Session->get(). ####PROGRAM ENDS#### AUTHOR Infoblox Inc. ":" . } print "Search DHCP Filter Option found at least 1 matching entry\n". Infoblox::Session->remove(). print "DHCP Filter Option removed successfully \n". unless ($object) { die("Get a DHCP Filter Optionobject failed: ". ":" . my $object = $retrieved_objs[0].com/ SEE ALSO Infoblox::Session.Infoblox API Documentation #Search the DHCP Filter Option my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::Option". A) .*". http://www. Infoblox::Session->modify() NIOS 5. $session->status_code() . $session->status_detail()). $session->status_detail()). $session->status_code() . Infoblox::Session->search(). $session->status_detail()). ":" . #Apply the changes $session->modify($object) or die("Modify DHCP Filter Option attribute failed: ". #Remove a DHCP Filter Option Object =>"Infoblox::DHCP::Filter::Option" . #Get and modify a DHCP Filter Option attribute #Get DHCP Filter Option through the session my @retrieved_objs = $session->get( object name ). } print "Get a DHCP Filter Option object found at least 1 matching entry\n". => "option_filter".

1r4 Page 67 (Rev. NIOS 5.Infoblox API Documentation COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. A) .

. If the agent ID strings match those defined in a relay agent filter applied to a DHCP address range. CONSTRUCTOR my $relayagentFilter = Infoblox::DHCP::Filter::RelayAgent->new( name => $string | $ipv4addr. . #Optional / Default is empty ). the Grant lease and Deny lease parameters).. #Optional / Default is empty circuit_id_name => $string.Infoblox API Documentation Infoblox::DHCP::Filter::RelayAgent . it can add one or two agent IDs in the DHCP option 82 suboption fields to the message. #Optional / Default is empty is_remote_id => $string. # Submit for adding a relay agent filter my $response = $session->add( $relayagentFilter ).DHCP relay agent filter object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS name( ) comment( ) circuit_id_name( ) extensible_attributes( ) remote_id_name( ) is_circuit_id( ) is_remote_id( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Filter::RelayAgent . #Optional / Default is undefined remote_id_name => $string. #Required comment => $string. SESSION METHODS This section describes all the methods in Infoblox::Session module that can be applied to a DHCP relay agent filter object. When a relay agent receives the DHCPDISCOVER message..DHCP relay agent filter object DESCRIPTION The Infoblox appliance can screen address requests through relay agent filters (DHCP option 82) that assist the agents in forwarding address assignments across the proper circuit. that is. remote_id_name => "remote" ). circuit_id_name => "circuit". See Infoblox::Session->add() for parameters and return values. NIOS 5.. Example #Construct an object my $relayagentFilter = Infoblox::DHCP::Filter::RelayAgent->new( name => "relayagent_filter". . }. Infoblox::Session->add( ) Use this method to add a DHCP relay agent filter object to the Infoblox appliance. the Infoblox appliance either assigns addresses from that range or denies the request (based on previously configured parameters. #Optional / Default is empty extensible_attributes => { $string => $string | $num.1r4 Page 68 (Rev. #Optional / Default is empty is_circuit_id => $string. $string => [ $string | $num. ]. A) .

Key References Apply the following attributes to get a specific DHCP relay agent filter object: name . # Submit modification my $response = $session->modify( $object ). Infoblox::Session->remove( ) Use this method to remove a DHCP relay agent filter object from the Infoblox appliance. extensible_attributes => { 'Site' => 'Santa Clara' } ). See Infoblox::Session->get() for parameters and return values. A) .*'. Example # Get the object under the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::RelayAgent" . @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::RelayAgent" . NIOS 5. # find the desired object from retrieved list. To remove a specifc object. See Infoblox::Session->remove() for parameters and return values. A hash reference containing extensible attributes.Required. extensible_attributes . my $desired_obj = $retrieved_objs[0]. Example my ). ). # get all objects with a given extensible attribute my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::RelayAgent". name => 'relayagent\. name => "relayagent_filter". # Submit for removal my $response = $session->remove( $desired_obj). extensible_attributes . Infoblox::Session->modify( ) Use this method to modify a DHCP relay agent filter object in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.Optional. A comment in string format (regular expression). Example #Use method to modify circuit id name method. then submit this object for removal. Example # search for all DHCP relayagent objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::RelayAgent". A hash reference containing extensible attributes. A relay agent filter name in string format or in ipv4address format. "name" => "relayagent_filter".Infoblox API Documentation Infoblox::Session->get( ) Use this method to retrieve all the matching DHCP relay agent filter objects from the Infoblox appliance. Infoblox::Session->search( ) Use this method to search for a DHCP relay agent filter object in the Infoblox appliance.Optional. first use get() or search() to retrieve the specific object. $object->circuit_id_name("diff_Circuit"). A relay agent filter name in string format (regular expression).Required.1r4 Page 69 (Rev. Key References Apply the following attributes to search for a DHCP Network object: name . See Infoblox::Session->modify() for parameters and return values.Optional .. comment .

extensible_attributes => { 'Site' => 'Santa Clara' }). name( ) Use this method to set or retrieve the name of a DHCP relay agent filter object. the method returns true when the modification succeeds. A) . and returns false when the operation fails. NIOS 5. set it to an empty string together with the is_circuit_id flag (anything except "Matches_Value"). # search all DHCP relay agent associations with the extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::RelayAgent". Omit the parameter to retrieve the attribute value. Also. comment( ) Use this method to set or retrieve the descriptive comment of a DHCP relay agent filter object. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.168. Example # Get name my $name = $relayagentFilter->name() # Modify name $relayagentFilter->name("relay_filter"). To reset this value. the method returns the attribute value. Example #Get comment my $comment = $relayagentFilter->comment(). If you did not specify a parameter. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP relay agent filter object. circuit_id_name( ) Use this method to set or retrieve a circuit_id_name of a DHCP relay agent filter object. An IPv4 address is a 32-bit number in dotted decimal notation. #Modify comment $relayagentFilter->comment("Modified DHCP relay agent filter object comment"). the method returns true when the modification succeeds.1. If you did not specify a parameter. Include the specified parameter to set the attribute value. The default value for this field is empty. Returns If you specified a parameter. Include the specified parameter to set the attribute value. Parameter Desired comment in string format with a maximum of 256 bytes. perhaps concatenated with the unit ID number and slot number. Omit the parameter to retrieve the attribute value. the method returns the attribute value.2). Parameter Specify the name in string format or in ipv4addr format. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value.Infoblox API Documentation ). and returns false when the operation fails. the circuit ID can be an ATM virtual circuit ID or cable data virtual circuit ID. This filter identifies the circuit between the remote host and the relay agent. the identifier can be the ingress interface number of the circuit access unit. For example. example: Text String: 001122334455 Binary String: \x00\x11\x22\x33\x44\x55. The name can be an IP address or name of the router acting as relay agent. Returns If you specified a parameter.1r4 Page 70 (Rev. Parameter Specify circuit id name in string format. The default value for this field is empty.

# Set circuit_id_name to empty string $relayagentFilter->circuit_id_name(""). A) . If you did not specify a parameter. the method returns true when the modification succeeds.1r4 Page 71 (Rev. etc. The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. 'Administrator' => [ 'Peter'. the value is a string with a maximum of 64 characters. #Modify extensible attributes $relayagentFilter->extensible_attributes({ 'Site' => 'Santa Clara'. # Set is_remote_id to "Not_Set" $relayagentFilter->is_remote_id("Not_Set").Infoblox API Documentation Returns If you specified a parameter. a modem ID. The remote ID name is considered as a trusted identifier. # Set remote_id_name to empty string $relayagentFilter->remote_id_name(""). Include the specified parameter to set the attribute value. and returns false when the operation fails. the DHCP server will have a trusted relationship to identify the remote host. The default value is undefined. The default value for this field is empty. the value is a string with a maximum of 256 characters. The remote ID name can represent many different things such as the caller ID telephone number for a dial-up connection. This filter identifies the remote host. example: Text String: 001122334455 Binary String: \x00\x11\x22\x33\x44\x55. 'Tom' ] }). 1970 UTC. a user name for logging in to the ISP. is_circuit_id( ) NIOS 5. Omit the parameter to retrieve the attribute value. To reset this value. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP relay agent filter object. Example # Get circuit_id_name my $circuit_id_name = $relayagentFilter->circuit_id_name(). For a date. Omit the parameter to retrieve the attribute value. URL. the method returns the attribute value. If you did not specify a parameter. Returns If you specified a parameter. For a list. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. Returns If you specified a parameter. If you did not specify a parameter. # Set is_circuit_id to "Not_Set" $relayagentFilter->is_circuit_id("Not_Set"). the method returns true when the modification succeeds. and returns false when the operation fails. Example #Get extensible attributes my $ref_extensible_attributes = $relayagentFilter->extensible_attributes(). When the remote ID name is defined on the relay agent. For email. and returns false when the operation fails. and string types. # Modify circuit_id_name $relayagentFilter->circuit_id_name("001122334455"). the value is an integer from -2147483648 through 2147483647. Example # Get remote_id_name my $remote_id_name = $relayagentFilter->remote_id_name(). Include the specified parameter to set the attribute value. remote_id_name( ) Use this method to set or retrieve a remote ID name attribute of a relay agent filter object. the value is the number of seconds that have elapsed since January 1st. # Modify remote_id_name $relayagentFilter->remote_id_name("\x00\x11\x22\x33\x44\x55"). set it to an empty string together with the is_remote_id flag (anything except "Matches_Value"). For an integer. the method returns the attribute value. Parameter Specify remote_id_name in string format. the method returns the attribute value. the method returns true when the modification succeeds.

168. Infoblox::status_detail()). password => "infoblox" ). ":" . #Create a DHCP relay agent filter object NIOS 5. Parameter Specify is_remote_id in string format. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. the method returns true when the modification succeeds. Example # Get is_circuit_id my $is_circuit_id = $relayagentFilter->is_circuit_id(). Infoblox::status_code() . Example # Get is_remote_id my $is_remote_id = $relayagentFilter->is_remote_id(). The remote_id value takes effect only if the value is Matches_Value. If you did not specify a parameter. and remove. search. Also. the method returns the attribute value. Matches_Value. example: Text String: Any Returns If you specified a parameter. and returns false when the operation fails. The circuit_id value takes effect only if the value is Matches_Value. } print "Session created successfully\n". the method returns the attribute value. is_remote_id( ) Use this method to set or retrieve the is_remote_id flag of a DHCP relay agent filter object. Omit the parameter to retrieve the attribute value. unless ($session) { die("Construct session failed: ". the method returns true when the modification succeeds.Infoblox API Documentation Use this method to set or retrieve the is_circuit_id flag of a DHCP relay agent filter object. Not_Set. example: Text String: Not_Set Returns If you specified a parameter. #Create a FilterRule relayagent filter object> my $filter = Infoblox::DHCP::FilterRule::RelayAgent->new( filter_name => "relayagent_filter". The possible values for the is_remote_id flag are Any. A) . this sample includes error handling for the operations. use Infoblox. Include the specified parameter to set the attribute value. Not_Set. username => "admin". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. permission => "grant" ). Matches_Value. #Preparation prior to a DHCP relay agent filter object insertion #PROGRAM STARTS: Include all the modules that will be used use strict.1.2". # Modify is_remote_id $relayagentFilter->is_remote_id("Not_Set"). The possible values for the is_circuit_id flag are Any. Include the specified parameter to set the attribute value. # Modify is_circuit_id $relayagentFilter->is_circuit_id("Any"). Parameter Specify is_circuit_id in string format. modify. If you did not specify a parameter.1r4 Page 72 (Rev.

Infoblox::status_detail()). $session->status_detail()). print "DHCP Relay Agent Filter object modified successfully \n".10". circuit_id_name => "circuit".0.0. $session->status_code() . Infoblox::status_code() . $session->status_code() . $session->status_code() .0/8". $session->status_code() . $object->remote_id_name("diff_remote"). ). #Modify the attributes of the specified DHCP Relay Agent Filter object $object->circuit_id_name("diff_Circuit"). network => "10. } print "Search DHCP relay agent filter found at least 1 matching entry\n".0. start_addr => "10. ). comment => "add network". filters => [$filter]. unless($network) { die("Construct Network object failed: ". NIOS 5. ":" . ":" . $session->status_detail()). ). name => "relayagent_filter". #Get and modify a DHCP relay agent filter attribute #Get DHCP Relay Agent Filter through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::RelayAgent" .0.0. unless ($object) { die("Search DHCP Relay Agent Filter failed: ".*". $session->status_detail()). my $object = $retrieved_objs[0]. print "DHCP Relay Agent Filter added successfully\n".0. ":" . A) . unless ($object) { die("Get Network object failed: ". my $response = $session->add($relayagentfilter) or die("Add DHCP Relay Agent Filter failed: ". $session->modify($object) or die("Modify DHCP Relay Agent Filter attribute failed: ". print "Network object added to Infoblox appliance successfully\n".1". #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". } print "Get DHCP relay agent filter found at least 1 matching entry\n". $session->status_code() .0/8". remote_id_name => "remote" ). ":" . $session->status_detail()). #Create a DHCP Range object that uses the relayagent filter my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10. $session->status_detail()).0. #Search for a specific DHCP relay agent filter #Search the DHCP Relay Agent Filter my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Filter::RelayAgent". } print "Network object created successfully\n". my $object = $retrieved_objs[0].0.Infoblox API Documentation my $relayagentfilter = Infoblox::DHCP::Filter::RelayAgent->new( name => "relayagent_filter". #Create the Network object with the member my $network = Infoblox::DHCP::Network->new( network => "10. ":" . name => "relayagent.1r4 Page 73 (Rev. ":" . authority => "true".

#Submit the object for removal $session->remove($object) or die("Remove a DHCP Relay Agent Filter failed: ". print "Network object removed from Infoblox appliance successfully\n". Infoblox::DHCP::Range. Infoblox::status_code() . Infoblox::Session->search(). print "DHCP relay agent filter removed successfully \n". Infoblox::Session->modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. ). ":" . ":" . } print "Get a DHCP relay agent filter object found at least 1 matching entry\n". name => "relayagent_filter". #Remove the Network object into the Infoblox appliance through a session $session->remove($network) or die("Remove Network object failed: ". http://www. Infoblox::Session->remove(). my $object = $retrieved_objs[0]. $session->status_code() . } print "DHCP Range object created successfully\n". $session->status_detail()). #Remove a DHCP relay agent filter Object #Get object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Filter::RelayAgent" . $session->status_code() . #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ". $session->status_detail()).infoblox.Infoblox API Documentation ). $session->status_detail()). NIOS 5. $session->status_code() .com/ SEE ALSO Infoblox::Session. ":" .1r4 Page 74 (Rev. A) . unless ($object) { die("Get a DHCP Relay Agent Filterobject failed: ". ":" . $session->status_code() . Infoblox::DHCP::Network. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. Infoblox::status_detail()). Infoblox::Session->add(). $session->status_detail()). Infoblox::DHCP::FilterRule::RelayAgent. unless($dhcp_range) { die("Construct DHCP Range object failed: ". print "DHCP Range object added to the network successfully\n". Infoblox::Session>get(). ":" .

MODULE METHODS The following functions can be applied to a DHCP MAC Filter Rule object. Parameter Name of the DHCP MAC Address filter. #Required ). Maximum length up to 1024 bytes is supported. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. Example #Construct a DHCP MAC Address Filter Rule object my $mac_filter_rule1 = Infoblox::DHCP::FilterRule::MAC->new( filter_name => "filter1". Infoblox::DHCP::Range->filters( ) Use this method to add a DHCP MAC Address Filter Rule object to the DHCP Range on an Infoblox appliance.Infoblox API Documentation Infoblox::DHCP::FilterRule::MAC . NIOS 5. the method returns true when the modification succeeds. my $response = $dhcp_range->filters([$mac_filter_rule1]). NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::Range->filters( ) METHODS filter_name( ) permission( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::FilterRule::MAC . permission => "grant". CONSTRUCTOR my $mac_filter_rule = Infoblox::DHCP::FilterRule::MAC->new( filter_name => $string.DHCP MAC Address Filter Rule object. See Infoblox::DHCP::Range->filters() for parameters and return values. #Required permission => "grant" | "deny". and returns false when the operation fails.1r4 Page 75 (Rev. Include the specified parameter to set the attribute value. DESCRIPTION MAC Address Filter Rule allows a user to grant/deny the lease of an IP defined in DHCP Range. filter_name( ) Use this method to set or retrieve the filter_name of a DHCP MAC Address Filter Rule object.DHCP MAC Address Filter Rule object. METHODS This section describes all the methods that can be used to set and retrieve the attribute values of a DHCP MAC Address Filter Rule object. A) . #Add MAC Address Filter Rule to the DHCP Range object. ).

Omit the parameter to retrieve the attribute value.1.168. Include the specified parameter to set the attribute value. #appliance host ip username => "admin". #Create the Network object my $network = Infoblox::DHCP::Network->new( network => "10. } print "Session created successfully\n". Returns If you specified a parameter. SAMPLE CODE The following sample code demonstrates different functions that can be applied to an object such as modify. Also. Infoblox::status_detail()). Example #Get filter_name my $filter_name = $mac_filter_rule->filter_name().0/8".2". $session->status_detail()). the method returns true when the modification succeeds. #appliance user login password => "infoblox" #appliance password ).1r4 Page 76 (Rev. print "Network object added to Infoblox appliance successfully\n". #Modify filter_name $mac_filter_rule->filter_name("filter2"). ). Example #Get permission my $permission = $mac_filter_rule->permission(). Infoblox::status_code() . unless($network) { die("Construct Network object failed: ". use Infoblox. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". comment => "add network". A) . } print "Network object created successfully\n". and returns false when the operation fails. If you did not specify a parameter. Infoblox::status_code() . permission( ) Use this method to set or retrieve the permission of a DHCP MAC Address Filter Rule object. Permission indicates whether members of this MAC address filter are allowed or denied an IP address from the defined DHCP range.0. Parameter Permission value can be either "grant" or "deny".0. unless ($session) { die("Construct session failed: ". #Modify permission $mac_filter_rule->permission("deny"). ":" . the method returns the attribute value.Infoblox API Documentation If you did not specify a parameter. $session->status_code() . #Preparation prior to a DHCP MAC Address Filter Rule object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. ":" . #Construct a DHCP MAC Address Filter object NIOS 5. the method returns the attribute value. ":" . this sample includes error handling for the operations. Infoblox::status_detail()).

$session->status_code() . ).0. permission => "grant". } print "DHCP Range object created successfully\n". #Remove a MAC Address Filter Rule object $object->filters([]). start_addr => "10. unless($dhcp_range) { die("Construct DHCP Range object failed: ". start_addr => "10. unless ( $mac_filter ) { die("Construct MAC Address Filter failed: ". ).10". #Add the MAC Address Filter to the Infoblox appliance through a session $session->add($mac_filter) or die("Add MAC Address Filter object failed: ". Infoblox::status_code() . my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10. $session->status_detail()). #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ". ).0. my $mac_filterrule = $filters[0].0/8". } print "MAC Address Filter Rule object created successfully\n". #Create the DHCP Range object with this MAC Address Filter Rule. #Modify one of the attributes of the obtained MAC Address Filter Rule object $mac_filterrule->permission("deny").0. $object->filters([$mac_filterrule]).0.0. Infoblox::status_code() . filters => [ $mac_filter_rule1 ]. network => "10. print "MAC Address Filter Rule object modified and added to the DHCP Range object successfully \n". #Apply the changes $session->modify($object) or die("Modify MAC Address Filter Rule object failed: ". my $filter = $object->filters(). Infoblox::status_detail()). print "DHCP Range object added to Infoblox appliance successfully\n". my @filters = @{$filter}.1". A) . print "MAC Address Filter object added to Infoblox appliance successfully\n". ":" . ":" . B<#Get and modify a MAC Address Filter Rule object> #Get MAC Address Filter Rule object from the DHCP Range object through session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range". Infoblox::status_code() . unless ( $mac_filter_rule1 ) { die("Construct MAC Address Filter Rule failed: ". } print "MAC Address Filter object created successfully\n".0. NIOS 5. $session->status_detail()). $session->status_code() . $session->status_code() . Infoblox::status_detail() ). Infoblox::status_detail() ).0. my $object = $retrieved_objs[0].0. $session->status_detail()).1r4 Page 77 (Rev. ":" . ":" . ":" .Infoblox API Documentation my $mac_filter = Infoblox::DHCP::Filter::MAC->new( name => "filter1". ). ":" .1". #Create a DHCP MAC Address Filter Rule object #Construct a DHCP MAC Address Filter Rule object my $mac_filter_rule1 = Infoblox::DHCP::FilterRule::MAC->new( filter_name => "filter1".

Infoblox::DHCP::FilterRule::RelayAgent.Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. A) . #Submit the mac address filter object for removal $session->remove($mac_filter) or die("Remove MAC Address Filter object failed: ". Infoblox::Session->remove().Infoblox API Documentation my $response = $session->modify($object). $session->status_code() . ":" . ":" . $session->status_code() . Infoblox::Session>add(). ####PROGRAM ENDS#### AUTHOR Infoblox Inc. unless($response) { die("Remove MAC Address Filter Rule failed: ". session->status_code() .Infoblox::Session->modify(). #Submit the network object for removal $session->remove($network) or die("Remove Network object failed: ". session->status_detail() ).com/ SEE ALSO Infoblox::DHCP::MAC. print "MAC Address Filter object removed successfully \n". print "Network object removed successfully \n". Infoblox::DHCP::Range. } print "MAC Address Filter Rule object removed successfully \n". ":" . $session->status_detail()).1r4 Page 78 (Rev. $session->status_detail()). Infoblox::DHCP::Network. NIOS 5. http://www.infoblox.

Include the specified parameter to set the attribute value. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::Range->filters( ) METHODS filter_name( ) permission( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::FilterRule::NAC . #Required ). CONSTRUCTOR my $nac_filter_rule = Infoblox::DHCP::FilterRule::NAC->new( filter_name => $string. #Add a NAC Filter Rule to the DHCP Range object. See Infoblox::DHCP::Range->filters() for parameters and return values. #Required permission => "grant" | "deny". A) . NIOS 5. filter_name( ) Use this method to set or retrieve the filter_name of a DHCP NAC Filter Rule object. my $response = $dhcp_range->filters([$nac_filter_rule1]). Infoblox::DHCP::Range->filters( ) Use this method to add a DHCP NAC Filter Rule object to a DHCP range. Returns If you specified a parameter. permission => "grant".Infoblox API Documentation Infoblox::DHCP::FilterRule::NAC . Parameter The name of the DHCP NAC filter. the method returns true when the modification succeeds.DHCP NAC Filter Rule object. MODULE METHODS The following functions can be applied to a DHCP NAC Filter Rule object. The maximum length supported is 1024 bytes.DHCP NAC Filter Rule object. DESCRIPTION A NAC Filter Rule object is used to grant or deny the lease of an IP address in a DHCP range based on whether the authentication response matches the NAC filter. METHODS This section describes all the methods that can be used to set and retrieve the attribute values of a DHCP NAC Filter Rule object. ). Example #Construct a DHCP NAC Filter Rule object my $nac_filter_rule1 = Infoblox::DHCP::FilterRule::NAC->new( filter_name => "filter1". and returns false when the operation fails.1r4 Page 79 (Rev. Omit the parameter to retrieve the attribute value.

SAMPLE CODE The following sample code demonstrates different functions that can be applied to an object such as modify. this sample includes error handling for the operations.Infoblox API Documentation If you did not specify a parameter. and returns false when the operation fails. Include the specified parameter to set the attribute value. NIOS 5. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. comment => "add network". Infoblox::status_detail()). the method returns the attribute value. print "Network object added to Infoblox appliance successfully\n". A) . Example #Get permission my $permission = $nac_filter_rule->permission(). Infoblox::status_detail()).0. unless ($session) { die("Construct session failed: ".0/8". #Modify permission $nac_filter_rule->permission("deny"). unless($network) { die("Construct Network object failed: ".1. #Create the Network object my $network = Infoblox::DHCP::Network->new( network => "10. #appliance host ip username => "admin". } print "Session created successfully\n".0. Parameter The permission value can be either "grant" or "deny". $session->status_detail()). the method returns true when the modification succeeds. } print "Network object created successfully\n". If you did not specify a parameter. Infoblox::status_code() .2". Infoblox::status_code() .168. #appliance user login password => "infoblox" #appliance password ). ":" . Example #Get filter_name my $filter_name = $nac_filter_rule->filter_name(). Returns If you specified a parameter. Also. #Modify filter_name $nac_filter_rule->filter_name("filter2"). The permission indicates whether a DHCP client whose NAC authentication response matches this NAC filter is allowed or denied a lease from the defined DHCP range. #Preparation prior to a DHCP NAC Filter Rule object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. ":" . ":" . ). the method returns the attribute value. permission( ) Use this method to set or retrieve the permission of a DHCP NAC Filter Rule object. $session->status_code() .1r4 Page 80 (Rev. Omit the parameter to retrieve the attribute value. #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". use Infoblox.

0/8". } print "NAC Filter object created successfully\n". ":" . Infoblox::status_detail() ). B<#Get and modify a NAC Filter Rule object> #Get NAC Filter Rule object from the DHCP Range object through session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range". network => "10. } print "DHCP Range object created successfully\n". } print "NAC Filter Rule object created successfully\n". Infoblox::status_code() . print "DHCP Range object added to Infoblox appliance successfully\n". A) . unless ( $nac_filter ) { die("Construct NAC Filter failed: ". #Create the DHCP Range object with this NAC Filter Rule. NIOS 5. print "NAC Filter object added to Infoblox appliance successfully\n". start_addr => "10. #Create a DHCP NAC Filter Rule object #Construct a DHCP NAC Filter Rule object my $nac_filter_rule1 = Infoblox::DHCP::FilterRule::NAC->new( filter_name => "filter1". #Apply the changes $session->modify($object) or die("Modify NAC Filter Rule object failed: ". $session->status_detail()). ":" .0. $session->status_code() . Infoblox::status_code() . #Remove a NAC Filter Rule object $object->filters([]). #Add the DHCP Range object through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ". print "NAC Filter Rule object modified and added to the DHCP Range object successfully \n".1r4 Page 81 (Rev. permission => "grant". Infoblox::status_detail() ). my $object = $retrieved_objs[0]. my $nac_filterrule = $filters[0]. ":" .0. filters => [ $nac_filter_rule1 ]. my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10. Infoblox::status_detail()).1". ). Infoblox::status_code() .1". #Modify one of the attributes of the obtained NAC Filter Rule object $nac_filterrule->permission("deny").0. $session->status_code() . ":" .0. ). start_addr => "10.Infoblox API Documentation #Construct a DHCP NAC Filter object my $nac_filter = Infoblox::DHCP::Filter::NAC->new( name => "filter1". unless ( $nac_filter_rule1 ) { die("Construct NAC Filter Rule failed: ". unless($dhcp_range) { die("Construct DHCP Range object failed: ". #Add the NAC Filter to the Infoblox appliance through a session $session->add($nac_filter) or die("Add NAC Filter object failed: ". my @filters = @{$filter}. ).0. $session->status_detail()). $session->status_detail()).0. ).0. $object->filters([$nac_filterrule]). ":" . $session->status_code() .10". my $filter = $object->filters().0. ":" .

Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. #Submit the NAC Address Filter object for removal $session->remove($nac_filter) or die("Remove NAC Filter object failed: ". ":" . NIOS 5. } print "NAC Filter Rule object removed successfully \n". A) . #Submit the network object for removal $session->remove($network) or die("Remove Network object failed: ". $session->status_detail()). http://www.Infoblox::Session>modify(). session->status_code() . $session->status_code() . unless($response) { die("Remove NAC Filter Rule failed: ". print "NAC Filter object removed successfully \n".infoblox.Infoblox API Documentation my $response = $session->modify($object). Infoblox::Session->add(). Infoblox::DHCP::Network.com/ SEE ALSO Infoblox::DHCP::FilterRule::RelayAgent. ":" . Infoblox::Session->remove(). $session->status_code() . Infoblox::DHCP::Range. print "Network object removed successfully \n". $session->status_detail()). session->status_detail() ). ":" .1r4 Page 82 (Rev.

MODULE METHODS The following functions are available to apply to a DHCP filter rule option object. CONSTRUCTOR my $FilterRuleOption = Infoblox::DHCP::FilterRule::Option->new( filter_name => $string.DHCP filter rule option object. DESCRIPTION A DHCP filter rule option object gives the ability to grant and/or deny a lease of an IP defined in DHCP Range.DHCP filter rule option object. #Required ).Infoblox API Documentation Infoblox::DHCP::FilterRule::Option . permission => "grant" ). Omit the parameter to retrieve the attribute value. See details for Infoblox::DHCP::Range objects Example #Construct DHCP filter rule option object my $filter = Infoblox::DHCP::FilterRule::Option->new( filter_name => "filter1". the method returns the attribute value. Parameter Specify filter name in string format. Include the specified parameter to set the attribute value. A) . filter_name( ) Use this method to set or retrieve the filter name of a DHCP filter rule option object. and returns false when the operation fails. the method returns true when the modification succeeds. Returns If you specified a parameter. Infoblox::DHCP::Range->filters( ) Use this function to specify filters at the DHCP range level. # Configure filters my $response = $range->filters([$res]). NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::Range->filters( ) METHODS filter_name( ) permission( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::FilterRule::Option . NIOS 5. #Required permission => "grant" | "deny".1r4 Page 83 (Rev. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP filter rule option object. If you did not specify a parameter.

localdomain". ipv4addr => "192. Example # Get permission $res->permission().0/8".Infoblox API Documentation Example # Get filters from range my $resp = $range->filters(). } print "Session created successfully\n". Infoblox::status_code() .168. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. Omit the parameter to retrieve the attribute value. ##Preparation prior to a DHCP filter rule option object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. Include the specified parameter to set the attribute value. Infoblox::status_code() . SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. A) . ":" . If you did not specify a parameter. unless($memberdhcp) { die("Construct member failed: ". and returns false when the operation fails. #Create a DHCP Member object my $memberdhcp = Infoblox::DHCP::Member->new( name => "infoblox. Infoblox::status_code() . members => [ $memberdhcp ] ). use Infoblox. Infoblox::status_detail()). you need to refuse an address request from a host whose user class matches an entry in the option filter rules. the method returns the attribute value. comment => "add network".0.2". permission( ) Use this method to set or retrieve the permission of a DHCP filter rule option object. username => "admin". ":" . password => "infoblox" ). unless($network) { die("Construct Network object failed: ". Returns If you specified a parameter. #modify permission value $res->permission("deny"). # Modify filters $range->filters([$res]). The default value is "grant" lease. Parameter The permission can be either "grant" or "deny".168.1.2" ). unless ($session) { die("Construct session failed: ". NIOS 5. When selecting Deny lease. Infoblox::status_detail()). ":" . modify. } print "DHCP Member object created successfully\n".1r4 Page 84 (Rev. Infoblox::status_detail()). When selecting Grant lease.0.1. you need to assign addresses from the address range to requesting hosts whose user class (as defined on their network adapter) matches an entry in the option filter rules. Also. the method returns true when the modification succeeds. this sample includes error handling for the operations. #Create the Network object with the member my $network = Infoblox::DHCP::Network->new( network => "10.

$session->status_detail()). start_addr => "10. my $opt1 = Infoblox::DHCP::Option->new( name => "user-class" .10". filters => [$filter]. ).1" ). comment => "add range". print "Option Filter object added to Infoblox appliance successfully\n". if ($range) { NIOS 5. #Construct DHCP Filter rule Option object my $filter = Infoblox::DHCP::FilterRule::Option->new( filter_name => "filter1". start_addr => "10. $session->status_code() . Infoblox::status_detail()). #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ".0. permission => "grant" ). print "Network object added to Infoblox appliance successfully\n". value => "77" ). option_list => [$opt1]. ). print "DHCP Range object added to the network successfully\n". ":" .1". ":" . Infoblox::status_code() .Infoblox API Documentation } print "Network object created successfully\n".0. #Get and modify the filter rule option object #get object from session my @result = $session->get( object => "Infoblox::DHCP::Range". } print "Option Filter object created successfully\n". Infoblox::status_detail()). authority => "true".0. #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". #Create the Option Filter object my $option_filter = Infoblox::DHCP::Filter::Option->new( name => 'filter1' . member => $memberdhcp.0. unless($dhcp_range) { die("Construct DHCP Range object failed: ". ":" . unless($option_filter) { die("Construct Option Filter object failed: ". $session->status_detail()).0/8". $session->status_code() . ":" . A) . Infoblox::status_code() . ":" . #Create a DHCP Range object my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10. } print "DHCP Range object created successfully\n".0.0.0. #Add the filter rule option object into the Infoblox appliance $session->add($option_filter) or die("Add option Filter object failed: ". $session->status_code() . unless (scalar(@result) == 0) { my $range = $result[0]. network => "10.1r4 Page 85 (Rev. $session->status_detail()).0.

Infoblox::DHCP::Range. #update session $session->modify($range) or die("modify failed: ". http://www. NIOS 5. #modify permission value $res->permission("deny"). Infoblox::DHCP::Network. my @arr = @{$resp}. Infoblox::Session->add().1r4 Page 86 (Rev.Infoblox API Documentation my $resp = $range->filters(). print "Modify filter permisson successful\n". Infoblox::DHCP::Option. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. $session->status_code(). } } else { print "No range found. Infoblox::Session->get(). A) .com/ SEE ALSO Infoblox::Session. } $session->remove($option_filter). Infoblox::DHCP::Member.infoblox. $range->filters([$res]). my $res = $arr[0]. $session->status_detail()). print "Remove filter1 successfull\n".".

See Infoblox::DHCP::Range->filters() for parameters and return values. #Add RelayAgent Filter Rule to the DHCP Range object. Parameter Name of the DHCP RelayAgent filter. METHODS This section describes all the methods that can be used to set and retrieve the attribute values of a DHCP RelayAgent Filter Rule object. Infoblox appliance uses Relay Agent Filter Rules to grant/deny the lease to a request that comes from those Relay Agents. #Required ). #Required permission => "grant" | "deny". Include the specified parameter to set the attribute value. A) . CONSTRUCTOR my $ra_filter_rule = Infoblox::DHCP::FilterRule::RelayAgent->new( filter_name => $string. Returns If you specified a parameter.Infoblox API Documentation Infoblox::DHCP::FilterRule::RelayAgent . NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::Range->filters( ) METHODS filter_name( ) permission( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::FilterRule::RelayAgent . DESCRIPTION A relay agent adds the circuit ID and Remote ID information to the client request and sends it to DHCP Server. Example #Construct a DHCP RelayAgent Filter Rule object my $ra_filter_rule1 = Infoblox::DHCP::FilterRule::RelayAgent->new( filter_name => "filter1". permission => "grant". Maximum length up to 1024 bytes is supported.1r4 Page 87 (Rev. ).DHCP RelayAgent Filter Rule object. filter_name( ) Use this method to set or retrieve the filter_name of a DHCP RelayAgent Filter Rule object. Infoblox::DHCP::Range->filters( ) Use this method to add a DHCP RelayAgent Filter Rule object to the DHCP Range on the Infoblox appliance. NIOS 5. and returns false when the operation fails. my $response = $dhcp_range->filters([$ra_filter_rule1]). MODULE METHODS The following functions are available to apply to a DHCP RelayAgent Filter Rule object.DHCP RelayAgent Filter Rule object. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value.

Infoblox::status_detail()). The permission can be either "grant" or "deny". print "Network object added to Infoblox appliance successfully\n". #Preparation prior to a DHCP RelayAgent Filter Rule object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. NIOS 5.1. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Infoblox::status_code() . #Construct a DHCP RelayAgent Filter object my $ra_filter = Infoblox::DHCP::Filter::RelayAgent->new( name => "filter1". Infoblox::status_code() . permission( ) Use this method to set or retrieve the permission of a DHCP RelayAgent Filter Rule object. comment => "add network". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. the method returns the attribute value.Infoblox API Documentation If you did not specify a parameter. #Modify permission $ra_filter_rule->permission("deny"). Also. If you did not specify a parameter. $session->status_code() . SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as modify.168. ":" . Example #Get filter_name my $filter_name = $ra_filter_rule->filter_name().0.0. Returns If you specified a parameter. use Infoblox.2". #appliance host ip username => "admin". A) . unless($network) { die("Construct Network object failed: ". unless ($session) { die("Construct session failed: ". $session->status_detail()). the method returns the attribute value. ":" . Parameter Specify the permission in string format.0/8". #Create the Network object my $network = Infoblox::DHCP::Network->new( network => "10. #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". #appliance user login password => "infoblox" #appliance password ). and returns false when the operation fails. } print "Network object created successfully\n". Example #Get permission my $permission = $ra_filter_rule->permission(). the method returns true when the modification succeeds.1r4 Page 88 (Rev. } print "Session created successfully\n". ). this sample includes error handling for the operations. ":" . Infoblox::status_detail()). #Modify filter_name $ra_filter_rule->filter_name("filter2").

Infoblox::status_detail() ).0.1". print "DHCP Range object added to Infoblox appliance successfully\n". ":" . NIOS 5. ). #Remove a RelayAgent Filter Rule object $object->filters([]). ":" . network => "10. my $ra_filterrule = $filters[0]. } print "RelayAgent Filter object created successfully\n". A) . start_addr => "10. } print "RelayAgent Filter Rule object created successfully\n".0.0.1r4 Page 89 (Rev. filters => [ $ra_filter_rule1 ]. my $object = $retrieved_objs[0]. Infoblox::status_code() . permission => "grant". #Apply the changes $session->modify($object) or die("Modify RelayAgent Filter Rule object failed: ". } print "DHCP Range object created successfully\n".0.Infoblox API Documentation circuit_id_name => "circuit".0. ":" . $session->status_code() . ). my $filter = $object->filters().0. Infoblox::status_detail() ). #Modify one of the attributes of the obtained RelayAgent Filter Rule object $ra_filterrule->permission("deny"). ).0. my @filters = @{$filter}. $session->status_detail()).0/8". Infoblox::status_code() . ":" . #Add the RelayAgent Filter to the Infoblox appliance through a session $session->add($ra_filter) or die("Add RelayAgent Filter object failed: ". #Create a DHCP RelayAgent Filter Rule object #Construct a DHCP RelayAgent Filter Rule object my $ra_filter_rule1 = Infoblox::DHCP::FilterRule::RelayAgent->new( filter_name => "filter1". Infoblox::status_code() . Infoblox::status_detail()). #Create the DHCP Range object with this RelayAgent Filter Rule.0. $session->status_detail()). print "RelayAgent Filter Rule object modified and added to the DHCP Range object successfully \n". ":" . start_addr => "10. unless($dhcp_range) { die("Construct DHCP Range object failed: ". ":" .1". remote_id_name => "remote" ). print "RelayAgent Filter object added to Infoblox appliance successfully\n". $object->filters([$ra_filterrule]).10". my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10. unless ( $ra_filter ) { die("Construct RelayAgent Filter failed: ". $session->status_code() . #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ". unless ( $ra_filter_rule1 ) { die("Construct RelayAgent Filter Rule failed: ". B<#Get and modify a RelayAgent Filter Rule object> #Get RelayAgent Filter Rule object from the DHCP Range object through session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range". $session->status_code() . $session->status_detail()).

http://www. ":" . print "Network object removed successfully \n". ####PROGRAM ENDS#### AUTHOR Infoblox Inc. } print "RelayAgent Filter Rule object removed successfully \n". Infoblox::DHCP::Network. print "RelayAgent Filter object removed successfully \n". Infoblox::Session->remove(). #Submit the network object for removal $session->remove($network) or die("Remove Network object failed: ". NIOS 5. $session->status_detail()).1r4 Page 90 (Rev. $session->status_detail()).com/ SEE ALSO Infoblox::DHCP::MAC. A) .Infoblox API Documentation my $response = $session->modify($object). ":" . Infoblox::DHCP::FilterRule::RelayAgent. ":" . $session->status_code() .Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. $session->status_code() . Infoblox::DHCP::Range.infoblox. session->status_detail() ). #Submit the relay agent filter object for removal $session->remove($ra_filter) or die("Remove RelayAgent Filter object failed: ". session->status_code() . Infoblox::Session->modify(). unless($response) { die("Remove RelayAgent Filter Rule failed: ". Infoblox::Session->get(). Infoblox::Session>add().

1r4 Page 91 (Rev.DHCP Fixed Address object. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS bootfile( ) agent_circuit_id( ) agent_remote_id( ) always_update_dns( ) bootserver( ) client_identifier_prepend_zero( ) comment( ) configure_for_dhcp( ) ddns_domainname( ) ddns_hostname( ) deny_bootp( ) dhcp_client_identifier( ) disable( ) discovered_name( ) discoverer( ) enable_ddns( ) extensible_attributes( ) first_discovered( ) ignore_dhcp_option_list_request( ) ipv4addr( ) last_discovered( ) mac( ) match_client( ) member( ) name( ) netbios( ) ms_options( ) network( ) network_component_description( ) network_component_ip( ) network_component_name( ) network_component_port_description( ) network_component_port_name( ) network_component_port_number( ) network_component_type( ) network_view( ) nextserver( ) options( ) os( ) override_ddns_domainname( ) port_duplex( ) port_link_status( ) port_speed( ) port_status( ) port_vlan_description( ) port_vlan_name( ) port_vlan_number( ) pxe_lease_time( ) template( ) v_cluster( ) v_datacenter( ) v_host( ) v_name( ) v_netadapter( ) v_switch( ) v_type( ) SAMPLE CODE AUTHOR SEE ALSO NIOS 5. A) .Infoblox API Documentation Infoblox::DHCP::FixedAddr .

$msopt2. ]. client_identifier_prepend_zero => "true" | "false". . #Optional / Default is undefined dhcp_client_identifier => $string. the default value is "true" # Applicable only when adding this fixed address to a host ddns_domainname => $string. #Optional / Default is undefined options => [$option1. bootfile => $filename | undef. #Optional / Default is "MAC" #Possible values are: # "MAC". agent_circuit_id => $circuit_id.DHCP Fixed Address object. "bootfile" => "bootfile". #Optional / Default is empty template => $string. #Optional network => $network. #Optional / Default is "false" last_discovered => $string. agent_remote_id => $remote_id. ... $option2."RESERVED".com". always_update_dns => "true" | "false". #Optional / Default is empty mac => $mac_addr.. $string => [ $string | $num.. "REMOTE_ID" member => $msmember.. Example #Construct a DHCP Fixed Address object my $fixed_addr = Infoblox::DHCP::FixedAddr->new( "ipv4addr" => "10. address are present.] #Optional / Default is empty override_ddns_domainname => "true" | "false".. #Optional / Default is empty match_client => $string. } #Optional / Default is undefined ignore_dhcp_option_list_request => "true" | "false" | undef. . "client_identifier_prepend_zero" => "true". A) .. #Optional / Default is "default" network view nextserver => $ipv4addr | $fqdn | undef. comment => $string. See Infoblox::Session->add() for parameters and return values. #Optional / Default is "false" extensible_attributes => { $string => $string | $num. # "CIRCUIT_ID".] #Optional / Default is empty name => $name. #Optional / Default is empty disable => "true" | "false". #Optional / Default value is "false" pxe_lease_time => $time. bootserver => $ipv4addr | $fqdn | undef. #Optional ms_options => [$msopt1. DESCRIPTION A Fixed Address is a specific IP address that a DHCP server always assigns when a lease request comes from a particular MAC address of the client."CLIENT_IDENTIFIER". #Optional / Default is undefined ).. #Optional / Default is "false" enable_ddns => "true" | "false".1r4 Page 92 (Rev. CONSTRUCTOR my $fixed_addr = Infoblox::DHCP::FixedAddr -> new( ipv4addr => $ipv4addr. . NIOS 5. #Optional / Default is empty deny_bootp => "true" | "false" | undef.5". configure_for_dhcp => "true" | "false".0. #Optional / Default is empty ddns_hostname => $string. #Required #Optional / Default is undefined #Optional / Default is undefined #Optional / Default is "false" #Optional / Default is undefined #Optional / Default is undefined #Optional / Default is "false" #Optional / Default is empty #Optional / Default is "false" # When both the IP address and MAC SESSION METHODS This section describes all the methods in Infoblox::Session module that you can apply to a DHCP Fixed Address object.Infoblox API Documentation COPYRIGHT NAME Infoblox::DHCP::FixedAddr . #Optional network_view => $NetworkView.0. Infoblox::Session->add( ) Use this method to add a DHCP Fixed Address object to the Infoblox appliance. "bootserver" => "bootserver.

0.Infoblox API Documentation "comment" "ddns_domainname" "ddns_hostname" "deny_bootp" "dhcp_client_identifier" "disable" "enable_ddns" "match_client" "network" "network_view" "nextserver" "options" $option6 ]. network_view .com". $option4. "ddns. ). "ddns.0. Discovered VMware datacenter name. v_name . => => => => => => => => => => => => "add fixed address using uid". "HostSystem". "foo".host. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddr". mac . Discovered VMware virtual switch name. v_type => 'VirtualMachine'). Key References Apply the following attributes to get a specific DHCP Fixed Address object: ipv4addr . $option5. Infoblox::Session->modify( ) Use this method to modify a DHCP Fixed Address object in the Infoblox appliance. [ $option1.3. network_view => "default". "false". "10. A) .Optional.Optional.11". extensible_attributes . Example #Use method to modify the pxe_lease_time $fixed_address->pxe_lease_time("1234"). See Infoblox::Session->get() for parameters and return values.domain. #Submit for addition my $response = $session->add($fixed_addr) Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance.Optional. #Submit modification NIOS 5. v_datacenter . # get FixedAddr by v_type: my @retrieved_objs = $session->get( object => 'Infoblox::DHCP::FixedAddr'. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddr". Network view in which the fixed address is located.Optional.0/8".Optional. => "3600". Examples #Get DHCP Fixed Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddr". v_cluster .3. ipv4addr => "10.1r4 Page 93 (Rev. "MAC". $nview. network . Discovered VMware physical network adapter name. "VirtualCenter"). $option3. "pxe_lease_time" ). Discovered VMware host or virtual machine name.Optional. "false". A hash reference containing extensible attributes.domain. v_switch .Optional. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddr". dhcp_client_identifier . Discovered VMware server name. IPV4 address of the fixed address.Optional.Optional. v_host .0.4". v_type . extensible_attributes => { 'Site' => 'Santa Clara' }).com".Optional. $option2. "false". mac => "11:11:11:11:11.0. By default. "3. Discovered VMware cluster name. Discovered VMware entity type (possible values: "VirtualMachine". dhcp_client_identifier => "foo". MAC address of the fixed address. v_netadapter . ). Network address of the fixed address. DHCP option 61 client identifier.Optional.Optional. all network views are searched. See Infoblox::Session->modify() for parameters and return values.3".Optional. ).

Include the specified parameter to set the attribute value. Discovered VMware host or virtual machine name (regular expression).Optional. v_netadapter . See Infoblox::Session->remove() for parameters and return values. Network view in which the fixed address is located. v_type . v_datacenter .0. #Submit for removal my $response = $session->remove( $desired_fixed_addr ). mac .0/8". network_view => "default" ). Discovered VMware physical network adapter name (regular expression).Optional.Optional. # Search for all DHCP Fixed Address objects with "Santa Clara" for the "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FixedAddr".Infoblox API Documentation my $response = $session->modify( $fixed_address ). Key References Apply the following attributes to search for a specific DHCP Fixed Address object: ipv4addr . Omit the parameter to retrieve the attribute value. Example #Get DHCP Fixed Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddr". # search FixedAddr by v_datacenter: my @retrieved_objs = $session->search( object => 'Infoblox::DHCP::FixedAddr'. "VirtualCenter"). Discovered VMware server name (regular expression). MAC address of the fixed address (regular expression).1r4 Page 94 (Rev.Optional. all network views are searched. Discovered VMware cluster name (regular expression). Examples # Search for all DHCP Fixed Address objects that are specified in the network "10.Optional. METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a DHCP Fixed Address object. See Infoblox::Session->search() for parameters and return values. #Find the desired object from the retrieved list.0.Optional. network . my $desired_fixed_addr = $retrieved_objs[0].Optional. "HostSystem".Optional. v_cluster . A hash reference containing extensible attributes. extensible_attributes => { 'Site' => 'Santa Clara' } ).0. By default. mac => "11:11:11:11:11:11". A) . first use get() or search() to retrieve the specific DHCP Fixed Address object. network_view . Discovered VMware datacenter name (regular expression).Optional. Discovered VMware virtual switch name (regular expression). my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FixedAddr".Optional.Optional. network => "10. Network address of the fixed address. Infoblox::Session->remove( ) Use this method to remove a DHCP Fixed Address object from the Infoblox appliance. network_view => "default" ).0. v_datacenter => 'test. Infoblox::Session->search( ) Use this method to search for DHCP Fixed Address object and matching Host object with MAC address in the Infoblox appliance.0/8" in the "default" network view. mac => "11:11:11:11:11. Discovered VMware entity type (possible values: "VirtualMachine". v_host .*'). and then submit this object for removal. v_name .*". NIOS 5. extensible_attributes . bootfile( ) Use this method to set or retrieve the bootfile value of a DHCP Fixed Address object. To remove a specific object.Optional. IPV4 address of the fixed address (regular expression). v_switch .

#Modify agent_circuit_id $fixed_addr->agent_circuit_id("foo"). Omit the parameter to retrieve the attribute value. To enable the member DHCP server to match the agent remote ID. agent_remote_id( ) Use this method to set or retrieve the agent remote ID of a DHCP Fixed Address object. Example #Get agent_circuit_id my $uid = $fixed_addr->agent_circuit_id(). If you did not specify a parameter. A) . the method returns true when the modification succeeds and returns false when the operation fails. This flag only applies if the fixed address is associated with a Microsoft (r) server. Example #Get agent_remote_id my $uid = $fixed_addr->agent_remote_id(). Returns If you specified a parameter. Example #Get bootfile my $bootfile = $fixed_addr->bootfile(). the method returns true when the modification succeeds and returns false when the operation fails.1r4 Page 95 (Rev. agent_circuit_id( ) Use this method to set or retrieve the agent circuit ID of a DHCP Fixed Address object.Infoblox API Documentation This option is overridden independently from Infoblox::DHCP::FixedAddr->bootserver() and Infoblox::DHCP::FixedAddr->nextserver(). Parameter Use the agent_circuit_id to assign fixed addresses to DHCP clients from whom the member DHCP server receives DHCPDISCOVER and DHCPREQUEST messages that include option 82. regardless of the requests from the DHCP clients. the method returns the attribute value. Omit the parameter to retrieve the attribute value. #Un-override bootfile $fixed_addr->bootfile(undef). and returns false when the operation fails. clients will be allowed to update DNS when NIOS 5. #Modify bootfile $fixed_addr->bootfile("boot_file"). the method returns the attribute value. set the "match_client" field to "REMOTE_ID". the DHCP server will always update DNS. To enable the member DHCP server to match the agent circuit ID. the method returns true when the modification succeeds. If this flag is set to false. #Modify agent_remote_id $fixed_addr->agent_remote_id("foo"). Include the specified parameter to set the attribute value. Returns If you specified a parameter. If it is set to "true". If you did not specify a parameter. Include the specified parameter to set the attribute value. Parameter Use the agent_remote_id to assign fixed addresses to DHCP clients from whom the member DHCP server receives DHCPDISCOVER and DHCPREQUEST messages that include option 82. Returns If you specified a parameter. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. always_update_dns( ) Use this method to set or retrieve the always_update_dns flag of a DHCP Fixed Address object. set the "match_client" field to "CIRCUIT_ID". The default value is undefined. If you did not specify a parameter. the method returns the attribute value. Parameter The name of the file that the client must download.

Omit the parameter to retrieve the attribute value. If you did not specify a parameter. The FQDN consists of the host name followed by the domain name (example: abc. Omit the parameter to retrieve the attribute value. the method returns the attribute value.com").Infoblox API Documentation they request it. bootserver( ) Use this method to set or retrieve the bootserver of a DHCP Fixed Address object. Parameter Specify "true" to set the always_update_dns flag or "false" to deactivate/unset it. The default value is undefined. the method returns the attribute value. will prepend a zero to the ASCII text. #Un-override bootserver $fixed_addr->bootserver(undef). #Modify dhcp_client_identifier $fixed_addr->client_identifier_prepend_zero("true"). Parameter When you set the client_identifier_prepend_zero parameter to "true". Include the specified parameter to set the attribute value. #Modify bootserver $fixed_addr->bootserver("bootserver2. Example #Get always_update_dns my $always_update_dns = $fixed_addr->always_update_dns(). Returns If you specified a parameter. client_identifier_prepend_zero( ) Use this method prepend "###BOT_TEXT###00" to the dhcp-client-identifier of a fixed address. If you did not specify a parameter. the method returns true when the modification succeeds and returns false when the operation fails. The default value is "false". and returns false when the operation fails. This option is overridden independently from Infoblox::DHCP::FixedAddr->bootfile() and Infoblox::DHCP::FixedAddr->nextserver(). Returns If you specified a parameter.1r4 Page 96 (Rev. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. Returns If you specified a parameter. #Modify always_update_dns $fixed_addr->always_update_dns("false"). The following is an excerpt from "man dhcp-options": Please be aware that some DHCP clients.com). when configured with client identifiers that are ASCII text. the method returns the attribute value. Example #Get client_identifier_prepend_zero my $client_identifier_prepend_zero = $fixed_addr->client_identifier_prepend_zero(). NIOS 5. the method returns true when the modification succeeds. If you did not specify a parameter. Parameter The boot server IP address or name in FQDN (Fully Qualified Domain Name) format. it prefixes a 0 (zero) to the DHCP client identifier whenever option 61 is used to assign fixed addresses. So you may need to write: option dhcp-client-identifier "###BOT_TEXT###00foo" rather than: option dhcp-client-identifier "foo". A) . and returns false when the operation fails. A boot server name can have a maximum of 256 bytes. Example #Get bootserver my $bootserver = $fixed_addr->bootserver().

Parameter Specify the DDNS domain name. Omit the parameter to retrieve the attribute value. the method returns the attribute value. #Modify configure_for_dhcp $fixed_addr->configure_for_dhcp("true"). Parameter Desired comment in string format with a maximum of 256 bytes. $object->override_ddns_domainname("false"). the last operation takes precedence. Omit the parameter to retrieve the attribute value. configure_for_dhcp( ) Use this method to set or retrieve the configure_for_dhcp flag of a DHCP Fixed Address object.domain.Infoblox API Documentation comment( ) Use this method to set or retrieve the descriptive comment of a DHCP Fixed Address object. Returns If you specified a parameter. Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false". and returns false when the operation fails. will set override_ddns_domainname to "false". Include the specified parameter to set the attribute value. #Modify the DDNS domain name $fixed_addr->ddns_domainname("ddns. the method returns the attribute value.1r4 Page 97 (Rev. Example #Get comment my $comment = $fixed_addr->comment(). If you did not specify a parameter. Returns If you specified a parameter. will result in override_ddns_domainname="true". Omit the parameter to retrieve the attribute value. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false". Returns If you specified a parameter. the method returns true when the modification succeeds. If you did not specify a parameter. and returns false when the operation fails. the method returns true when the modification succeeds. If you did not specify a parameter.com"). Example #Get the DDNS domain name my $ddns_domainname = $fixed_addr->ddns_domainname(). NIOS 5. Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true". A) . The default value is "false". Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. the method returns the attribute value. Parameter Specify "true" to set the configure_for_dhcp flag or "false" to deactivate/unset it. Example #Get configure_for_dhcp my $configure_for_dhcp = $fixed_addr->configure_for_dhcp(). and returns false when the operation fails. and the sequence $object->override_ddns_domainname("false"). $object>ddns_domainname("testdomain"). #Modify comment $fixed_addr->comment("Modified DHCP Fixed Address object comment"). Thus the sequence $object->ddns_domainname("testdomain"). ddns_domainname( ) Use this method to set or retrieve the DDNS domain name value of a DHCP Fixed Address object. the method returns true when the modification succeeds.

Example #Get dhcp_client_identifier my $uid = $fixed_addr->dhcp_client_identifier(). Omit the parameter to retrieve the attribute value. deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP Fixed Address object. If you did not specify a parameter. the method returns true when the modification succeeds. #Modify deny_bootp $fixed_addr->deny_bootp("true"). #Modify the DDNS host name $fixed_addr->ddns_hostname("host. Parameter Specify the DDNS host name. the method returns true when the modification succeeds and returns false when the operation fails.ddns. the method returns true when the modification succeeds. and returns false when the operation fails. Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. Parameter Use the dhcp_client_identifier or uid to assign fixed addresses if the DHCP clients send option 61. If you did not specify a parameter. The default value is undefined which indicates that this attribute inherits the upper-level setting Returns If you specified a parameter. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. Example #Get the DDNS host name my $ddns_hostname = $fixed_addr->ddns_hostname().domain. Omit the parameter to retrieve the attribute value. Set the "match_client" field to "CLIENT_IDENTIFIER" for fixed addresses to use the dhcp_client_identifier instead of the mac_address. and returns false when the operation fails.Infoblox API Documentation ddns_hostname( ) Use this method to set or retrieve the DDNS host name value of a DHCP Fixed Address object. disable( ) Use this method to set or retrieve the disable flag of a DHCP Fixed Address object. Returns If you specified a parameter. A) . the method returns the attribute value. Example #Get deny_bootp my $deny_bootp = $fixed_addr->deny_bootp(). A DHCP client identifier can be a string or a MAC address. Include the specified parameter to set the attribute value. NIOS 5. or $fixed_addr->dhcp_client_identifier("1:11::11::11::11::11::12"). dhcp_client_identifier( ) Use this method to set or retrieve the dhcp-client-identifier value of a DHCP Fixed Address object. If you did not specify a parameter. #Modify dhcp_client_identifier $fixed_addr->dhcp_client_identifier("foo"). Omit the parameter to retrieve the attribute value. the method returns the attribute value.com"). Returns If you specified a parameter.1r4 Page 98 (Rev. the method returns the attribute value.

Infoblox API Documentation Include the specified parameter to set the attribute value. Parameter Specify "true" to set the enable_ddns flag or "false" to deactivate/unset it. Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. #Modify disable $fixed_addr->disable("true"). Example #Get disable my $disable = $fixed_addr->disable(). Parameter none Returns The method returns the discovered name. If enable_ddns value is specified as "true". NIOS 5. The default value is "false". discovered_name( ) Use this method to retrieve the discovered name of a DHCP Fixed Address object. discoverer( ) Use this method to retrieve the discoverer of a DHCP Fixed Address object. If you did not specify a parameter. the method returns true when the modification succeeds. Parameter none Returns The method returns the discoverer value. Returns If you specified a parameter. the method returns the attribute value. Example #Get enable_ddns my $enable_ddns = $fixed_addr->enable_ddns(). The default value is "false". Include the specified parameter to set the attribute value. A) . Example #Get discovered_name my $discovered_name = $fixed_addr->discovered_name(). enable_ddns( ) Use this method to set or retrieve the enable_ddns flag of a DHCP Fixed Address object.1r4 Page 99 (Rev. If you did not specify a parameter. #Modify enable_ddns $fixed_addr->enable_ddns("true"). Omit the parameter to retrieve the attribute value. and returns false when the operation fails. the method returns true when the modification succeeds. the method returns the attribute value. Example #Get discoverer my $discoverer = $fixed_addr->discoverer(). Returns If you specified a parameter. then the A and PTR records corresponding to the Fixed Address object will be placed on the DNS server.

Parameter none Returns The method returns the date and time that the DHCP Fixed Address object was first discovered. # Un-override ignore_dhcp_option_list_request $fixed_addr->ignore_dhcp_option_list_request(undef). Omit the parameter to retrieve the attribute value.. If this flag is set to false all the defined DHCP options will be returned to the client. For a list. the method returns true when the modification succeeds. If you did not specify a parameter. If you did not specify a parameter. The default value is undefined. the value is a string with a maximum of 256 characters. The default value is false which indicates that this attribute inherit the member level setting. For email. the value is the number of seconds that have elapsed since January 1st.1r4 Page 100 (Rev. Include the specified parameter to set the attribute value. #Modify extensible attributes $fixed_addr->extensible_attributes({ 'Site' => 'Santa Clara'. Example #Get first_discovered my $first_discovered = $fixed_addr->first_discovered(). # Modify ignore_dhcp_option_list_request $fixed_addr->ignore_dhcp_option_list_request("true"). 1970 UTC. the value is an integer from -2147483648 through 2147483647. Returns If you specified a parameter. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. For a date. NIOS 5. 'Tom' ] }). Example #Get extensible attributes my $ref_extensible_attributes = $fixed_addr->extensible_attributes(). Parameter Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate/unset it.Infoblox API Documentation extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP Fixed Address object Include the specified parameter to set the attribute value. and string types. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. A) . The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. the method returns the attribute value. URL. the value is a string with a maximum of 64 characters. and returns false when the operation fails. first_discovered( ) Use this method to retrieve the date and time that the DHCP Fixed Address object was first discovered. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. 'Administrator' => [ 'Peter'. Example # Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $fixed_addr->ignore_dhcp_option_list_request(). the method returns the attribute value. Returns If you specified a parameter. ignore_dhcp_option_list_request( ) Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP Fixed address object. For an integer. ipv4addr( ) Use this method to set or retrieve the ipv4addr value of a DHCP Fixed Address object. the method returns true when the modification succeeds.

last_discovered( ) Use this method to retrieve the time this object was last seen by a discovery job. Parameter N/A Returns The method returns the attribute value. the method returns the attribute value. the method returns true when the modification succeeds. Example #Get mac my $mac = $fixed_addr->mac(). Omit the parameter to retrieve the attribute value. Example #Get last_discovered my $last_discovered = $fixed_addr->last_discovered(). Omit the parameter to retrieve the attribute value.1.0.0. A) .168. #Modify ipv4addr $fixed_addr->ipv4addr("10. and returns false when the operation fails. Parameter MAC Address of the DHCP Fixed address object. match_client( ) Use this method to set or retrieve the match_client value of a DHCP Fixed Address object. Example #Get ipv4addr my $ipv4addr = $fixed_addr->ipv4addr().1r4 Page 101 (Rev. Format for the hexadecimal strings for MAC addresses and vendor prefixes with colons or dashes. If you did not specify a parameter. the method returns the attribute value.5"). Returns If you specified a parameter.Infoblox API Documentation Parameter An IPv4 address is a 32-bit number in dotted decimal notation. Returns If you specified a parameter. Note that the "agent_circuit_id" field must be set in this case. If you did not specify a parameter. Both of the following formats are acceptable: 11:11:11:11:11:11 and 11-11-11-11-11-11. NIOS 5. match_client "CIRCUIT_ID": The fixed IP address is leased to the DHCP client with a matching circuit ID. match_client "CLIENT_IDENTIFIER": The fixed IP address is leased to the matching DHCP client identifier match_client "RESERVED": The fixed IP address is reserved for later use with a MAC address that only has zeros. the method returns true when the modification succeeds. #Modify mac $fixed_addr->mac("11::11::11::11::11::12"). The default value for this field is empty. Parameter match_client "MAC": The fixed IP address is leased to the matching MAC address.2). Include the specified parameter to set the attribute value. mac( ) Use this method to set or retrieve the MAC address value of a DHCP Fixed Address object. Include the specified parameter to set the attribute value. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. and returns false when the operation fails.

Returns If you specified a parameter. ms_options( ) NIOS 5. the method returns true when the modification succeeds. and returns false when the operation fails. The default value is empty.Infoblox API Documentation match_client "REMOTE_ID": The fixed IP address is leased to the DHCP client with a matching remote ID. #$member1 is an Infoblox::DHCP::MSServer object name( ) Use this method to set or retrieve the name of a DHCP Fixed Address object. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. the method returns true when the modification succeeds. If you did not specify a parameter. Example #Get member my $ref_member = $dhcp_fixedaddr->member(). member( ) Use this method to set or retrieve the Microsoft server associated with this fixed address. and returns false when the operation fails. Include the specified parameter to set the attribute value. the method returns the attribute value. Returns If you specified a parameter. netbios( ) Use this method to retrieve the name in the NetBIOS reply that responded to a NetBIOS query. Include the specified parameter to set the attribute value. Returns The method returns the attribute value.1r4 Page 102 (Rev. #Modify match_client $fixed_addr->match_client("CLIENT_IDENTIFIER"). the method returns the attribute value. Note that the "agent_remote_id" field must be set in this case. the method returns true when the modification succeeds. Example #Get match_client my $match_client = $fixed_addr->match_client(). A) . If you did not specify a parameter. Example #Get netbios my $netbios = $fixed_addr->netbios(). and returns false when the operation fails. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Example #Get name my $name = $fixed_addr->name(). Parameter A string specifying the name of the fixed address. #Modify member $dhcp_fixedaddr->member($member1). #Modify name $fixed_addr->name("fxname"). Parameter The valid value is a defined Infoblox::DHCP::MSServer object. If you did not specify a parameter.

If you did not specify a parameter. Note: You can set only options that are specified in both the Microsoft server and NIOS option definitions.1r4 Page 103 (Rev. Include the specified parameter to set the attribute value. A) . #$option12 is an Infoblox::DHCP::MSOption object network( ) Use this method to retrieve the network value of a DHCP Fixed Address object. Options that are not common to both the Microsoft server and NIOS cannot be modified. network_component_description( ) Use this method to retrieve the description of the network device that is connected to the DHCP Fixed Address object. The default value is empty.0/8). and returns false when the operation fails.0. Example #Get network_component_description my $network_component_description = $fixed_addr->network_component_description(). Returns If you specified a parameter. Parameter Valid value is an array reference that contains defined Infoblox::DHCP::MSOption objects. and returns false when the operation fails. Example #Get network_component_ip my $network_component_ip = $fixed_addr->network_component_ip(). If you did not specify a parameter. the method returns true when the modification succeeds. #Modify options $dhcp_fixedaddr->ms_options([$option12]).0. Include the specified parameter to set the attribute value. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value.Infoblox API Documentation Use this method to set or retrieve the Microsoft server custom DHCP options associated with this DHCP fixed address. the method returns the attribute value. It consists of four 8-bit groups of decimal digits separated by decimal points followed by prefix (example: 1. the method returns true when the modification succeeds. Example #Get network my $network = $fixed_addr->network(). Omit the parameter to retrieve the attribute value. Example #Get options my $ref_options = $dhcp_fixedaddr->ms_options(). network_component_ip( ) Use this method to retrieve the IP address of the network device that is connected to the DHCP Fixed Address object. Parameter none Returns The method returns the network device description. Parameter An network is a 32-bit number in dotted decimal notation. NIOS 5. the method returns the attribute value. Parameter none Returns The method returns the IP address of the network device.

Parameter none Returns NIOS 5. network_component_port_number( ) Use this method to retrieve the number of the network device port that is connected to the DHCP Fixed Address object. Parameter none Returns The method returns the network device port number in the range 0-9999. A) . network_component_type( ) Use this method to retrieve the type of the network device that is connected to DHCP Fixed Address object. Parameter none Returns The method returns the network device name. Example #Get network_component_name my $network_component_name = $fixed_addr->network_component_name(). Example #Get network_component_port_name my $network_component_port_name = $fixed_addr->network_component_port_name(). Parameter none Returns The method returns the name of the port on the network device. network_component_port_name( ) Use this method to retrieve the name of the network device port that is connected to the DHCP Fixed Address object. network_component_port_description( ) Use this method to retrieve the description of the network device port that is connected to the DHCP Fixed Address object.1r4 Page 104 (Rev.Infoblox API Documentation network_component_name( ) Use this method to retrieve the name of the network device that is connected to the DHCP Fixed Address object. Example #Get network_component_port_description my $network_component_port_description = $fixed_addr->network_component_port_description(). Example #Get network_component_port_number my $network_component_port_number = $fixed_addr->network_component_port_number(). Parameter none Returns The method returns the description of the port on the network device.

Infoblox API Documentation The method returns the network device type. and returns false when the operation fails.4"). options( ) Use this method to set or retrieve the options of a DHCP Fixed Address object. The default value is the "default" network view. which means the fixed address is in the default network view. the method returns the attribute value. and returns false when the operation fails. #Un-override nextserver $fixed_addr->nextserver(undef). The default network view value is the system-defined default network view object. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. the method returns true when the modification succeeds. with an Infoblox::DHCP::View object $fixed_addr->network_view($nview).com). the method returns true when the modification succeeds. network_view( ) Use this method to set or retrieve the network view of the DHCP fixed address. #Modify nextserver $fixed_addr->nextserver("3. Example #Get network view my $nview = $fixed_addr->network_view(). Returns If you specified a parameter. A) . If you did not specify a parameter. Returns If you specified a parameter. See Infoblox::DHCP::Option for parameters and methods available for this object. nextserver( ) Use this method to set or retrieve the nextserver value of a DHCP Fixed Address object. Include the specified parameter to set the attribute value. NIOS 5. #Modify network view. Parameter Valid value is a defined Infoblox::DHCP::View object. Include the specified parameter to set the attribute value. These options occur as variablelength fields at the end of DHCP messages. The FQDN consists of the host name followed by the domain name (example: abc. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. Omit the parameter to retrieve the attribute value. Example #Get nextserver my $nextserver = $fixed_addr->nextserver(). This option is overridden independently from Infoblox::DHCP::FixedAddr->bootfile() and Infoblox::DHCP::FixedAddr->bootserver(). and returns false when the operation fails. Include the specified parameter to set the attribute value. The default value is undefined. Omit the parameter to retrieve the attribute value. the method returns the attribute value. Parameter Options describe network configuration settings and various services available on the network.3. the method returns true when the modification succeeds.3. A next server name can have a maximum of 256 bytes.1r4 Page 105 (Rev. Example #Get network_component_type my $network_component_type = $fixed_addr->network_component_type().

It is also set implicitly when ddns_domainname is set to a defined value. Parameter Set the parameter to "true" to override the grid-level setting for ddns_domainname. Example #Get os my $os = $fixed_addr->os(). Returns If you specified a parameter. instead of the grid default. Include the specified parameter to set the attribute value. port_link_status( ) Use this method to retrieve the link status of the network device port that is connected to the DHCP Fixed Address object. Returns The method returns the attribute value. Parameter none Returns The method returns the port duplex setting. The default value of this parameter is "false".1r4 Page 106 (Rev. if any. Parameter NIOS 5. The override_ddns_domainname attribute can be specified explicitly. If you did not specify a parameter. os( ) Use this method to retrieve the operating system associated with this fixed address. #Modify options $fixed_addr->options([$option1. and returns false when the operation fails. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Returned values. the method returns true when the modification succeeds. Set the parameter to "false" to inherit the grid-level setting for ddns_domainname. port_duplex( ) Use this method to retrieve the duplex setting of the network device port that is connected to the DHCP Fixed Address object. #Modifying override_ddns_domainname $fixed_addr->override_ddns_domainname("true"). Example #Get options my $options = $fixed_addr->options(). are one of the following: Full Half Example #Get port_duplex my $port_duplex = $fixed_addr->port_duplex().Infoblox API Documentation If you did not specify a parameter. the method returns the attribute value. override_ddns_domainname( ) The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP Fixed Address is used. A) . Example #Getting override_ddns_domainname my $override_ddns_domainname=$fixed_addr->override_ddns_domainname( ). $option2]).

Returned values. are one of the following: Up Down Unknown Example #Get port_status my $port_status = $fixed_addr->port_status(). A) .Infoblox API Documentation none Returns The method returns the network device port link status. are one of the following: 10M 100M 1G 10G 100G Unknown Example #Get port_speed my $port_speed = $fixed_addr->port_speed(). are one of the following: Connected Not Connected Unknown Example #Get port_link_status my $port_link_status = $fixed_addr->port_link_status(). Example #Get port_vlan_description my $port_vlan_description = $fixed_addr->port_vlan_description(). port_speed( ) Use this method to retrieve the speed of the network device port that is connected to the DHCP Fixed Address object. port_status( ) Use this method to retrieve the status of the network device port that is connected to the DHCP Fixed Address object. Parameter none Returns The method returns the network device port status. if any.1r4 Page 107 (Rev. if any. Parameter none Returns The method returns the network device port speed. if any. Parameter none Returns The method returns the VLAN description of the network device port. Returned values. NIOS 5. port_vlan_name( ) Use this method to retrieve the VLAN name of the network device port that is connected to the DHCP Fixed Address object. port_vlan_description( ) Use this method to retrieve the VLAN description of the network device port that is connected to the DHCP Fixed Address object. Returned values.

Infoblox API Documentation Parameter none Returns The method returns the network device port VLAN name. The template parameter can be used to only add a new DHCP Fixed Address and cannot be used during object modify or returned during object get. Example #Get pxe_lease_time my $pxe_lease_time = $fixed_addr->pxe_lease_time(). Parameter none Returns The method returns the port VLAN number in the range 0-9999. the method returns true when the modification succeeds. Mins and Secs fields. A) . If you did not specify a parameter. Returns If you specified a parameter. and returns false when the operation fails. Example #Get template NIOS 5. such as a TFTP server. Parameter The valid name in sting format. Hours. User can specify the duration of time it takes a host to connect to a boot server. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value.1r4 Page 108 (Rev. pxe_lease_time( ) Use this method to set or retrieve the pxe_lease_time value of a DHCP Fixed Address object. Omit the parameter to retrieve the attribute value. the method returns the attribute value. Example #Get port_vlan_name my $port_vlan_name = $fixed_addr->port_vlan_name(). Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. and download the file it needs to boot. Parameter Enter appropriate values in the Days. Example #Get port_vlan_number my $port_vlan_number = $fixed_addr->port_vlan_number(). Template is the name of a DHCP Fixed Address template which will be used to create the DHCP Fixed Address. the method returns the attribute value. If you did not specify a parameter. and returns false when the operation fails. template( ) Use this method to set or retrieve the fixed address template name for a DHCP Fixed Address object. #Modify pxe_lease_time $fixed_addr->pxe_lease_time("369"). Returns If you specified a parameter. port_vlan_number( ) Use this method to retrieve the VLAN number of the network device port that is connected to the DHCP Fixed Address object.

Example #Get v_name my $v_name = $fixed_addr->v_name(). Example #Get v_host my $v_host = $fixed_addr->v_host(). A) . The default value is an empty string.1r4 Page 109 (Rev. Parameter none Returns This method returns a string that contains the VMware datacenter name. This method is read-only.Infoblox API Documentation my $template = $fixed_addr->template(). NIOS 5. The default value is an empty string. The default value is an empty string. v_datacenter( ) Use this method to retrieve the name of the VMware datacenter associated with the DHCP Fixed Address object. v_netadapter( ) Use this method to retrieve the name of the physical network adapter through which the VMware entity is connected to the appliance. Parameter none Returns This method returns a string that contains the VMware host name. v_name( ) Use this method to retrieve the name of the VMware entity associated with the DHCP Fixed Address object. This method is read-only. This method is read-only. Parameter none Returns This method returns a string that contains the VMware cluster name. Example #Get v_cluster my $v_cluster = $fixed_addr->v_cluster(). v_host( ) Use this method to retrieve the name of the VMware host associated with the DHCP Fixed Address object. This method is read-only. Parameter none Returns This method returns a string that contains the VMware entity name. This method is readonly. The default value is an empty string. #Modify template $fixed_addr->template("Template_Name"). v_cluster( ) Use this method to retrieve the name of the VMware cluster associated with the DHCP Fixed Address object. Example #Get v_datacenter my $v_datacenter = $fixed_addr->v_datacenter().

and remove.1r4 Page 110 (Rev. ":" . } print "Session created successfully\n". unless ($session) { die("Construct session failed: ". search.Infoblox API Documentation Parameter none Returns This method returns a string that contains the network adapter name. Parameter none Returns This method returns a string that contains the virtual switch name. This sample also includes error handling for the operations. The default value is an empty string. Parameter none Returns This method returns a string that contains the VMware entity type. #appliance user login password => "infoblox" #appliance password ). Infoblox::status_detail()). if any. v_type( ) Use this method to retrieve the type of VMware entity associated with the DHCP Fixed Address object. Infoblox::status_code() . use Infoblox. A) . This method is read-only. Example #Get v_switch my $v_switch = $fixed_addr->v_switch(). This method is read-only. The returned value.1.2". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. #appliance host ip username => "admin". NIOS 5. v_switch( ) Use this method to retrieve the name of the virtual switch through which the VMware entity is connected to the appliance. The default value is an empty string. Example #Get v_netadapter my $v_netadapter = $fixed_addr->v_netadapter(). modify. #Preparation prior to a DHCP Fixed Address object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. The default value is an empty string.168. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. can be one of the following: VirtualMachine HostSystem VirtualCenter Example #Get v_type my $v_type = $fixed_addr->v_type().

0.0. "bootserver" => "someserver. "options" => [ $option1 .Infoblox API Documentation #Create a network object my $network = Infoblox::DHCP::Network->new( "network" => "10. Infoblox::status_code() . $session->add($network) or die("Add network failed: ". my $option2 = Infoblox::DHCP::Option->new( "type" => "routers".0. "enable_ddns" => "true".com". unless($network) { die("Construct Network object failed: ". ":" . Infoblox::status_code() . "bootfile" => "bootfile. Infoblox::status_detail()). ). NIOS 5.0/8".0.com". my $option1 = Infoblox::DHCP::Option->new( "name" => "lease-time". $session->status_code() . safe to add the fixed address\n".255" ]. ":" .0. ":" . "comment" => "add fixed address".0/8". unless($option1) { die("Construct option1 object failed: ". $session->status_detail()). ":" .0. } print "option1 object created successfully\n". #Verify if the DHCP Fixed Address exists in the Infoblox appliance my $object = $session->get( object => "Infoblox::DHCP::FixedAddr".0. "mac" => "00:00:00:11:11:11". $option2 ]. "pxe_lease_time" => "3600". Infoblox::status_detail()). "ipv4addrs" => [ "10.0. Infoblox::status_code() .3.0. ).0. } print "option2 object created successfully\n". Infoblox::status_detail()). unless($option2) { die("Construct option2 object failed: ". } print "DHCP Fixed address added successfully\n". ":" . "value" => "50" ). ). "number_of_addresses" => "1". $session->status_detail()).3". unless ($object) { print "fixed address does not exist on server. Infoblox::status_detail()). #Create a DHCP Fixed Address object using a template #Create a DHCP Fixed Address template object my $fixed_addr_template = Infoblox::DHCP::FixedAddrTemplate->new( "name" => "custom_fa_template". print "Network added successfully\n".3. A) . #Create a DHCP Fixed address object #Create a DHCP Fixed Address object my $fixed_addr = Infoblox::DHCP::FixedAddr->new( "ipv4addr" => "10. mac => "00:00:00:11:11:11" ). $session->status_code() . ":" . unless($fixed_addr) { die("Construct fixed address failed: ".1r4 Page 111 (Rev. "nextserver" => "3. Infoblox::status_code() . $session->add($fixed_addr) or die("Add fixed address failed: ". "10. "offset" => "10". } print "Network object created successfully\n". "network" => "10.1". } print "DHCP Fixed address object created successfully\n".6".

Infoblox::status_detail()). mac => "00:00:00:11:11. "match_client" => "RESERVED". #Get and modify a DHCP Fixed Address object #Get DHCP Fixed Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddr". unless ($object) { die("Get Fixed Address object failed: ". #Apply the changes $session->modify($object) NIOS 5.0. ":" . unless($fixed_addr) { die("Construct fixed address failed: ". ":" . $session->status_code() . $session->status_code() . $session->status_detail()). ":" .0. ":" . #Un-override nextserver $object->nextserver(undef).0. $session->add($fixed_addr_template) or die("Add fixed address template failed: ".0/8" ).0. network => "10. } print "DHCP Fixed address template object created successfully\n". => "TRUE". } print "Get Fixed Address object found at least 1 matching entry\n". ":" .0.0. ). ).*". #Modify one of the attributes of the obtained Fixed Address object $object->pxe_lease_time("1234"). } print "Search Fixed Address object found at least 1 matching entry\n". #Un-override bootfile $object->bootfile(undef). } print "DHCP Fixed address object created successfully\n". } print "DHCP Fixed address added successfully\n". Infoblox::status_detail()). $session->status_detail()). mac => "00:00:00:11:11:11". my $object = $retrieved_objs[0].0/8". ":" . A) . $session->status_detail()). unless ($object) { die("Search for Fixed Address object failed: ".0. Infoblox::status_code() .Infoblox API Documentation "comment" "enable_ddns" => "add fixed address template". my $object = $retrieved_objs[0]. $session->status_code() . "template" => "custom_fa_template" ). #Search for a specific DHCP Fixed Address object #Search for all DHCP Fixed address objects under the network 10. #Un-override bootserver $object->bootserver(undef).0. $session->status_detail()).1r4 Page 112 (Rev. "ipv4addr" => "10. Infoblox::status_code() . $session->status_code() . $session->add($fixed_addr) or die("Add fixed address failed: ".7". unless($fixed_addr_template) { die("Construct fixed address failed: ".0/8 my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FixedAddr". #Create a DHCP Fixed Address object my $fixed_addr = Infoblox::DHCP::FixedAddr->new( "network" => "10. } print "DHCP Fixed address template added successfully\n".

#Remove a Fixed Address object #Get Fixed Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddr". print "Fixed Address Template object removed successfully \n".infoblox. $session->status_detail()). $session->status_code() . #Submit the Fixed Address Template object for removal $session->remove($fixed_addr_template) or die("Remove Fixed Address Template object failed: ". mac => "00:00:00:11:11:11". Infoblox::Session->remove().com/ SEE ALSO Infoblox::DHCP::Network. print "Network object removed successfully \n". Infoblox::Session->get(). Infoblox::DHCP::Lease. unless ($object) { die("Get Fixed Address object failed: ". #Submit the Network object for removal $session->remove($network) or die("Remove Network object failed: ". A) . Infoblox::DHCP::View. ":" . http://www.Infoblox::Session->add(). Infoblox::DHCP::FixedAddrTemplate COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. NIOS 5. $session->status_detail()). $session->status_code() . $session->status_code() . } print "Get Fixed Address object found at least 1 matching entry\n". $session->status_code() . $session->status_detail()). $session->status_code() . ":" .Infoblox API Documentation or die("Modify Fixed Address object failed: ". Infoblox::DHCP::Range. print "Fixed Address object modified successfully \n". ":" . ). Infoblox::Session->modify().1r4 Page 113 (Rev. Infoblox::Session. ":" . ":" . print "Fixed Address object removed successfully \n". $session->status_detail()). Infoblox::Session->search(). ####PROGRAM ENDS#### AUTHOR Infoblox Inc. $session->status_detail()). my $object = $retrieved_objs[0]. #Submit the object for removal $session->remove($object) or die("Remove Fixed Address object failed: ".

NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::NetworkTemplate-> fixed_address_templates( ) SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->search( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) METHODS bootfile( ) bootserver( ) comment( ) deny_bootp( ) enable_ddns( ) extensible_attributes( ) ddns_domainname( ) ddns_hostname( ) ignore_dhcp_option_list_request( ) name( ) nextserver( ) number_of_addresses( ) offset( ) options( ) override_ddns_domainname( ) pxe_lease_time( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::FixedAddrTemplate . $option2. #Required number_of_addresses => $num. ].DHCP Fixed Address template object. #Required offset => $num.. A) .. #Required bootfile => $filename | undef.. #Optional / Default is undefined comment => $string.1r4 Page 114 (Rev.] #Optional / Default is empty override_ddns_domainname => "true" | "false". #Optional / Default is undefined options => [$option1. NIOS 5. A Fixed address object created from a fixed address template will inherit most properties defined in fixed address template object so most of the fixed address template properties are the same as the fixed address object properties. #Optional / Default is empty deny_bootp => "true" | "false" | undef. #Optional / Default is undefined bootserver => $ipv4addr | $fqdn | undef. #Optional / Default is undefined enable_ddns => "true" | "false". . #Optional / Default value is "false" pxe_lease_time => $time. CONSTRUCTOR my $fixed_addr_template = Infoblox::DHCP::FixedAddrTemplate -> new( name => $string... #Optional / Default is empty ). . #Optional / Default is false nextserver => $ipv4addr | $fqdn | undef.Infoblox API Documentation Infoblox::DHCP::FixedAddrTemplate .. #Optional / Default is false ddns_domainname => $string | undef. $string => [ $string | $num. #Optional / Default is undefined ddns_hostname => $string | undef.DHCP Fixed Address template object. #Optional / Default is undefined extensible_attributes => { $string => $string | $num. . DESCRIPTION A fixed address template works as a 'cookie cutter' and can be used to create a real fixed address object in a quick and consistant way. } #Optional / Default is undefined ignore_dhcp_option_list_request => "true" | "false" | undef.

my $network_template = Infoblox::DHCP::NetworkTemplate->new( name => "custom_network_template". Key References Apply the following attributes to get a specific DHCP Fixed Address template object: name .3. name => "custom_fa_template". "bootserver" => "bootserver. Example #Construct a DHCP Fixed Address template object my $fixed_addr_template = Infoblox::DHCP::FixedAddrTemplate->new( "name" => "custom_fa_template". A hash reference containing extensible attributes.Optional. ). Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. "bootfile" => "bootfile". See Infoblox::Session->add() for parameters and return values. Infoblox::DHCP::NetworkTemplate-> fixed_address_templates( ) Use this function to specify a fixed address template at network template on the Infoblox appliance. "nextserver" => "3. #Submit for addition my $response = $session->add($fixed_addr_template). Infoblox::Session->add( ) Use this method to add a DHCP Fixed Address template object to the Infoblox appliance. See Infoblox::Session->get() for parameters and return values. "deny_bootp" => "false". The name of the Fixed address template. ). "number_of_addresses" => "1".3".1r4 Page 115 (Rev. comment => "add network". "options" => [ $option1. "pxe_lease_time" => "3600".com". Example #Create the Network Template object with fixed address template my $template = Infoblox::DHCP::Template->new( name => "custom_fa_template" ). extensible_attributes => { 'Site' => 'Santa Clara' } ).Optional. A) . "enable_ddns" => "false". my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddrTemplate". See Infoblox::DHCP::NetworkTemplate->fixed_address_templates() for parameters and return values. "comment" => "add fixed address". Examples #Get DHCP Fixed Address template object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddrTemplate". SESSION METHODS This section describes all the methods in Infoblox::Session module that can be applied to a DHCP Fixed Address template object. NIOS 5.Infoblox API Documentation MODULE METHODS The following functions are available to be applied to a DHCP fixed address template object. $option2 ].3. extensible_attributes . fixed_address_templates => [$template] ). "offset" => "10".

comment .Infoblox API Documentation Infoblox::Session->search( ) Use this method to retrieve all the matching objects from the Infoblox appliance. Omit the parameter to retrieve the attribute value. See Infoblox::Session->search() for parameters and return values. METHODS This section describes all the methods that can be used to set and retrieve the attribute values of a DHCP Fixed Address template object.Optional. The name of the fixed address template (regular expression). Parameter NIOS 5. Example #Get DHCP Fixed Address template object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddrTemplate". name => "custom_fa_template". This option is overridden independently from Infoblox::DHCP::FixedAddrTemplate->bootserver() and Infoblox::DHCP::FixedAddrTemplate->nextserver(). extensible_attributes => { 'Site' => 'Santa Clara' } ). #Submit modification my $response = $session->modify( $fixed_addr_templateess ). and then submit this object for removal. Example #Use method to modify the pxe_lease_time $fixed_addr_templateess->pxe_lease_time("1234"). A) . See Infoblox::Session->modify() for parameters and return values. #Find the desired object from the retrieved list. Infoblox::Session->remove( ) Use this method to remove a DHCP Fixed Address template object from the Infoblox appliance. comment => ". To remove a specific object. A hash reference containing extensible attributes. #Search for DHCP Fixed Address template objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FixedAddrTemplate". Include the specified parameter to set the attribute value. Examples #Search DHCP Fixed Address template object through the session my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FixedAddrTemplate". first use get() to retrieve the specific DHCP Fixed Address template object. bootfile( ) Use this method to set or retrieve the bootfile value of a DHCP Fixed Address template object.*". extensible_attributes .Optional. ). The comment of the fixed address template (regular expression). ).Optional. name => "custom_fa_template".1r4 Page 116 (Rev. #Submit for removal my $response = $session->remove( $desired_fixed_addr_template ). Key References Apply the following attributes to search for a DHCP Fixed Address template object: name . Infoblox::Session->modify( ) Use this method to modify a DHCP Fixed Address template object in the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values. my $desired_fixed_addr_template = $retrieved_objs[0].

bootserver( ) Use this method to set or retrieve the bootserver of a DHCP Fixed Address template object. A boot server name can have a maximum of 256 bytes. the method returns true when the modification succeeds. comment( ) Use this method to set or retrieve the descriptive comment of a DHCP Fixed Address template object. If you did not specify a parameter. #Modify bootfile $fixed_addr_template->bootfile("boot_file"). and returns false when the operation fails. deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP Fixed Address template object. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds.1r4 Page 117 (Rev. #Modify comment $fixed_addr_template->comment("Modified DHCP Fixed Address template object comment"). #Un-override bootserver $fixed_addr_template->bootserver(undef). Parameter Desired comment in string format with a maximum of 256 bytes. Include the specified parameter to set the attribute value. The FQDN consists of the host name followed by the domain name (example: abc.Infoblox API Documentation The name of the file that the client must download. Example #Get bootfile my $bootfile = $fixed_addr_template->bootfile(). Returns NIOS 5. Example #Get comment my $comment = $fixed_addr_template->comment(). Parameter The boot server IP address or name in FQDN (Fully Qualified Domain Name) format. The default value is undefined. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. The default value is undefined which indicates that this attribute inherits the upper-level setting. This option is overridden independently from Infoblox::DHCP::FixedAddrTemplate->bootfile() and Infoblox::DHCP::FixedAddrTemplate>nextserver(). the method returns the attribute value.com"). Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Include the specified parameter to set the attribute value. A) . The default value is undefined. #Modify bootserver $fixed_addr_template->bootserver("bootserver2. #Un-override bootfile $fixed_addr_template->bootfile(undef). the method returns the attribute value. Returns If you specified a parameter. Returns If you specified a parameter. the method returns the attribute value. Returns If you specified a parameter. Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. and returns false when the operation fails.com). Example #Get bootserver my $bootserver = $fixed_addr_template->bootserver().

Infoblox API Documentation If you specified a parameter. will result in override_ddns_domainname="true". the value is a string with a maximum of 256 characters. and the sequence $object->override_ddns_domainname("false"). #Modify deny_bootp $fixed_addr_template->deny_bootp("true"). Include the specified parameter to set the attribute value. If enable_ddns value is specified as "true". URL. Example #Get deny_bootp my $deny_bootp = $fixed_addr_template->deny_bootp(). For a date. $object>ddns_domainname("testdomain"). and returns false when the operation fails. Returns If you specified a parameter. 'Administrator' => [ 'Peter'. If you did not specify a parameter. Parameter Specify "true" to set the enable_ddns flag or "false" to deactivate/unset it. then the A and PTR records corresponding to the Fixed Address template object will be placed on the DNS server. #Modify extensible attributes $fixed_addr_template->extensible_attributes({ 'Site' => 'Santa Clara'. If you did not specify a parameter. the method returns the attribute value. Omit the parameter to retrieve the attribute value.1r4 Page 118 (Rev. For a list. Returns If you specified a parameter. Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true". and returns false when the operation fails. the value is an integer from -2147483648 through 2147483647. Thus the sequence $object->ddns_domainname("testdomain"). the method returns true when the modification succeeds. Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false". Example #Get extensible attributes my $ref_extensible_attributes = $fixed_addr_template->extensible_attributes(). the method returns the attribute value. ddns_domainname( ) Use this method to set or retrieve the ddns_domainname value of a DHCP Fixed Address template object. the last operation takes precedence. $object->override_ddns_domainname("false"). 1970 UTC. Example #Get enable_ddns my $enable_ddns = $fixed_addr_template->enable_ddns(). and returns false when the operation fails. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false". The default value is "false". the value is a string with a maximum of 64 characters. If you did not specify a parameter. the method returns true when the modification succeeds. #Modify enable_ddns $fixed_addr_template->enable_ddns("true"). For an integer. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. The default value is undefined. 'Tom' ] }). Omit the parameter to retrieve the attribute value. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP Fixed Address template object Include the specified parameter to set the attribute value. Parameter NIOS 5. the method returns the attribute value. and string types. the value is the number of seconds that have elapsed since January 1st. For email. enable_ddns( ) Use this method to set or retrieve the enable_ddns flag of a DHCP Fixed Address template object. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. A) . the method returns true when the modification succeeds. will set override_ddns_domainname to "false".

If this flag is set to false all the defined DHCP options will be returned to the client. the method returns the attribute value. ddns_hostname( ) Use this method to set or retrieve the ddns_hostname value of a DHCP Fixed Address template object. Returns If you specified a parameter. If you did not specify a parameter. the method returns true when the modification succeeds. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. and returns false when the operation fails. NIOS 5. Parameter Desired name for the dynamic DNS host name in string format. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. the method returns true when the modification succeeds. Returns If you specified a parameter. Example #Get ddns_hostname my $ddns_hostname = $fixed_addr->ddns_hostname().1r4 Page 119 (Rev. Example # Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $fixed_addr_template->ignore_dhcp_option_list_request(). and returns false when the operation fails. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. The default value is false. name( ) Use this method to set or retrieve the name of a DHCP Fixed Address template object. the method returns true when the modification succeeds. the method returns the attribute value. and returns false when the operation fails. ignore_dhcp_option_list_request( ) Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP fixed address teplate object. and returns false when the operation fails. Parameter Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate it. If you did not specify a parameter. the method returns the attribute value. Include the specified parameter to set the attribute value. the method returns the attribute value. A) . This setting overrides the upper-level settings. Example #Get ddns_domainname my $ddns_domainname = $fixed_addr->ddns_domainname(). # Modify ignore_dhcp_option_list_request $fixed_addr_template->ignore_dhcp_option_list_request("true"). Parameter Name of the fixed address template in string format with a maximum of 64 characters. # Un-override ignore_dhcp_option_list_request $fixed_addr_template->ignore_dhcp_option_list_request(undef). #Modify ddns_domainname $fixed_addr->ddns_domainname("test_domain. #Modify ddns_hostname $fixed_addr->ddns_hostname("test_host").com").Infoblox API Documentation Desired name for the dynamic DNS domain name in string format. If you did not specify a parameter.

0. Parameter The number of addresses in this fixed address template. and returns false when the operation fails. and network is set to 10. Include the specified parameter to set the attribute value. Example #Get nextserver my $nextserver = $fixed_addr_template->nextserver(). if offset is set to 10 and number_of_addresses is set to 10. the method returns the attribute value.1r4 Page 120 (Rev. the method returns the attribute value. #Modify number_of_addresses $fixed_address_template->number_of_addresses("10"). If you did not specify a parameter. #Modify nextserver $fixed_addr_template->nextserver("3. and returns false when the operation fails. The offset is calculated from the start address of network template to which the fixed address template is assigned to. If you did not specify a parameter.0. nextserver( ) Use this method to set or retrieve the nextserver value of a DHCP Fixed Address template object. the method returns true when the modification succeeds. the method returns true when the modification succeeds. The FQDN consists of the host name followed by the domain name (example: abc. #Modify name $fixed_address_template->name("custom_fa_template"). Example #Get number_of_addresses my $number_of_addresses = $fixed_address_template-> number_of_addresses().3.10 and end address will be 10. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter.0. the method returns the attribute value. If you did not specify a parameter. the method returns true when the modification succeeds. This option is overridden independently from Infoblox::DHCP::FixedAddrTemplate->bootfile() and Infoblox::DHCP::FixedAddrTemplate>bootserver(). Returns If you specified a parameter. Parameter The address offset of this fixed address template.3. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.Infoblox API Documentation Example #Get name my $name = $fixed_address_template->name().0. Omit the parameter to retrieve the attribute value. The default value is undefined. #Un-override nextserver $fixed_addr_template->nextserver(undef).4").20. Returns If you specified a parameter. and returns false when the operation fails.0. For example.0. A) . then there will be 10 fixed address object created and start address will be 10. Example NIOS 5. A next server name can have a maximum of 256 bytes. offset( ) Use this method to set or retrieve the address offset of a Fixed Address template object.com).0/8. number_of_addresses( ) Use this method to set or retrieve the number of addresses in a DHCP Fixed Address template object.

User can specify the duration of time it takes a host to connect to a boot server. override_ddns_domainname( ) The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP Fixed Address is used. Example #Get options my $options = $fixed_addr_template->options(). and download the file it needs to boot. #Modify options $fixed_addr_template->options([$option1. Mins and Secs fields. the method returns the attribute value. the method returns the attribute value. options( ) Use this method to set or retrieve the options of a DHCP Fixed Address template object. the method returns the attribute value.Infoblox API Documentation #Get offset my $offset = $fixed_address_template->offset(). the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Include the specified parameter to set the attribute value. Returns If you specified a parameter. Set the parameter to "false" to inherit the grid-level setting for ddns_domainname. such as a TFTP server. the method returns true when the modification succeeds. instead of the grid default. $option2]). Parameter Set the parameter to "true" to override the grid-level setting for ddns_domainname. and returns false when the operation fails. pxe_lease_time( ) Use this method to set or retrieve the pxe_lease_time value of a DHCP Fixed Address template object. The override_ddns_domainname attribute can be specified explicitly.1r4 Page 121 (Rev. A) . It is also set implicitly when ddns_domainname is set to a defined value. If you did not specify a parameter. #Modifying override_ddns_domainname $fixed_addr_template->override_ddns_domainname("true"). Parameter Options describe network configuration settings and various services available on the network. Returns If you specified a parameter. Example #Get pxe_lease_time NIOS 5. #Modify offset $fixed_address_template->offset("10"). These options occur as variablelength fields at the end of DHCP messages. Hours. The default value of this parameter is "false". and returns false when the operation fails. the method returns true when the modification succeeds. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. Example #Getting override_ddns_domainname my $override_ddns_domainname=$fixed_addr_template->override_ddns_domainname( ). Parameter Enter appropriate values in the Days. See Infoblox::DHCP::Option for parameters and methods available for this object.

com" ). #Verify if the DHCP Fixed Address templateexists in the Infoblox appliance my $object = $session->get( object => "Infoblox::DHCP::FixedAddrTemplate". #Modify pxe_lease_time $fixed_addr_template->pxe_lease_time("369"). ":" . Infoblox::status_code() . #appliance user login password => "infoblox" #appliance password ). ). "offset" => "10".1r4 Page 122 (Rev. get. "enable_ddns" => "TRUE".3". } print "DHCP Fixed Address template object created successfully\n". modify. unless ($session) { die("Construct session failed: ". unless($option2) { die("Construct option2 object failed: ".2".1. ). Infoblox::status_detail()).com".com". "comment" => "add fixed address template". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. "nextserver" => "3. Infoblox::status_detail()). this sample includes error handling for the operations. ":" . my $option2 = Infoblox::DHCP::Option->new( "name" => "merit-dump". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. NIOS 5. Infoblox::status_code() . ":" . "bootfile" => "bootfile. Also. "value" => "mydomain. "pxe_lease_time" => "3600". and remove. A) . } print "option1 object created successfully\n". $option2 ]. unless($option1) { die("Construct option1 object failed: ". Infoblox::status_code() . unless($fixed_addr_template) { die("Construct Fixed Address template failed: ". my $option1 = Infoblox::DHCP::Option->new( "name" => "fqdn". Infoblox::status_detail()). #PROGRAM STARTS: Include all the modules that will be used use strict.com".3. } print "option2 object created successfully\n". Infoblox::status_detail()). "ddns_hostname" => "test_host". } print "Session created successfully\n". #Create a DHCP Fixed Address template object #Create a DHCP Fixed Address template object my $fixed_addr_template = Infoblox::DHCP::FixedAddrTemplate->new( "name" => "custom_fa_template".Infoblox API Documentation my $pxe_lease_time = $fixed_addr_template->pxe_lease_time(). name => "custom_fa_template" ). use Infoblox. "number_of_addresses" => "1". #appliance host ip username => "admin". "bootserver" => "someserver.168. Infoblox::status_code() . "options" => [ $option1. ":" . "value" => "sometextdump".3. "ddns_domainname" => "test_domain.

). safe to add the fixed address template\n". comment => "add network". ":" . print "DHCP Fixed Address template added successfully\n". name => "custom_fa_template". $session->add($fixed_addr_template) or die("Add Fixed Address template failed: ". unless ($object) { die("Get Fixed Address template object failed: ". $session->status_detail()). my $network_template = Infoblox::DHCP::NetworkTemplate->new( name => "custom_network_template". } print "Search Fixed Address template object found at least 1 matching entry\n". $session->status_detail()). $session->status_detail()). my $object = $retrieved_objs[0]. my $object = $retrieved_objs[0]. ":" . name => "custom_fa_template". #Un-override nextserver $object->nextserver(undef). ":" .Infoblox API Documentation unless ($object) { print "Fixed Address templatedoes not exist on server. A) . $session->status_code() . #Modify one of the attributes of the obtained Fixed Address template object $object->pxe_lease_time("1234"). #Create the Network Template object with fixed address template my $template = Infoblox::DHCP::Template->new( name => "custom_fa_template". ). } print "DHCP Fixed Address template added successfully\n". #Add the Network template object into the Infoblox appliance through a session NIOS 5. } print "Get Fixed Address template object found at least 1 matching entry\n". Infoblox::status_code() . #Search a DHCP Fixed Address template object #Search DHCP Fixed Address template object through the session my @retrieved_objs = $session->search( object => "Infoblox::DHCP::FixedAddrTemplate". fixed_address_templates => [$template] ). $session->status_code() . ":" . unless($network_template) { die("Construct Network template object failed: ". ":" . #Un-override bootfile $object->bootfile(undef).1r4 Page 123 (Rev. #Un-override bootserver $object->bootserver(undef). $session->status_code() . $session->status_detail()). $session->status_code() . #Get and modify a DHCP Fixed Address template object #Get DHCP Fixed Address template object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddrTemplate". } print "Network template object created successfully\n". ). unless ($object) { die("Search Fixed Address template object failed: ". #Apply the changes $session->modify($object) or die("Modify Fixed Address template failed: ". Infoblox::status_detail()).

Infoblox API Documentation my $resp = $session->add($network_template) or die("Add Network object failed: ".1r4 Page 124 (Rev. name => "custom_fa_template". $session->status_code() . $session->status_code() .infoblox. print "Network Template object removed successfully \n". Infoblox::Session->modify(). NIOS 5.Infoblox::Session.com/ SEE ALSO Infoblox::Session. ":" . ":" . $session->status_detail()). #Get Fixed Address template object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::FixedAddrTemplate". ":" . print "Network template object added to Infoblox appliance successfully\n". A) . Infoblox::Session->add(). ":" . ####PROGRAM ENDS#### AUTHOR Infoblox Inc.Infoblox::DHCP::Template. print "Fixed Address template object removed successfully \n". $session->status_detail()). Infoblox::Session->get(). $session->status_code() . Infoblox::Session->remove(). $session->status_code() . #Remove a Fixed Address template object #Remove a Network Template object $session->remove($network_template) or die("Remove Network Template template object failed: ". Infoblox::DHCP::RangeTemplate. $session->status_detail()). http://www. my $object = $retrieved_objs[0]. Infoblox::DHCP::Option COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. unless ($object) { die("Get Fixed Address template object failed: ". ). #Submit the object for removal $session->remove($object) or die("Remove Fixed Address template object failed: ". Infoblox::DHCP::NetworkTemplate. } print "Get Fixed Address template object found at least 1 matching entry\n". $session->status_detail()).

Infoblox API Documentation Infoblox::DHCP::IPv6Network . $zone2. #Optional / Default is "default" network view zone_associations => [$zone1.DHCP IPv6 Network object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS auto_create_reversezone( ) comment( ) extensible_attributes( ) network( ) network_container( ) network_view( ) zone_associations( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::IPv6Network . # Submit for adding an IPv6 network NIOS 5. See Infoblox::Session->add() for parameters and return values. ] | undef. see Infoblox::DHCP::Network object. when creating an IPv6 network auto_create_reversezone => "true" | "false". SESSION METHODS This section describes all the methods in an Infoblox::Session module that can apply to a DHCP IPv6 Network object.. Example #Adding a IPv6 network. CONSTRUCTOR network => $ipv6_subnet/prefix.1r4 Page 125 (Rev. a network that it serves must be defined. . . A) .DHCP IPv6 Network object DESCRIPTION When DHCP services are configured on an appliance. After a network is created. $string => [ $string | $num. #Optional / Default is undefined comment => $string| undef.. #Optional / Default is "/" network_view => $NetworkView. ). #Required. ].. Infoblox::Session->add( ) Use this method to add a IPv6 network object to the Infoblox appliance. . #Optional / Default is an empty list ). you can then create all the subnetworks individually or create a parent network that encompasses all the subnetworks. } #Optional / Default is undefined network_container => $ipv6_subnet/prefix. #Construct an object my $network = Infoblox::DHCP::IPv6Network->new( network => "2001::/64". For IPv4 networks. #Optional / Default is undefined extensible_attributes => { $string => $string | $num.. This object allows the user to create IPv6 networks...

first use get() or search() to retrieve the specific object. # Submit for removal my $response = $session->remove( $desired_network ). my $desired_network = $result_array[0]. The IPv6 address and netmask of an IPv6 network in CIDR format. # Submit modification my $response = $session->modify( $object ). Infoblox::Session->remove( ) Use this method to remove an object from the Infoblox appliance. See Infoblox::Session->search() for parameters and return values. network views are searched. extensible_attributes => { 'Site' => 'Santa Clara' } @result_array = $session->get( object => "Infoblox::DHCP::IPv6Network" . network => "2001::/64". # find the desired object from the retrieved list. my ). The network view in which the network is located. => "2001::/64". network . $object->comment("This is a new comment"). A hash reference containing extensible attributes. Example #Use method to modify comment. and then submit this object for removal.Optional. my ). comment => "my-comment". => "default" Infoblox::Session->search( ) Use this method to search for a DHCP IPv6 Network object in the Infoblox appliance. network_view => "default" @result_array = $session->get( object => "Infoblox::DHCP::IPv6Network" . Key References Apply the following attributes to get a specific DHCP IPv6 Network object: comment . extensible_attributes . A) .Optional. See Infoblox::Session->modify() for parameters and return values. Example # Get the object under the same name my @result_array = $session->get( object network network_view ).Optional. Examples A comment in string format (regular expression).1r4 Page 126 (Rev. Infoblox::Session->get( ) Use this method to retrieve all the matching IPv6 network objects from the Infoblox appliance.Infoblox API Documentation my $response = $session->add( $network ). See Infoblox::Session->get() for parameters and return values.Optional. all my @result_array = $session->get( object => "Infoblox::DHCP::IPv6Network" . See Infoblox::Session->remove() for parameters and return values. => "Infoblox::DHCP::IPv6Network" . To remove a specific object. Infoblox::Session->modify( ) Use this method to modify an IPv6 network object in the Infoblox appliance. ). Key References Apply the following attributes to search for a DHCP IPv6 Network object: NIOS 5. By default. network_view .

Omit the parameter to retrieve the attribute value. the method returns the attribute value. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP IPv6 Network object auto_create_reversezone( ) Use this method to set the auto_create_reversezone flag of a DHCP IPv6 Network object. A) . Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. By default. Returns If you specified a parameter. network => "2001. Example # Modify auto_create_reversezone $network_container->auto_create_reversezone("true"). comment( ) Use this method to set or retrieve a descriptive comment of an IPv6 network object. Returns If you specified a parameter. A hash reference containing extensible attributes. network_view => "default" ). comment => "my-comment". The default value for this field is "false".Optional. Examples A comment in string format (regular expression). network . NIOS 5.Optional. The IPv6 address and netmask of an IPv6 network in CIDR format. and returns false when the operation fails.Infoblox API Documentation comment . # search for all DHCP IPv6 Network objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6Network". extensible_attributes => { 'Site' => 'Santa Clara' } ). The network view in which the network is located. If you did not specify a parameter. and returns false when the operation fails.1r4 Page 127 (Rev. Parameter Enter a descriptive comment for the network in string format with a maximum of 256 bytes. This is a write-only attribute and cannot be retrieved after being set. ). extensible_attributes . Include the specified parameter to set the attribute value. Example # Get comment my $comment = $network->comment(). Parameter Specify "true" to set the auto_create_reversezone flag or "false" to deactivate/unset it. # search IPv6 network by comment my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6Network". extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with an IPv6 network object Include the specified parameter to set the attribute value.Optional. Omit the parameter to retrieve the attribute value. all # search for all DHCP IPv6 Network objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6Network". network_view . # Modify comment $network->comment("add an IPv6 network").Optional. the method returns true when the modification succeeds.*". network views are searched.

Example #Get extensible attributes my $ref_extensible_attributes = $network->extensible_attributes(). The default value is the "default" network view. For email. Include the specified parameter to set the attribute value. network( ) Use this method to retrieve the network attribute of a DHCP IPv6 Network object. the method returns true when the modification succeeds. For a list. Omit the parameter to retrieve the attribute value. A) . the method returns true when the modification succeeds. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. Example #Get network container my $network_container = $network->network_container(). Parameter NIOS 5. The default value is undefined. If you did not specify a parameter. URL.1r4 Page 128 (Rev. Returns If you specified a parameter. Example #Get network my $network = $network->network(). 1970 UTC. 'Administrator' => [ 'Peter'. Omit the parameter to retrieve the attribute value. network_container( ) Use this method to set or retrieve the network container of a DHCP IPv6 Network object. the value is the number of seconds that have elapsed since January 1st. #Modify network container $network->network_container("2001::/64"). If you did not specify a parameter. If you did not specify a parameter. the method returns the attribute value. Include the specified parameter to set the attribute value. Returns If you specified a parameter. the value is a string with a maximum of 64 characters. Parameter Specify the address and netmask of the network in CIDR format (example: 2001::/64). the method returns the attribute value. Parameter Specify the address and netmask of the network in CIDR format (example: 2001::/64). the method returns true when the modification succeeds. and returns false when the operation fails. and string types. For a date. and returns false when the operation fails.Infoblox API Documentation Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. the value is a string with a maximum of 256 characters. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. 'Tom' ] }). network_view( ) Use this method to set or retrieve the network view of the IPv6 network object. the method returns the attribute value. For an integer. Include the specified parameter to set the attribute value. and returns false when the operation fails. #Modify extensible attributes $network->extensible_attributes({ 'Site' => 'Santa Clara'. the value is an integer from -2147483648 through 2147483647. which means the network is in the default network view.

If you did not specify a parameter. NIOS 5. username => "admin".com". and returns false when the operation fails. Infoblox::status_detail()). If you did not specify a parameter. the method returns the attribute value. #Clear zone_assocations $network->zone_associations([]).1. and returns false when the operation fails. Example #Get network view my $nview = $network->network_view(). with an Infoblox::DHCP::View object $network->network_view($nview). #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. Infoblox::status_code() . search. the method returns true when the modification succeeds.com". unless ($session) { die("Construct session failed: ". A) . Returns If you specified a parameter. If the network has a parent.Infoblox API Documentation Valid value is a defined Infoblox::DHCP::View object. #Preparation prior to a DHCP IPv6 network insertion #PROGRAM STARTS: Include all the modules that will be used use strict.2". ). ). Examples #Getting zone associations my $zone_associations = $network->zone_associations(). ##Remove the override for zone_associations $network->zone_associations(undef) SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. Returns If you specified a parameter. zone_associations( ) Use this method to set or retrieve the associated zone information. ":" . ). the method returns true when the modification succeeds. #Modifying zone_associations $network->zone_associations([$zone1. #Create a DHCP IPv6 Network object my $network = Infoblox::DHCP::IPv6Network->new( network => "2001::/64". modify. and remove. } print "Session created successfully\n". This sample also includes error handling for the operations. the method returns the attribute value. comment => "add network". #Modify network view. The default value is an empty list. use Infoblox. my $zone2 = Infoblox::DNS::Zone->new( name => "test2.1r4 Page 129 (Rev.168. password => "infoblox" ). it is possible to use the zone associations of the parent by setting the parameter to undef. $zone2]). The default network view value is the system-defined default network view object. Parameter The valid value is an array reference that contains Infoblox::DNS::Zone object(s). my $zone1 = Infoblox::DNS::Zone->new( name => "test1.

#Submit the object for removal $session->remove($object) or die("Remove Network failed: ". unless ($object) { die("Get Network object failed: ". my $object = $retrieved_objs[0]. #Search for a specific Network #Search the network my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6Network". NIOS 5. ":" . #Resize an IPv6 network #Get IPv6 Network through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::IPv6Network" . ":" . #Modify one of the attributes of the specified IPv6 network $object->comment("This is a new comment"). $session->status_code() . #Remove an IPv6 Network Object #Get IPv6 Network object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::IPv6Network" . my $object = $retrieved_objs[0]. network => "2001::/64" ). $session->status_code() . $session->status_code() . $session->status_code() . #Apply the changes $session->modify($object) or die("Modify Network attribute failed: ". print "Network added successfully\n". } print "Get Network found at least 1 matching entry\n". $session->status_detail()). unless ($object) { die("Search Network failed: ".Infoblox API Documentation my $response = $session->add($network) or die("Add Network failed: ". A) . print "Network object modified successfully \n". $session->status_detail()). network => "2001::" ). network => "2001::" ). ":" . #Get and modify a Network attribute #Get IPv6 Network through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::IPv6Network" . my $object = $retrieved_objs[0]. $session->status_code() . ":" . $session->status_detail()). $session->status_detail()).*" ). my $object = $retrieved_objs[0]. network => "2001. unless ($object) { die("Get Network object failed: ". } print "Get Network object found at least 1 matching entry\n". $session->status_code() .1r4 Page 130 (Rev. } print "Search Network found at least 1 matching entry\n". ":" . $session->status_detail()). $session->status_detail()). ":" .

Infoblox::DHCP::NetworkContainer. Infoblox::DHCP::View.1r4 Page 131 (Rev. A) . ####PROGRAM ENDS#### AUTHOR Infoblox Inc. Infoblox::Session->get(). Infoblox::Session->remove(). Infoblox::DHCP::IPv6NetworkContainer. NIOS 5. Infoblox::Session->search().infoblox. Infoblox::Session->add().com/ SEE ALSO Infoblox::Session. http://www. Infoblox::Session->modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::DHCP::Network.Infoblox API Documentation print "Network removed successfully \n".

when creating a network container auto_create_reversezone => "true" | "false". ].. #Optional / Default is "false" comment => $string| undef. Example #Adding an IPv6 network container..1r4 Page 132 (Rev.Infoblox API Documentation Infoblox::DHCP::IPv6NetworkContainer . ). #Optional / Default is undefined network_container => $ipv6_subnet/prefix. See Infoblox::Session->add() for parameters and return values. ] | undef. #Optional / Default is an empty list extensible_attributes => { $string => $string | $num. } #Optional / Default is undefined ).. #Optional / Default is "/" network_view => $NetworkView.DHCP IPv6 Network Container object DESCRIPTION A network can contain child networks. A) . SESSION METHODS This section describes all the methods in an Infoblox::Session module that you can apply to a DHCP IPv6 Network Container object. This object encapsulates an IPv6 network container object. Infoblox::Session->add( ) Use this method to add a DHCP IPv6 Network Container object to the Infoblox appliance. # Submit for adding a network container NIOS 5. .. . $zone2. #Required. ..DHCP IPv6 Network Container object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS auto_create_reversezone( ) comment( ) extensible_attributes( ) network( ) network_container( ) network_view( ) zone_associations( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::IPv6NetworkContainer . CONSTRUCTOR my $network = Infoblox::DHCP::IPv6NetworkContainer->new( network => $ipv6_subnet/prefix. $string => [ $string | $num. #Optional / Default is the system-defined default network view zone_associations => [$zone1. #Construct an object my $network_container = Infoblox::DHCP::IPv6NetworkContainer->new( network => "2001::/64". The network that contains the child network is called a network container..

=> "default" Infoblox::Session->search( ) Use this method to search for a DHCP IPv6 Network Container object in the Infoblox appliance.Optional.1r4 Page 133 (Rev. # Find the desired object in the retrieved list. network_view => "default" @result_array = $session->get( object => "Infoblox::DHCP::IPv6NetworkContainer". my ). extensible_attributes . A comment in string format. network_view .Optional. To remove a specifc object.Optional. Examples The IPv6 address and netmask of a network in CIDR format. my $network_container = $result_array[0]. my ). network views are searched. See Infoblox::Session->remove() for parameters and return values. $network_container->comment("modified comment"). Infoblox::Session->modify( ) Use this method to modify a DHCP IPv6 Network Container object in the Infoblox appliance. A) . all A hash reference containing extensible attributes. Key References Apply the following attributes to search for a DHCP IPv6 Network Container object: NIOS 5. By default. Example # Get the object under the same name my @result_array = $session->get( object network network_view ). extensible_attributes => { 'Site' => 'Santa Clara' } @result_array = $session->get( object => "Infoblox::DHCP::IPv6NetworkContainer". network => "2001::/64". # Submit modification my $response = $session->modify( $network_container ). See Infoblox::Session->modify() for parameters and return values.Optional. Infoblox::Session->get( ) Use this method to retrieve all the matching DHCP IPv6 Network Container objects from the Infoblox appliance. ). Infoblox::Session->remove( ) Use this method to remove an object from the Infoblox appliance. first use get() or search() to retrieve the specific object. # Submit for removal my $response = $session->remove( $network_container ). and then submit this object for removal. comment => "my-comment". See Infoblox::Session>get() for parameters and return values. Example #Use method to modify comment. Key References Apply the following attributes to get a specific DHCP IPv6 Network Container object: network . The network view in which the network is located. my @result_array = $session->get( object => "Infoblox::DHCP::IPv6NetworkContainer".Infoblox API Documentation my $response = $session->add( $network_container ). See Infoblox::Session->search() for parameters and return values. => "Infoblox::DHCP::IPv6NetworkContainer" . => "2001::/64". comment .

Example # Get comment my $comment = $network_container->comment(). Include the specified parameter to set the attribute value. all A hash reference containing extensible attributes.1r4 Page 134 (Rev. By default. and returns false when the operation fails. comment => "my-comment". extensible_attributes( ) NIOS 5.Infoblox API Documentation network .Optional. If you did not specify a parameter. auto_create_reversezone( ) Use this method to set the auto_create_reversezone flag of a DHCP IPv6 Network Container object. network => "2001. extensible_attributes . # Modify comment $network_container->comment("add a network"). ). # search for all DHCP IPv6 Network Container objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6NetworkContainer".Optional. # search for all DHCP IPv6 Network Container objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6NetworkContainer". Parameter Specify "true" to set the auto_create_reversezone flag or "false" to deactivate/unset it. Example # Modify auto_create_reversezone $network_container->auto_create_reversezone("true"). Omit the parameter to retrieve the attribute value. The default value for this field is "false". A) . Returns If you specified a parameter. # search network by comment my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6NetworkContainer". the method returns true when the modification succeeds.Optional. This is a write-only attribute and cannot be retrieved after it is set. extensible_attributes => { 'Site' => 'Santa Clara' } ). network_view => "default" ). Returns If you specified a parameter. the method returns the attribute value. Include the specified parameter to set the attribute value. expression). A comment in string format (regular expression).Optional. comment . METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP IPv6 Network Container object. network_view . the method returns true when the modification succeeds. network views are searched. Examples The IPv6 address and netmask of a network in CIDR format (regular The network view in which the network is located. and returns false when the operation fails.*". comment( ) Use this method to set or retrieve a descriptive comment for a DHCP IPv6 Network Container object. Parameter Enter a descriptive comment for the network container in string format with a maximum of 256 bytes.

the value is a string with a maximum of 64 characters. For a date. NIOS 5. 'Tom' ] }). The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. Parameter Specify the address and netmask of the network in CIDR format (example: 2001::/64).Infoblox API Documentation Use this method to set or retrieve the extensible attributes associated with a DHCP IPv6 Network Container object Include the specified parameter to set the attribute value. the value is a string with a maximum of 256 characters. Omit the parameter to retrieve the attribute value. 1970 UTC. Example #Get network my $network = $network_container->network(). Returns If you specified a parameter. Include the specified parameter to set the attribute value. the method returns the attribute value. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. and returns false when the operation fails. A) . and returns false when the operation fails. the method returns the attribute value. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. the method returns the attribute value. The default value is the system-defined default network view. which means the network is in the default network view. Returns If you specified a parameter. For a list.1r4 Page 135 (Rev. network( ) Use this method to retrieve the network attribute of a DHCP IPv6 Network Container object. network_view( ) Use this method to set or retrieve the network view of the DHCP IPv6 network container. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. network_container( ) Use this method to set or retrieve the network container of a DHCP IPv6 Network Container object. the value is the number of seconds that have elapsed since January 1st. Example #Get extensible attributes my $ref_extensible_attributes = $network_container->extensible_attributes(). URL. If you did not specify a parameter. and returns false when the operation fails. For email. the method returns true when the modification succeeds. #Modify extensible attributes $network_container->extensible_attributes({ 'Site' => 'Santa Clara'. and string types. Example #Get network container my $network_container = $network->network_container(). Parameter Specify the address and netmask of the network in CIDR format (example: 2001::/64). #Modify network container $network->network_container("2001::/64"). the value is an integer from -2147483648 through 2147483647. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. the method returns true when the modification succeeds. Returns If you specified a parameter. 'Administrator' => [ 'Peter'. The default value is undefined. For an integer.

If you did not specify a parameter. and remove. the method returns true when the modification succeeds.2". The default network view value is the system-defined default network view object.Infoblox API Documentation Parameter Valid value is a defined Infoblox::DHCP::View object. Parameter The valid value is an array reference that contains Infoblox::DNS::Zone object(s). Infoblox::status_code() . and returns false when the operation fails.168. Returns If you specified a parameter. NIOS 5. If you did not specify a parameter. my $zone2 = Infoblox::DNS::Zone->new( name => "test2. If the network container has a parent. the method returns the attribute value. Returns If you specified a parameter. #Preparation prior to a DHCP IPv6 Network Container object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. password => "infoblox" ). with an Infoblox::DHCP::View object $network_container->network_view($nview). Example #Get network view my $nview = $network_container->network_view().com". my $zone1 = Infoblox::DNS::Zone->new( name => "test1.1. ). use Infoblox. This sample also includes error handling for the operations.1r4 Page 136 (Rev. Infoblox::status_detail()). The default value is an empty list. $zone2]).com". A) . #Clear zone_assocations $network_container->zone_associations([]). #Create a DHCP IPv6 Network Container object my $network_container = Infoblox::DHCP::IPv6NetworkContainer->new( network => "2001::/64". zone_associations( ) Use this method to set or retrieve the associated zone information. unless ($session) { die("Construct session failed: ". modify. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. #Modify network view. ). } print "Session created successfully\n". Examples #Getting zone associations my $zone_associations = $network_container->zone_associations(). search. the method returns the attribute value. ":" . and returns false when the operation fails. #Modifying zone_associations $network_container->zone_associations([$zone1. the method returns true when the modification succeeds. it is possible to use the zone associations of the parent by setting the parameter to undef. username => "admin". ##Remove the override for zone_associations $network_container->zone_associations(undef) SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add.

print "Network Container object modified successfully \n". my $object = $retrieved_objs[0]. $session->status_detail()). unless ($object) { die("Get Network Container object failed: ". $session->status_code() . my $response = $session->add($network_container) or die("Add Network Container failed: ".1r4 Page 137 (Rev. network => "2001::" ). #Submit the object for removal $session->remove($object) or die("Remove Network Container failed: ". ":" . ":" .Infoblox API Documentation comment => "add network container". $session->status_code() . #Remove a Network Container Object #Get Network Container object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::IPv6NetworkContainer" . ":" . $session->status_detail()). #Search for a specific Network Container #Search the network container my @retrieved_objs = $session->search( object => "Infoblox::DHCP::IPv6NetworkContainer". $session->status_code() . ":" .*" ). $session->status_code() . my $object = $retrieved_objs[0]. $session->status_code() . my $object = $retrieved_objs[0]. #Apply the changes $session->modify($object) or die("Modify Network Container attribute failed: ". } print "Search Network Container found at least 1 matching entry\n". $session->status_detail()). $session->status_detail()). #Get and modify an IPv6 Network Container attribute #Get Network Container through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::IPv6NetworkContainer" . ":" . print "Network Container added successfully\n". unless ($object) { die("Get Network Container object failed: ". $session->status_code() . } print "Get Network Container object found at least 1 matching entry\n". $session->status_detail()). A) . ":" . #Modify one of the attributes of the specified IPv6 network container attribute $object->comment("modified comment"). } print "Get Network Container found at least 1 matching entry\n". ). network => "2001. print "Network Container removed successfully \n". ####PROGRAM ENDS#### NIOS 5. network => "2001::/64" ). $session->status_detail()). unless ($object) { die("Search Network Container failed: ".

NIOS 5. Infoblox::Session>modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::Session->search(). Infoblox::DHCP::Network.infoblox. Infoblox::DHCP::NetworkContainer. Infoblox::DHCP::IPv6Network. http://www.1r4 Page 138 (Rev.Infoblox API Documentation AUTHOR Infoblox Inc. Infoblox::DHCP::View. A) . Infoblox::Session->add().com/ SEE ALSO Infoblox::Session. Infoblox::Session->remove(). Infoblox::Session->get().

1r4 Page 139 (Rev. such as the time when the Infoblox appliance NIOS 5. A) .DHCP Lease object.DHCP Lease object. DESCRIPTION A DHCP lease provides information about the lease of an IP address to a DHCP client. NAME DESCRIPTION SESSION METHODS Infoblox::Session->get( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS billing_class( ) binding_state( ) client_hostname( ) cltt( ) discovered_name( ) discoverer( ) ends( ) first_discovered( ) hardware( ) ipv4addr( ) last_discovered( ) mac( ) network( ) network_component_description( ) network_component_ip( ) network_component_name( ) network_component_port_description( ) network_component_port_name( ) network_component_port_number( ) network_component_type( ) network_view( ) netbios( ) next_binding_state( ) on_commit( ) on_expiry( ) on_release( ) option( ) os( ) port_duplex( ) port_link_status( ) port_speed( ) port_status( ) port_vlan_description( ) port_vlan_name( ) port_vlan_number( ) starts( ) tsfp( ) tstp( ) uid( ) username( ) served_by( ) variable( ) v_cluster( ) v_datacenter( ) v_host( ) v_name( ) v_netadapter( ) v_switch( ) v_type( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Lease .Infoblox API Documentation Infoblox::DHCP::Lease .

10".Optional. SESSION METHODS This section describes all the methods in the Infoblox::Session module that can be applied to a DHCP Lease object. End IPv4 address (32 bits) of the DHCP range. IPv4 address (32 bits) of the DHCP lease. Start IPv4 address (32 bits) of the DHCP range. Infoblox::Session->get( ) Use this method to retrieve all the matching DHCP Lease objects from the Infoblox appliance. Key References Apply the following attributes to search for a DHCP Lease object: ipv4addr .1r4 Page 140 (Rev. See Infoblox::Session->get() for parameters and return values. Discovered VMware cluster name.0. my @retrieved_objs = $session->get( object => ipv4addr => mac => username => ).Optional.Infoblox API Documentation issued or freed an IP address. IPv4 address (32 bits) of the DHCP lease (regular expression). "johndoe" #Get DHCP leases in a DHCP range. MAC address of the DHCP lease. A) . v_type => 'VirtualMachine'). Example #Remove a DHCP Lease object.0.Optional.Optional. Name of the network view that contains the lease. mac . username . v_host .Optional.0.0.Optional. end_addr . Example #Get a DHCP lease by IP address. first use get() or search() to retrieve the specific object. It allows the Infoblox appliance to store and correlate DHCP lease information over the lifetime of a lease. ).0. v_cluster . start_addr => "10. and then submit this object for removal.Optional.Optional. "HostSystem".1". my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Lease" .10" ). See Infoblox::Session->search() for parameters and return values. ipv4addr => "10.0. end_addr => "10. network_view .0. #Get DHCP leases by v_type: my @retrieved_objs = $session->get( object => 'Infoblox::DHCP::Lease'. To remove a specific object. v_type . v_name . "10. my $response = $session->remove( object => "Infoblox::DHCP::Lease" .Optional. Discovered VMware physical network adapter name.Optional. Infoblox::Session->search( ) Use this method to search for DHCP Lease objects in the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values. "Infoblox::DHCP::Lease". NIOS 5. v_datacenter . Discovered VMware entity type (possible values: "VirtualMachine". Discovered VMware datacenter name. "VirtualCenter"). Discovered VMware host or virtual machine name. Discovered VMware server name.Optional.0. the MAC address and host name of the client that received the IP address. Key References Apply the following attributes to get a specific DHCP Lease object: ipv4addr .Optional. Infoblox::Session->remove( ) Use this method to remove a DHCP Lease object from the Infoblox appliance. and the grid member that supplied the lease. v_netadapter . v_switch .Optional. User name associated with the DHCP lease.Optional. start_addr . Discovered VMware virtual switch name.10" "22:22:22:22:22:22".

Example #get binding_state my $binding_state = $lease->binding_state(). User name associated with the DHCP lease (regular expression).Optional.Optional. v_datacenter . End IPv4 address (32 bits) of the DHCP range. # search a DHCP lease by v_datacenter: my @retrieved_objs = $session->search( object => 'Infoblox::DHCP::Lease'.Optional. v_netadapter . client_hostname( ) Use this method to retrieve the client_hostname of a DHCP Lease object. end_addr . v_switch . v_type . METHODS This section describes all the methods that can be used to configure and retrieve the attribute value of a DHCP Lease object. Discovered VMware datacenter name (regular expression). username .Optional. MAC address of the DHCP lease (regular expression). binding_state( ) Use this method to retrieve the binding state for the current lease. The lease state can be one of the following: Free : The lease is available for clients to use. This method specifies the class to which this lease is currently billed.*" ). "VirtualCenter"). Discovered VMware server name (regular expression). but the DHCP client never renewed it.Optional. v_datacenter => 'test.*'). v_host . v_name . Parameter N/A Returns The method returns the attribute value.Optional. Parameter N/A Returns The method returns the attribute value.Optional. A) . Example #get billing_class my $billing_class = $lease->billing_class(). mac => "22:.Optional. Expired : The lease was in use. billing_class( ) Use this method to retrieve the billing_class of a DHCP Lease object. start_addr . my @result_array = $session->search( object => "Infoblox::DHCP::Lease". Parameter NIOS 5.*". Active : The lease is currently in use by a DHCP client. Example #Search a DHCP lease. Discovered VMware physical network adapter name (regular expression). "HostSystem". Name of the network view that contains the lease. Released : The DHCP client returned the lease to the appliance.1r4 Page 141 (Rev. Discovered VMware virtual switch name (regular expression). ipv4addr => "^10\. Discovered VMware entity type (possible values: "VirtualMachine". so it is no longer valid. This method specifies the host name that the DHCP client sends to the Infoblox appliance using DHCP option 12.Optional.*".Optional. Discovered VMware cluster name (regular expression). network_view . Discovered VMware host or virtual machine name (regular expression). Abandoned: The Infoblox appliance cannot lease this IP address because the appliance received a response when it pinged the address. Start IPv4 address (32 bits) of the DHCP range.Infoblox API Documentation mac .Optional. v_cluster . username => "john.Optional.

A) . Parameter N/A Returns The method returns the attribute value. Example #get cltt my $cltt = $lease->cltt().1r4 Page 142 (Rev. discovered_name( ) Use this method to retrieve the discovered name of a DHCP Lease object. and time that a lease ended. Example NIOS 5. Parameter none Returns The method returns the discovered name. ends( ) Use this method to retrieve the end time value of a DHCP Lease object.Infoblox API Documentation N/A Returns The method returns the attribute value. discoverer( ) Use this method to retrieve the discoverer of a DHCP Lease object. date. Parameter none Returns The method returns the discoverer value. Example #Get discovered_name my $discovered_name = $lease->discovered_name(). cltt( ) Use this method to retrieve the CLTT (Client Last Transaction Time) value of a DHCP Lease object. Example #get client_hostname my $client_hostname = $lease->client_hostname(). Parameter N/A Returns The method returns the attribute value. This method specifies the time of the last transaction with the DHCP client for this lease. This method specifies the day. Example #Get discoverer my $discoverer = $lease->discoverer().

Parameter N/A Returns The method returns the attribute value. Example #get hardware my $hardware = $lease->hardware(). Example #get ipv4addr my $ipv4addr = $lease->ipv4addr(). last_discovered( ) Use this method to retrieve the time when this object was last discovered. Example #Get last_discovered my $last_discovered = $lease->last_discovered().1r4 Page 143 (Rev. Example #Get first_discovered my $first_discovered = $lease->first_discovered(). Parameter N/A Returns The method returns the attribute value. Parameter N/A Returns The method returns the attribute value. hardware( ) Use this method to retrieve the hardware type of a DHCP Lease object. Parameter none Returns The method returns the date and time when the DHCP Lease object was first discovered. This method specifies the MAC address of the network interface on which the lease will be used. first_discovered( ) Use this method to retrieve the date and time when the DHCP Lease object was first discovered. The default value for this field is empty. mac( ) NIOS 5.Infoblox API Documentation #get ends my $ends = $lease->ends(). ipv4addr( ) Use this method to retrieve the IP address that the Infoblox appliance leased to the DHCP client. A) .

Example #Get network_component_ip my $network_component_ip = $lease->network_component_ip(). Parameter none Returns The method returns the network device name. Parameter none Returns The method returns the network device description. network_component_ip( ) Use this method to retrieve the IP address of the network device that is connected to the DHCP Lease object.1r4 Page 144 (Rev. A) . Example #get mac my $mac = $lease->mac().Infoblox API Documentation Use this method to retrieve the MAC address of the DHCP client that leased the IP address. network_component_name( ) Use this method to retrieve the name of the network device that is connected to the DHCP Lease object. Parameter N/A Returns The method returns the network associated with the lease in the string of the form "network/netmask". Example #Get network_component_description my $network_component_description = $lease->network_component_description(). Example #get network property of the lease my $network = $lease->network(). This property is read-only. network_component_description( ) Use this method to retrieve the description of the network device that is connected to the DHCP Lease object. NIOS 5. Parameter N/A Returns The method returns the attribute value. network( ) Use this method to find the network associated with this lease. Parameter none Returns The method returns the network device IP address.

Parameter none Returns The method returns the name of the port on the network device. A) . network_component_type( ) Use this method to retrieve the type of the network device that is connected to the DHCP Lease object.1r4 Page 145 (Rev. Example #Get network_component_port_number my $network_component_port_number = $lease->network_component_port_number(). network_view( ) Use this method to retrieve the network view of the DHCP lease. Parameter none Returns The method returns the description of the network device port. Example #Get network_component_type my $network_component_type = $lease->network_component_type(). Parameter none Returns The method returns the network device type. Example #Get network_component_port_description my $network_component_port_description = $lease->network_component_port_description(). network_component_port_number( ) Use this method to retrieve the number of the network device port that is connected to the DHCP Lease object. Parameter none Returns The method returns the network device port number in the range 0-9999. Parameter NIOS 5. network_component_port_description( ) Use this method to retrieve the description of the network device port that is connected to the DHCP Lease object. Example #Get network_component_port_name my $network_component_port_name = $lease->network_component_port_name().Infoblox API Documentation Example #Get network_component_name my $network_component_name = $lease->network_component_name(). network_component_port_name( ) Use this method to retrieve the name of the network device port that is connected to the DHCP Lease object.

Active : The lease is currently in use by a DHCP client. next_binding_state( ) Use this method to retrieve the subsequent binding state when the current lease expires. but the DHCP client never renewed it. Parameter N/A Returns The method returns the attribute value. on_commit( ) Use this method to retrieve the list of commands to be executed upon the granting of the lease. so it is no longer valid. Released : The DHCP client returned the lease to the appliance. Free : The lease is available for clients to use. Expired : The lease was in use. Abandoned: The Infoblox appliance cannot lease this IP address because the appliance received a response when it pinged the address. Example #get next_binding_state my $next_binding_state = $lease->next_binding_state(). Returns The method returns the attribute value. on_expiry( ) Use this method to retrieve the list of commands to be executed upon the expiration of the lease. Parameter N/A Returns The method returns the attribute value. Example #Get network view my $nview = $lease->network_view().1r4 Page 146 (Rev.Infoblox API Documentation N/A Returns This method returns the network view of the DHCP lease as Infoblox::DHCP::View object. netbios( ) Use this method to retrieve the name in the NetBIOS reply that responded to a NetBIOS query. Parameter N/A Returns The method returns the attribute value. Example #Get netbios my $netbios = $lease->netbios(). A) . Example #get on_commit my $on_commit = $lease->on_commit(). NIOS 5.

The returend value. port_link_status( ) The method returns the link status of the network device port. Example #get option my $option = $lease->option(). Example #get on_release my $on_release = $lease->on_release(). Parameter N/A Returns The method returns the attribute value. os( ) Use this method to retrieve the operating system associated with this DHCP lease. is one of the following: Full Half Example #Get port_duplex my $port_duplex = $lease->port_duplex(). on_release( ) Use this method to retrieve the list of commands to be executed upon the release of the lease. if any. if any.Infoblox API Documentation Example #get on_expiry my $on_expiry = $lease->on_expiry(). A) .1r4 Page 147 (Rev. Parameter none Returns The method returns the duplex setting of the network device port. Returns The method returns the attribute value. is one of the following: NIOS 5. Parameter N/A Returns The method returns the attribute value. Example #Get os my $os = $lease->os(). port_duplex( ) Use this method to retrieve the duplex setting of the network device port that is connected to the DHCP Lease object. option( ) Use this method to retrieve the option value of a DHCP Lease object. This method specifies the agent circuit ID and remote ID sent by a DHCP relay agent in DHCP option 82. The returned value.

Returned values. if any. Parameter none Returns The method returns the speed value of the network device port. Parameter none Returns The method returns the VLAN description of the network device port. port_vlan_description( ) Use this method to retrieve the VLAN description of the network device port that is connected to the DHCP Lease object.1r4 Page 148 (Rev. The returned value. port_vlan_name( ) NIOS 5. if any. are one of the following: Connected Not Connected Unknown Example #Get port_link_status my $port_link_status = $lease->port_link_status(). Parameter none Returns The method returns the status of the network device port.Infoblox API Documentation Parameter none Returns The method returns the port link status. The returned value. A) . is one of the following: Up Down Unknown Example #Get port_status my $port_status = $lease->port_status(). port_status( ) Use this method to retrieve the status of the network device port that is connected to the DHCP Lease object. if any. is one of the following: 10M 100M 1G 10G 100G Unknown Example #Get port_speed my $port_speed = $lease->port_speed(). port_speed( ) Use this method to retrieve the speed of the network device port that is connected to the DHCP Lease object. Example #Get port_vlan_description my $port_vlan_description = $lease->port_vlan_description().

Example #Get port_vlan_name my $port_vlan_name = $lease->port_vlan_name(). Parameter none Returns The method returns the VLAN name of the network device port. tsfp( ) Use this method to retrieve the TSFP (Time Sent From Partner) value of a DHCP Lease object. Example #get tsfp my $tsfp = $lease->tsfp(). from the point of view of a local DHCP failover peer. This method specifies the day. Parameter N/A Returns The method returns the attribute value. Parameter none Returns The method returns the VLAN number of the network device port in the range 0-9999. A) . Parameter N/A Returns The method returns the attribute value. Parameter N/A NIOS 5. from the point of view of a remote DHCP failover peer. This method specifies the time that the current lease state ends. date. starts( ) Use this method to retrieve the start time value of a DHCP Lease object. and time that the lease started. This method specifies the time that the current lease state ends. port_vlan_number( ) Use this method to retrieve the VLAN number of the network device port that is connected to the DHCP Lease object. tstp( ) Use this method to retrieve the TSTP (Time Sent To Partner) value of a DHCP Lease object.1r4 Page 149 (Rev.Infoblox API Documentation Use this method to retrieve the VLAN name of the network device port that is connected to the DHCP Lease object. Example #get starts my $starts = $lease->starts(). Example #Get port_vlan_number my $port_vlan_number = $lease->port_vlan_number().

Parameter N/A Returns The method returns the attribute value. username( ) Use this method to retrieve the user name that the server has associated with a DHCP Lease object. if a DDNS update was successfully completed by the server.Infoblox API Documentation Returns The method returns the attribute value. Parameter N/A Returns The method returns the attribute value. This method keeps all variables related to the DDNS update of the DHCP lease. The variables can be one of the following: ddns-text record when the lease. This method specifies the client identifier that the DHCP client sends the Infoblox appliance (in DHCP option 61) when it acquires the lease. : The ddns-text variable is used to record the value of the client's TXT identification interim DDNS update style has been used to update the DNS service for a particular ddns-fwd-name : The ddns-fwd-name variable records the value of the name used when the client's A record was updated. Example #get served_by my $served_by = $lease->served_by(). served_by( ) Use this method to retrieve the IP address of the server that hands out an active lease to a client. Parameter N/A Returns The method returns the attribute value. variable( ) Use this method to retrieve the variable value of a DHCP Lease object. The server may have used this name when it updated the client's PTR record as well. Example #get username my $username = $lease->username().1r4 Page 150 (Rev. uid( ) Use this method to retrieve the UID (User ID) value of a DHCP Lease object. Example #get tstp my $tstp = $lease->tstp(). A) . NIOS 5. Not all DHCP clients send a UID. Example #get uid my $uid = $lease->uid().

The default value is an empty string. Example #Get v_host my $v_host = $lease->v_host(). ddns-rev-name : If the server successfully updates the client's PTR record.1r4 Page 151 (Rev. Example #Get v_cluster my $v_cluster = $lease->v_cluster(). v_datacenter( ) Use this method to retrieve the name of the VMware datacenter associated with the DHCP Lease object. The default value is an empty string. then the ddns-client-fqdn variable records the name that the client indicated it used. This method is read-only. A) . This method is read-only. Parameter none Returns This method returns a string that contains the VMware cluster name.Infoblox API Documentation ddns-client-fqdn : If the server is configured to use the interim DDNS update style. Example #Get v_datacenter my $v_datacenter = $lease->v_datacenter(). Parameter none Returns This method returns a string that contains the VMware host name. v_host( ) Use this method to retrieve the name of the VMware host associated with the DHCP Lease object. Parameter N/A Returns The method returns the attribute value. Example #get variable my $variable = $lease->variable(). and is also configured to allow clients to update their own FQDNs. This is also the name that the server used to update the client's PTR record in this case. The default value is an empty string. v_cluster( ) Use this method to retrieve the name of the VMware cluster associated with the DHCP Lease object. and the client did in fact update its own FQDN. This method is read-only. Parameter none Returns This method returns a string that contains the VMware datacenter name. this variable will record the name that the DHCP server used for the PTR record. v_name( ) NIOS 5. The name to which the PTR record points will be either the ddns-fwd-name or the ddns-client-fqdn.

NIOS 5.Infoblox API Documentation Use this method to retrieve the name of the VMware entity associated with the DHCP Lease object. A) . can be one of the following: VirtualMachine HostSystem VirtualCenter Example #Get v_type my $v_type = $lease->v_type(). Parameter none Returns This method returns a string that contains the VMware entity name. This method is read-only. Example #Get v_netadapter my $v_netadapter = $lease->v_netadapter(). v_type( ) Use this method to retrieve the type of VMware entity associated with the DHCP Lease object. Parameter none Returns This method returns a string that contains the VMware entity name. v_switch( ) Use this method to retrieve the name of the virtual switch through which the VMware entity is connected to the appliance. The default value is an empty string. This method is read-only. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP Lease object.1r4 Page 152 (Rev. Parameter none Returns This method returns a string that contains the network adapter name. This method is read-only. search. The returned value. Example #Get v_switch my $v_switch = $lease->v_switch(). such as get. The default value is an empty string. Also. The default value is an empty string. The default value is an empty string. Example #Get v_name my $v_name = $lease->v_name(). if any. and remove. this sample code includes error handling for the operations. Parameter none Returns This method returns a string that contains the virtual switch name. v_netadapter( ) Use this method to retrieve the name of the physical network adapter through which the VMware entity is connected to the appliance. This method is read-only.

A) . } print "dhcp range object created successfully.2".0. ":" . #Add the dhcp range to the Infoblox appliance $session->add($dhcp_range) or die("Add dhcp range failed: ". Infoblox::status_code() . } print "Member object created successfully\n". ":" . Infoblox::status_detail()).168. NIOS 5. use Infoblox. => "10. range object = Infoblox::DHCP::Range->new( => "10.1r4 Page 153 (Rev.\n".localdomain". $session->add($network) or die("Add network failed: ". #Create a session to the Infoblox appliance my $host_ip = "192. Infoblox::status_detail()).Infoblox API Documentation #Preparation prior to DHCP Lease operations use strict. $session->status_code().\n". unless($dhcp_range){ die("Construct dhcp range object failed: ". ":" . my $session = Infoblox::Session->new( master => $host_ip.1.0. Infoblox::status_code() . network => "10. unless ($session) { die("Construct session failed: ".0. => "10. Infoblox::status_code(). ipv4addr => $host_ip. } print"Network added successfully. unless($network){ die("Construct network object fail: ".Infoblox::status_detail()). ). #Create a network object my $network = Infoblox::DHCP::Network->new( network => "10. #appliance host ip username => "admin".10". ":" . #Verify if the network exists my $object = $session->get( object => "Infoblox::DHCP::Network". Infoblox::status_code(). } print "Session created successfully.\n". #appliance user login password => "infoblox" #appliance password ).0.0/8" ).\n".0.0. my $host_name = "infoblox. ":" . safe to add the network.\n".0.0. #Create a member object my $member = Infoblox::DHCP::Member->new( name => $host_name.0/8".0/8".0.$session->status_detail()). members => [$member] ). comment => "add network". $session->status_code(). #Create a dhcp my $dhcp_range network start_addr end_addr member ). ":" .Infoblox::status_detail()). unless($member) { die("Construct member failed: ". unless($object){ print"Network does not exist on server.1". => $member.$session->status_detail()).0. } print"Network object created successfully.

$session->status_detail()).*' ). NIOS 5. Infoblox::DHCP::View. ":" .\n".\n". } print "Import dhcp lease successfull. Infoblox::Session->add(). ipv4addr => "10. $session->status_code() . my $result = $session->import_data( "type" => "leases". $session->status_code() . "format" => "ISC". $session->status_code() . "lease_precedence" => "replace-previous" ). } print "Search dhcp lease object found at least 1 matching entry\n". unless($result){ die("Import lease failed: ". print "dhcp lease object removed successfully \n".1r4 Page 154 (Rev. my $desired_lease = $retrieved_objs[0]. ipv4addr => '^10\. ":" . my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Lease". Infoblox::Session->remove(). "path"=> ". unless($desired_lease){ die("search lease failed: ". #Search for a DHCP Lease object my @retrieved_objs= $session->search( object => "Infoblox::DHCP::Lease" . #Remove a DHCP Lease object #Submit the object for removal $session->remove($desired_lease) or die("Remove dhcp lease failed: ". $session->status_detail()). Infoblox::Session->get(). } print "Get dhcp lease object found at least 1 matching entry\n"./API_unit_test_sample_code/import_dhcpd.10" ). ":" . $session->status_detail()). unless($desired_lease){ die("get lease failed: ".infoblox.lease". ####PROGRAM ENDS#### AUTHOR Infoblox Inc. ":" . my $desired_lease = $retrieved_objs[0].Infoblox API Documentation print "dhcp range added successfully.0.. $session->status_code() .com/ SEE ALSO Infoblox::Session.0. Infoblox::DHCP::Range COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::DHCP::Network. $session->status_detail()). A) . #Get a DHCP Lease object #Get a DHCP lease by IP address. Infoblox::Session->search(). http://www.

. Infoblox::Session->add( ) Use this method to add a DHCP MAC object to the Infoblox appliance.. #Optional / Default is empty comment => $string. .1r4 Page 155 (Rev. The filter instructs the Infoblox device either to grant or deny an address request if the requesting host matches the filter. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS authentication_time( ) comment( ) expired( ) expiration_time( ) expiration_type( ) extensible_attributes( ) filter( ) mac( ) reserved_for_infoblox( ) username( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::MAC . "0".DHCP MAC object.Infoblox API Documentation Infoblox::DHCP::MAC . "new". See Infoblox::Session->add() for parameters and return values.. #Optional / Default is 0 for never expire extensible_attributes => { $string => $string | $num. A) . CONSTRUCTOR my $mac = Infoblox::DHCP::MAC->new( filter => $string. The Infoblox device can filter address requests by the MAC address of a requesting hosts. }. NIOS 5. SESSION METHODS This section describes all the methods in Infoblox::Session module that you can apply to a DHCP MAC object. it is possible configure specific MAC addresses within a filter to expire after a certain amount of time has passed. "dhcp mac object". #Required mac => $mac_addr.. #Required authentication_time => $num. . Also. "infoblox_user". Example #Construct a DHCP MAC object my $mac = Infoblox::DHCP::MAC->new( "mac" => "filter" => "comment" => "expiration_time" => "username" => "00:00:00:00:00:03". #Optional / Default is empty expiration_time => $num.DHCP MAC object. #Optional / Default is empty ). #Optional / Default is undefined reserved_for_infoblox => $string. $string => [ $string | $num. ]. #Optional / Default is "false" username => $string. DESCRIPTION A MAC Address is a unique hardware identifier.

#Submit for removal my $response = $session->remove( $desired_mac ). ). #Submit for addition my $response = $session->add($mac) Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. filter . Infoblox::Session->search( ) Use this method to search for DHCP MAC objects in the Infoblox appliance. Infoblox::Session->remove( ) Use this method to remove a DHCP MAC object from the Infoblox appliance. and then submit this object for removal. #Submit modification my $response = $session->modify( $mac ). See Infoblox::Session->get() for parameters and return values. See Infoblox::Session->modify() for parameters and return values.Optional. Key References Apply the following attributes to get a specific DHCP MAC object: mac . my $desired_mac = $retrieved_objs[0]. Example #Get DHCP MAC object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MAC". mac => "00:00:00:00:00:03". A) . ). $mac->expiration_time("1234567890"). Username of the DHCP MAC object. comment . username . To remove a specific object. extensible_attributes => { 'Site' => 'Santa Clara' } ).Optional. "reserved_for_infoblox" => "For Infoblox Use only". Example #Get DHCP MAC object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MAC". ). Example #Use method to modify the expiration time.Infoblox API Documentation "authentication_time" => "0".Optional. Key References Apply the following attributes to search for a specific DHCP MAC Address object: NIOS 5. A comment in string format.Optional. See Infoblox::Session->search() for parameters and return values. first use get() or search() to retrieve the specific DHCP MAC object. extensible_attributes . filter => "new". MAC address of the DHCP MAC object. A hash reference containing extensible attributes. #Find the desired object from the retrieved list. filter => "new". See Infoblox::Session->remove() for parameters and return values. # get all objects with a given extensible attribute my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MAC". MAC filter name. Infoblox::Session->modify( ) Use this method to modify a DHCP MAC object in the Infoblox appliance.Optional. mac => "00:00:00:00:00:03".1r4 Page 156 (Rev.

If you did not specify a parameter. Example #Get comment my $comment = $mac->comment(). Example # search for all DHCP MAC objects that are specified in the "new" MAC filter. authentication_time( ) Use this method to set or retrieve the authentication time.Infoblox API Documentation comment . Example #Get authentication_time my $authentication_time = $mac->authentication_time(). Returns If you specified a parameter. and returns false when the operation fails. Indicates the time when the MAC address was first authenticated. MAC address of the DHCP MAC object (regular expression). The maximum value can extend upto 4294967295. #Modify authentication_time $mac->authentication_time("1234567890"). the method returns true when the modification succeeds. mac => "00:00:00:00:00. Omit the parameter to retrieve the attribute value. filter .Optional. the method returns the attribute value. the method returns true when the modification succeeds. username . Username of the DHCP MAC object (regular expression). Parameter The absolute UNIX time (seconds since UNIX epoch) when the address was authenticated. Returns If you specified a parameter. comment( ) Use this method to set or retrieve a descriptive comment. Omit the parameter to retrieve the attribute value.Optional. #Modify comment $mac->comment("Modified DHCP MAC comment").Optional. filter => "new" ). # search all DHCP MAC associations with the extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::MAC". Include the specified parameter to set the attribute value. METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a DHCP MAC object. A hash reference containing extensible attributes. A) . Parameter Desired comment in string format with a maximum of 256 bytes.Optional.*". extensible_attributes .Optional. extensible_attributes => { 'Site' => 'Santa Clara' }). Parameter None NIOS 5. and returns false when the operation fails. MAC address filter name.1r4 Page 157 (Rev. Include the specified parameter to set the attribute value. my @retrieved_objs = $session->search( object => "Infoblox::DHCP::MAC". mac . expired( ) Use this method to retrieve the expired flag of the DHCP MAC object . If you did not specify a parameter. A comment in string format (regular expression). the method returns the attribute value.

If you did not specify a parameter. Example #Get expiration_time my $expiration_time = $mac->expiration_time(). For email. and returns false when the operation fails. Parameter By default. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. URL. 1970 UTC. it is the absolute UNIX time (seconds since UNIX epoch) when the address expires. the method returns the attribute value. the method returns true when the modification succeeds. If you did not specify a parameter. Include the specified parameter to set the attribute value. The default value is undefined. If the return value is "1". the value is an integer from -2147483648 through 2147483647. expiration_time( ) Use this method to set or retrieve the expiration time of the DHCP MAC object. the value is a string with a maximum of 64 characters. MAC Address will automatically expire after the time defined in expiration time. the MAC address never expires. Example #Get expired my $expired = $mac->expired(). otherwise. the value is a string with a maximum of 256 characters. The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. Parameter None. Returns If you specified a parameter. For a list.Infoblox API Documentation Returns The method returns the attribute value. and returns false when the operation fails. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP MAC object. expiration_type( ) Use this method to retrieve the expiration type of the DHCP MAC object. Example #Get extensible attributes NIOS 5. Example #Get expiration_type my $expiration_type = $mac->expiration_type().1r4 Page 158 (Rev. Omit the parameter to retrieve the attribute value. and string types. For an integer. The maximum value can extend upto 4294967295. the method returns true when the modification succeeds. Returns If you did not specify a parameter. #Modify expiration_time $mac->expiration_time("1234567890"). the method returns the attribute value. the method returns the attribute value. Omit the parameter to retrieve the attribute value. If the return value is "0" means. Returns If you specified a parameter. A) . For a date. the MAC Address never expires. the value is the number of seconds that have elapsed since January 1st.

1r4 Page 159 (Rev. Both of the following formats are acceptable: 11:11:11:11:11:11 and 11-11-11-11-11-11. #Modify extensible attributes $mac->extensible_attributes({ 'Site' => 'Santa Clara'. Comment cannot exceed 1024 bytes long. mac( ) Use this method to set or retrieve the MAC address of the DHCP MAC object . Parameter Reserved to write comment related to this particular MAC address. A) . Parameter Name of the DHCP MAC filter. Parameter MAC Address of the DHCP MAC object. Include the specified parameter to set the attribute value. the method returns the attribute value. Maximum length upto 1024 bytes is supported. Returns If you specified a parameter. the method returns true when the modification succeeds. If you did not specify a parameter. filter( ) Use this method to set or retrieve the filter value of the DHCP MAC object . #Modify reserved_for_infoblox $mac->reserved_for_infoblox("reserved for Infoblox"). Returns If you specified a parameter. Example #Get filter my $filter = $mac->filter(). and returns false when the operation fails. username( ) Use this method to set or retrieve the user name of the DHCP MAC object . #Modify mac $mac->mac("00:00:00:11:11:11"). Omit the parameter to retrieve the attribute value. If you did not specify a parameter. Include the specified parameter to set the attribute value. Returns If you specified a parameter. the method returns the attribute value. Example #Get mac my $mac_value = $mac->mac(). Omit the parameter to retrieve the attribute value. #Modify filter $mac->filter("filter1"). If you did not specify a parameter. 'Tom' ] }). Format for the hexadecimal strings for MAC addresses and vendor prefixes with colons or dashes.Infoblox API Documentation my $ref_extensible_attributes = $mac->extensible_attributes(). reserved_for_infoblox( ) Set this flag to reserve the MAC address for an Infoblox appliance. and returns false when the operation fails. Include the specified parameter to set the attribute value. Example #Get reserved_for_infoblox my $reserved_for_infoblox = $mac->reserved_for_infoblox(). 'Administrator' => [ 'Peter'. the method returns true when the modification succeeds. the method returns the attribute value. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. NIOS 5. the method returns true when the modification succeeds.

#Preparation prior to a DHCP MAC object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. "mac_filter". } print "Session created successfully\n". } print "DHCP MAC Filter added successfully\n". name => "mac_filter"). $session->status_detail()). ":" . ":" . "dhcp mac object". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object. "0". use Infoblox. and returns false when the operation fails. unless ($session) { die("Construct session failed: ". and remove.2". } print "MAC Filter object created successfully\n". Maximum of 128 characters supported. "0". Infoblox::status_detail()). Parameter User name of the DHCP MAC object. Returns If you specified a parameter. Infoblox::status_detail()).168. NIOS 5. modify. #Create a DHCP MAC object my $mac = Infoblox::DHCP::MAC->new( "mac" => "filter" => "comment" => "expiration_time" => "username" => "authentication_time" => "reserved_for_infoblox" => ). #appliance user login password => "infoblox" #appliance password ). Infoblox::status_code() . A) . ":" . "infoblox_user". Example #Get username my $username = $mac->username(). #appliance host ip username => "admin". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. safe to add the mac filter\n". #Verify if the DHCP MAC Filter exists in the Infoblox appliance my $object = $session->get(object => "Infoblox::DHCP::Filter::MAC". If you did not specify a parameter. Used for authenticated DHCP purposes. #Modify username $mac->username("user_infoblox"). Infoblox::status_code() . the method returns true when the modification succeeds. #Create a DHCP MAC Filter object my $macfilter = Infoblox::DHCP::Filter::MAC->new ( "name" => "mac_filter").Infoblox API Documentation Include the specified parameter to set the attribute value. unless($macfilter) { die("Construct mac filter failed: ". "00:00:00:00:00:01". This sample also includes error handling for the operations. unless ($object) { print "mac filter does not exist on server. such as add. $session->status_code() . search.1. the method returns the attribute value. "For Infoblox Use only". $session->add($macfilter) or die("Add mac filter failed: ".1r4 Page 160 (Rev. Omit the parameter to retrieve the attribute value.

Infoblox::status_detail()). $session->status_detail()). $session->status_code() . ":" . print "MAC Address object modified successfully \n". filter => "mac_filter" ). my $object = $retrieved_objs[0]. ). print "MAC Address Filter object removed successfully \n". $session->status_code() . #Search for a specific DHCP MAC Address object #Search for all DHCP MAC address objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::MAC". $session->status_detail()). $session->status_code() . $session->status_detail()). A) .Infoblox API Documentation unless($mac) { die("Construct MAC object failed: ". print "MAC Address object removed successfully \n". ":" . unless ($object) { die("Search for MAC Address object failed: ". #Submit the object for removal $session->remove($object) or die("Remove MAC Address object failed: ". $session->status_code() . ":" . ####PROGRAM ENDS#### NIOS 5. ":" . ). unless ($object) { die("Get MAC Address object failed: ". } print "Get MAC Address object found at least 1 matching entry\n". #Submit the MAC Address Filter object for removal $session->remove($macfilter) or die("Remove MAC Address Filter object failed: ". #Remove a MAC Address object #Get MAC Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MAC". unless ($object) { die("Get MAC Address object failed: ". mac => "00:00:00:00:00:01". } print "Search MAC Address object found at least 1 matching entry\n". $session->status_detail()). } print "MAC Address object created successfully\n". print "DHCP MAC Address object added successfully\n". #Apply the changes $session->modify($object) or die("Modify MAC Address object failed: ". ":" . $session->status_detail()). my $object = $retrieved_objs[0]. ":" . $session->status_detail()). my $object = $retrieved_objs[0]. filter => "mac_filter". Infoblox::status_code() . $session->status_code() . mac => "00:00:00:00:00:01". #Get and modify a MAC Address object #Get MAC Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MAC". ":" . #Add the MAC Address object into the Infoblox appliance through a session $session->add($mac) or die("Add MAC Address object failed: ". $session->status_detail()). } print "Get MAC Address object found at least 1 matching entry\n". #Modify one of the attributes of the obtained MAC Address object $object->expiration_time("1234567890").1r4 Page 161 (Rev. $session->status_code() . ":" . $session->status_code() .

1r4 Page 162 (Rev. Infoblox::DHCP::Filter::RelayAgent. Infoblox::Session->remove(). Infoblox::Session->modify(). NIOS 5. Infoblox::DHCP::Lease.com/ SEE ALSO Infoblox::DHCP::Filter::MAC. http://www. Infoblox::Session>get(). Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::Session->search().infoblox.Infoblox API Documentation AUTHOR Infoblox Inc. A) .Infoblox::Session->add().

Infoblox::status_code() . distributed.Infoblox API Documentation Infoblox::DHCP::Member .0/255. Infoblox::DHCP::Range->member( ) Use this function to specify the primary member for a DHCP range. Example my $member1 = Infoblox::DHCP::Member->new( name => "localhost. #Create the my $network network members ). Example NIOS 5. Infoblox::status_detail()).1r4 Page 163 (Rev. Network object with this member = Infoblox::DHCP::Network->new( => "10.0. } print "Member object created successfully\n". See Infoblox::DHCP::Range->members() for parameters and return values. => [$member1]. A grid member inherits its settings from the grid. ipv4addr => "192.DHCP Member object. Infoblox::DHCP::Network->members( ) Use this function to specify the primary member for a network. #Optional ). See Infoblox::DHCP::Network->members() for parameters and return values.1. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::Network->members( ) Infoblox::DHCP::Range->member( ) METHODS ipv4addr( ) name( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Member . A member is a single Infoblox appliance or an HA pair that provides DHCP services seamlessly across an entire network. ). unless($member1) { die("Construct member failed: ".168.0. ":" . #Required name => $fqdn.2".DHCP Member object.0.0.0". MODULE METHODS This section describes all the functions that you can apply to an DHCP Member object. builtin database. A) . DESCRIPTION A grid member is part of a grid which is a group of two or more Infoblox appliances that share sections of a common. CONSTRUCTOR my $member = Infoblox::DHCP::Member->new( ipv4addr => $ipv4addr.localdomain".

10". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object. Example #Get ipv4Addr my $ipv4Addr = $member->ipv4Addr(). Infoblox::status_code() .1r4 Page 164 (Rev. Omit the parameter to retrieve the attribute value. Example #Get name my $name = $member->name(). unless($member) { die("Construct member failed: ". start_addr => "10. Returns If you specified a parameter. and returns false when the operation fails. ).0. A) . Returns If you specified a parameter. the method returns the attribute value.com"). METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a DHCP Member object.0/8".0. This sample also includes error handling for the operations. If you did not specify a parameter. ).0. member => $member. #Create the DHCP Range object with this member my $dhcp_range = Infoblox::DHCP::Range->new( network => "10.com). A host name can have a maximum of 256 characters. } print "Member object created successfully\n".0. The FQDN consists of the host name followed by the domain name (example: abc. Include the specified parameter to set the attribute value. Infoblox::status_detail()).infoblox.1. #Modify name $member->name("dhcp.1. Include the specified parameter to set the attribute value. #Preparation prior to a DHCP Member object insertion NIOS 5. the method returns the attribute value. the method returns true when the modification succeeds.168. name( ) Use this method to set or retrieve the name of the member. ":" . Parameter A name in FQDN (Fully Qualified Domain Name) format. and remove. Parameter IPv4 address (32 bits) of the member. search. ipv4addr( ) Use this method to set or retrieve the IPv4 address of the member.Infoblox API Documentation my $member = Infoblox::DHCP::Member->new( name => "localhost. modify.1".3"). If you did not specify a parameter.2". and returns false when the operation fails. end_addr => "10. the method returns true when the modification succeeds. such as add.168.0. Omit the parameter to retrieve the attribute value.localdomain".0. #Modify ipv4Addr $member->ipv4Addr("192. ipv4addr => "192.

Infoblox::status_detail()). #appliance user login password => "infoblox" #appliance password ).1r4 Page 165 (Rev. ). ":" . ####PROGRAM ENDS#### AUTHOR Infoblox Inc.0. Infoblox::status_detail()). unless ($session) { die("Construct session failed: ". ":" . Infoblox::Session->add().1. comment => "add network".Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.Infoblox API Documentation #PROGRAM STARTS: Include all the modules that will be used use strict. #Create a DHCP Member object my $member1 = Infoblox::DHCP::Member->new( name => "infoblox. ipv4addr => "192. unless($network) { die("Construct Network object failed: ". $session->status_code() . #appliance host ip username => "admin". $session->status_detail()).168.0. http://www.2".0". print "DHCP member object added to the network successfully\n".infoblox. Infoblox::status_detail()).0. A) .localdomain". } print "Session created successfully\n". #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". ":" .168. ":" .0/255. #Create the Network object with this member my $network = Infoblox::DHCP::Network->new( network => "10. NIOS 5. unless($member1) { die("Construct member failed: ".0. members => [ $member1 ] ). } print "Network object created successfully\n". Infoblox::status_code() . use Infoblox. } print "Member object created successfully\n".1.com/ SEE ALSO Infoblox::DHCP::Network. Infoblox::status_code() . Infoblox::status_code() . #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192.2".

Microsoft Server DHCP Option object. A) .1r4 Page 166 (Rev. Options that are not common to both are read-only. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::Grid::MSServer::DHCP->ms_options( ) Infoblox::DHCP::Range->ms_options( ) Infoblox::DHCP::FixedAddr->options( ) METHODS name( ) code( ) type( ) value( ) user_class( ) vendor_class( ) AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::MSOption . DESCRIPTION DHCP options describe network configuration settings and various services available on the network.Microsoft (r) Server DHCP Option object. You can add or change only DHCP options that are in the Microsoft server and NIOS predefined list of options.Infoblox API Documentation Infoblox::DHCP::MSOption . Following are the options that the Microsoft server and the NIOS predefined list of options have in common: code name ======================================================= 2 'Time Offset' 4 'Time Server' 5 'Name Servers' 7 'Log Servers' 8 'Cookie Servers' 9 'LPR Servers' 10 'Impress Servers' 11 'Resource Location Servers' 12 'Host Name' 13 'Boot File Size' 14 'Merit Dump File' 16 'Swap Server' 17 'Root Path' 18 'Extensions Path' 19 'IP Layer Forwarding' 20 'Nonlocal Source Routing' 21 'Policy Filter Masks' 22 'Max DG Reassembly Size' 23 'Default IP Time-to-live' 24 'Path MTU Aging Timeout' 25 'Path MTU Plateau Table' 26 'MTU Option' 27 'All subnets are local' 29 'Perform Mask Discovery' 30 'Mask Supplier Option' 31 'Perform Router Discovery' 32 'Router Solicitation Address' 33 'Static Route Option' 34 'Trailer Encapsulation' 35 'ARP Cache Timeout' 36 'Ethernet Encapsulation' 37 'TCP Default Time-to-live' 38 'Keepalive Interval' 39 'Keepalive Garbage' 40 'NIS Domain Name' 41 'NIS Servers' 42 'NTP Servers' 43 'Vendor Specific Info' 44 'WINS/NBNS Servers' 45 'NetBIOS over TCP/IP NBDD' 46 'WINS/NBT Node Type' 47 'NetBIOS Scope ID' 48 'X Window System Font' 49 'X Window System Display' 64 'NIS+ Domain Name' NIOS 5. These options occur as variablelength fields at the end of DHCP messages.

'DHCP Standard Options'. Infoblox::DHCP::FixedAddr->options( ) Use this function to specify DHCP options at the fixed address level. it uses the default Microsoft user class ). 'Time Offset'. 'DHCP Standard Options'. Example #Construct a DHCP Option object my $opt1 = Infoblox::DHCP::MSOption->new( name => code => type => value => vendor_class => user_class => ). it uses the default Microsoft vendor class user_class => $string. MODULE METHODS The following functions can be applied to a DHCP Option object. #Optional / If not specified.0. Infoblox::Grid::MSServer::DHCP->ms_options( ) Use this function to specify DHCP options at the Microsoft server level. => => => => => => 'LPR Servers'. NIOS 5. #Required type => $string. Infoblox::DHCP::Range->ms_options( ) Use this function to specify Microsoft DHCP options at the range level. 50. 9. See Infoblox::Grid::MSServer::DHCP->ms_options() for parameters and return values. # Configure a Microsoft DHCP option for a range my $response = $Range->ms_options([$opt1]).1.10.10. #Optional / If not specified.4. 'array of ip address'. See Infoblox::DHCP::Range->ms_options() for parameters and return values. 'Default User Class'. Example my $opt1 = Infoblox::DHCP::MSOption->new( name code type value vendor_class user_class ).1r4 Page 167 (Rev.1. #Required code => $int. 'Default User Class'. Example my $opt1 = Infoblox::DHCP::MSOption->new( name => 'Static Route Option'. 'long'. 2.Infoblox API Documentation 65 66 67 68 69 70 71 72 73 74 75 76 'NIS+ Servers' 'Boot Server Host Name' 'Bootfile Name' 'Mobile IP Home Agents' 'Simple Mail Transport Protocol (SMTP) Servers' 'Post Office Protocol (POP3) Servers' 'Network News Transport Protocol (NNTP) Servers' 'World Wide Web (WWW) Servers' 'Finger Servers' 'Internet Relay Chat (IRC) Servers' 'StreetTalk Servers' 'StreetTalk Directory Assistance (STDA) Servers' CONSTRUCTOR my $option = Infoblox::DHCP::MSOption->new( value => $num | $string |"true"|"false".1.4. A) .2'.1.4. #Required name => $string. See Infoblox::DHCP::FixedAddr->ms_options() for parameters and return values. '10. # Configure a DHCP option for a Microsoft DHCP server my $response = $MSServer_DHCP->options([$opt1]). #Required vendor_class => $string.

Infoblox API Documentation code type value ).1. Include the specified parameter to set the attribute value. Returns If you specified a parameter. => 'array of ip address pair'. and returns false when the operation fails. Include the specified parameter to set the attribute value. If you did not specify a parameter. the method returns true when the modification succeeds. It must be an integer from 1 to 254. If you did not specify a parameter. A) . code( ) Use this method to set or retrieve the code value of the DHCP option. #Modify code $option->code("12"). Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.5. Omit the parameter to retrieve the attribute value. # Configure a DHCP option for a network my $response = $FixedAddr->ms_options([$opt1]). => '10. the method returns the attribute value. the method returns the attribute value. #Modify name $option->name("Static Route Option").5. Parameter Specify the name of the Microsoft DHCP option in string format.1r4 Page 168 (Rev. It must be one of the following values: 'binary' 'byte' 'array of byte' 'array of ip address pair' 'ip address' 'array of ip address' 'long integer' 'array of long integer' 'long' 'array of long' 'array of string' 'array of word' 'encapsulated' NIOS 5. => 33. and returns false when the operation fails.1.1.0 10. the method returns true when the modification succeeds. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP option. Example #Get name my $name = $option->name(). Parameter Specify the code of the DHCP option.5. Example #Get code my $code = $option->code().1.1. Returns If you specified a parameter.5.10.2 10. type( ) Use this method to set or retrieve the type value of the DHCP option. Parameter Specify the type of the DHCP option. name( ) Use this method to set or retrieve the name of the DHCP option.3'.

the method returns the attribute value. Returns If you specified a parameter.Specify an IPv4 address.84467441 10^19 . the accepted type is a list of the specified types.Specify a pair of IPv4 addresses separated by a space. value( ) Use this method to set or retrieve the custom value of the DHCP option. the method returns true when the modification succeeds. the method returns the attribute value. Example #Get type my $type = $option->type(). Example #Get user_class my $name = $option->user_class(). Example #Get value my $value = $option->value(). and returns false when the operation fails. "binary" "byte" "encapsulated" "ip address" "ip address pair" "long" "long integer" "string" spaces and separated by colons. .1r4 Page 169 (Rev.. . a-f. If you did not specify a parameter. and returns false when the operation fails. #Modify user_class $option->user_class("Default User Class").Specify either a value in ASCII text string or a list of hexadecimal characters (0-9. If you did not specify a parameter.Specify a numeric value between 0 and 1. the method returns true when the modification succeeds. The default user class name is "Default User Class". If the type is set to 'array of. #Modify value $option->value("abc. If you specified a parameter. .Specify a numeric value between 0 and 255. A) .Encapsulated data. .. the method returns true when the modification succeeds. the method returns the attribute value.'. Parameter Specify the defined option space name in string format. or A-F) without .Infoblox API Documentation 'string' 'word' Returns If you specified a parameter. user_class( ) Use this method to set an option space name as the user class value of a DHCP option or to retrieve an option space name. NIOS 5. and returns false when the operation fails.com").Binary data. Include the specified parameter to set the attribute value.Specify a numeric value between 0 and 4294967295.Specify a numeric value between 0 and 65535. Omit the parameter to retrieve the attribute value. Parameter Specify the data type of the DHCP option. . "word" Returns . Omit the parameter to retrieve the attribute value. If you did not specify a parameter. . Include the specified parameter to set the attribute value. #Modify type $option->type("string").

infoblox. and returns false when the operation fails. #Modify vendor_class $option->vendor_class("DHCP Standard Options"). The default vendor space name is "DHCP Standard Options". Infoblox::Session->modify(). Parameter Specify the defined option space name in string format. Include the specified parameter to set the attribute value.com/ SEE ALSO Infoblox::Session. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Infoblox::Session->get().Infoblox API Documentation vendor_class( ) Use this method to set an option space name as the vendor class value of a DHCP option or to retrieve an option space name. Returns If you specified a parameter. A) . Example #Get vendor_class my $name = $option->vendor_class(). Infoblox::DHCP::Range. the method returns the attribute value. AUTHOR Infoblox Inc. the method returns true when the modification succeeds. Infoblox::DHCP::FixedAddr COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.Infoblox::Grid::MSServer::DHCP.1r4 Page 170 (Rev. http://www. NIOS 5.

Microsoft DHCP Server object. Infoblox::DHCP::FixedAddr->member( ) =head2 Infoblox::DHCP::Network->members( ) =head2 Infoblox::DHCP::NetworkTemplate->members( ) =head2 Infoblox::DHCP::RangeTemplate->member( ) =head2 Infoblox::DHCP::Range->member( ) Use this function to specify a member for any of the above objects.1". See their respective documentation pages for parameters and return values. ).0. A) .0. Network object with this member = Infoblox::DHCP::Network->new( => "10.0.Infoblox API Documentation Infoblox::DHCP::MSServer . CONSTRUCTOR my $member = Infoblox::DHCP::Member->new( address => $address. Omit the parameter to retrieve the attribute value. METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a DHCP MSServer object. Include the specified parameter to set the attribute value. Parameter The Microsoft DNS server address in IPV4 format. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::FixedAddr->member( ) METHODS address( ) name( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::MSServer . #Required name => $name. Example my $member1 = Infoblox::DHCP::MSServer->new( address => "10. address( ) Use this method to set or retrieve the address of the member. NIOS 5. #Optional ).1r4 Page 171 (Rev.Microsoft (r) DHCP Server object. #Create the my $network network members ).0.0.0/255. => [$member1].0. MODULE METHODS This section describes all the functions that you can apply to a DHCP MSServer object.0". DESCRIPTION This object is used to reference a Microsoft DHCP server.

the method returns true when the modification succeeds. If you did not specify a parameter. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. #Preparation prior to a DHCP MSServer object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. search. ":" . and remove.2". the method returns the attribute value. gateway => "3. unless ($grid_member) { die("Construct grid member object failed: ". #Create a grid member object my $grid_member = Infoblox::Grid::Member->new( name => "hostname. ipv4addr => "3. mask => "255. Example #Get name my $name = $member->name().1r4 Page 172 (Rev. name( ) Use this method to set or retrieve the name of the member.1. modify.com".Infoblox API Documentation Returns If you specified a parameter.0. the method returns the attribute value.0. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object. Parameter The Microsoft DNS server name in FQDN format. } print "Grid member object created successfully\n".0. and returns false when the operation fails.com"). #Modify name $member->name("msserver. such as add. This sample also includes error handling for the operations.168.0.3").2". #appliance host ip username => "admin".0". Include the specified parameter to set the attribute value.0.1. Infoblox::status_detail()). and returns false when the operation fails.1". unless ($session) { die("Construct session failed: ". comment => "Script Generated" ). } print "Session created successfully\n". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. Example #Get address my $address = $member->address(). #Adding the member object to appliance through session NIOS 5. ":" . #Modify address $member->address("192. #appliance user login password => "infoblox" #appliance password ).0. Infoblox::status_detail()). A) .168. Returns If you specified a parameter. use Infoblox. Infoblox::status_code() . If you did not specify a parameter. Infoblox::status_code() .

=> => => => => => => => => => '10. $session->status_detail()). 'true'. comment => "add network". ####PROGRAM ENDS#### AUTHOR Infoblox Inc. 'minimum'.0/255. A) . #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". { Site => 'Local'}.1'. 5. ). ":" . } print "Member object created successfully\n".0.0. ":" . $session->status_detail()). Infoblox::status_detail()). $session->status_code() . $session->status_code() . unless($network) { die("Construct Network object failed: ". my $msserver = Infoblox::Grid::MSServer->new( address comment disable extensible_attributes login password managing_member read_only synchronization_interval logging_mode ).1r4 Page 173 (Rev. 'hostname. #Adding the member object to appliance through session $response = $session->add( $msserver ).1".0". http://www. 'password'. ":" . Infoblox::status_code() .infoblox. 'user'. 'basic member'. ":" . 'false'. } print"Grid MS DNS server added successfully \n". $session->status_code() . } print"Grid member added successfully \n". Infoblox::status_code() .0. #Create a DHCP MSServer object my $member1 = Infoblox::DHCP::Member->new( address => "10. ":" . Infoblox::status_code() . unless ($msserver) { die("Construct grid MS DNS server object failed: ".0.0.Infoblox API Documentation my $response = $session->add( $grid_member ).0.com'. Infoblox::status_detail()).0. Infoblox::status_detail()). unless($member1) { die("Construct member failed: ". members => [ $member1 ] ).com/ SEE ALSO NIOS 5. unless ($response) { die("Add grid MS DNS server failed: ". ":" . print "DHCP member object added to the network successfully\n".0. } print "Network object created successfully\n". $session->status_detail()). unless ($response) { die("Add grid member failed: ". #Create the Network object with this member my $network = Infoblox::DHCP::Network->new( network => "10. } print "Grid MS DNS server object created successfully\n".

NIOS 5.Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.1r4 Page 174 (Rev. Infoblox::Session->add(). A) .Infoblox API Documentation Infoblox::DHCP::Network.

is undefined network_view is the default network view disable is "false" ) => $NetworkView. => => => => => 'test superscope'... A) .$dhcprange2.. #Optional { $string => $string | $num.]. CONSTRUCTOR my $superscope = Infoblox::DHCP::Superscope->new( name => ranges => comment => extensible_attributes => $num. . You can use a superscope to group and activate multiple ranges via a single object.1r4 Page 175 (Rev.Microsoft (r) Server Superscope object. }. #Required [ $dhcprange1. $string => [ $string | #Optional / Default SESSION METHODS This section describes all the methods in an Infoblox::Session module that you can apply to a superscope object. . 'test comment'.. $view. NIOS 5. #Required $string. See Infoblox::Session->add() for parameters and return values.. Example #Construct an object my $superscope = Infoblox::DHCP::MSSuperscope->new( name comment disable network_view ranges ). [ $dhcp_range ]. DESCRIPTION A superscope is a feature of Microsoft DHCP servers.. 'true'. ]. Infoblox::Session->add( ) Use this method to add a superscope object to the Infoblox appliance. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS comment( ) disable( ) extensible_attributes( ) name( ) network_view( ) ranges( ) range_high_water_mark( ) range_low_water_mark( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::MSSuperscope .Infoblox API Documentation Infoblox::DHCP::MSSuperscope . => "true" | "false".Microsoft Server Superscope object.. #Optional / Default #Optional / Default $string.

Infoblox::Session->remove( ) Use this method to remove a superscope object from the Infoblox appliance. Key References Apply the following attributes to get a specific superscope object: name . all network views are searched. By default. and then submit this object for removal. Comment value for the superscope (regular expression).Optional. first use get() or search() to retrieve the superscope object. A hash reference containing extensible attributes. my $desired_superscope = $retrieved_objs[0]. See Infoblox::Session->remove() for parameters and return values.Optional.Optional. See Infoblox::Session->modify() for parameters and return values. all network views are searched. extensible_attributes . Name value for the superscope. extensible_attributes => { 'Site' => 'Santa Clara' }). To remove a specific object.Infoblox API Documentation # Submit for addition my $response = $session->add( $superscope ).Optional. Example # Use this method to modify the comment. name => "test superscope" ).Optional. By default. comment . NIOS 5. See Infoblox::Session->get() for parameters and return values. $superscope->comment("this is a modified comment"). comment .Optional. newtork_view => "default" ). Network view in which the superscope is located. Example # Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MSSuperscope".1r4 Page 176 (Rev. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MSSuperscope". network_view .Optional. Infoblox::Session->search( ) Use this method to search for superscope objects in the Infoblox appliance. # Find the desired object from the retrieved list. Network view in which the superscope is located. Name value for the superscope (regular expression).Optional. A hash reference containing extensible attributes. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MSSuperscope". See Infoblox::Session->search() for parameters and return values. Infoblox::Session->modify( ) Use this method to modify a superscope object in the Infoblox appliance. Key References Apply the following attributes to search for a superscope object: name . extensible_attributes . # Submit for removal my $response = $session->remove( $desired_superscope ). Examples my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MSSuperscope". name => "some superscope". Comment value for the superscope. # Submit modification my $response = $session->modify( $superscope ). Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. network_view => "external" ). network_view . name => "other superscope". A) .

Include the specified parameter to set the attribute value. For an integer. The default value for this field is false. Omit the parameter to retrieve the attribute value. A) . the value is the number of seconds that have elapsed since January 1st. the method returns the attribute value. the method returns the attribute value. For a list. and returns false when the operation fails.Infoblox API Documentation Examples # search for superscope objects with comments ending with 'comment' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::MSSuperscope". Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. If you did not specify a parameter. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a superscope. Parameter Desired comment in string format with a maximum of 256 bytes. disable( ) Use this method to set or retrieve the disable flag of a superscope. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. For a date. Returns If you specified a parameter. the method returns the attribute value. If you did not specify a parameter. Include the specified parameter to set the attribute value. Example #Get disable my $disable = $superscope->disable(). the method returns true when the modification succeeds. the value is a string with a maximum of 64 characters. NIOS 5. The default value is undefined.*comment" ). URL. Omit the parameter to retrieve the attribute value. comment => ". the method returns true when the modification succeeds. If you did not specify a parameter. Example #Get comment my $comment = $superscope->comment(). The default value is undefined. #Modify disable $superscope->disable("false"). 1970 UTC. Returns If you specified a parameter. and returns false when the operation fails. #Modify comment $superscope->comment("Modifying the Superscope comment"). the value is an integer from -2147483648 through 2147483647. For email. extensible_attributes( ) Use this method to set or retrieve the extensible attributes that are associated with a superscope object.1r4 Page 177 (Rev. the value is a string with a maximum of 256 characters. and returns false when the operation fails. the method returns true when the modification succeeds. and string types. comment( ) Use this method to set or retrieve a descriptive comment. Include the specified parameter to set the attribute value. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database.

Parameter Valid value is an array reference that contains defined Infoblox::DHCP::Range objects. Example #Get name my $name = $superscope->name(). The default network view value is the system-defined default network view object. with an Infoblox::DHCP::View object $superscope->network_view($nview). 'Tom' ] }). and returns false when the operation fails. the method returns the attribute value. Returns If you specified a parameter. If you did not specify a parameter.1r4 Page 178 (Rev. the method returns true when the modification succeeds. Example #Get ranges my $ref_options = $superscope->ranges(). Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. #Modify ranges $superscope->ranges([$range]). The string must not be longer than 256 characters. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Example #Get network view my $nview = $superscope->network_view(). #Modify network view. #Modify extensible attributes $superscope->extensible_attributes({ 'Site' => 'Santa Clara'. Returns If you specified a parameter. the method returns the attribute value. Parameter The valid value is a defined Infoblox::DHCP::View object. Omit the parameter to retrieve the attribute value. A) . If you did not specify a parameter. #Modify name $superscope->name("superscope name"). The default value is empty. the method returns the attribute value. If you did not specify a parameter. and returns false when the operation fails. Include the specified parameter to set the attribute value. ranges( ) Use this method to set or retrieve the DHCP ranges that are associated with this superscope. the method returns true when the modification succeeds. name( ) Use this method to set or retrieve the name of the superscope. and returns false when the operation fails.Infoblox API Documentation Example #Get extensible attributes my $ref_extensible_attributes = $superscope->extensible_attributes(). network_view( ) Use this method to set or retrieve the network view of the superscope. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. Parameter Specify the name of the superscope in string format. #$range is an Infoblox::DHCP::Range object range_high_water_mark( ) NIOS 5. 'Administrator' => [ 'Peter'.

'minimum'. modify. Example #Get low-water mark my $range_low_water_mark = $superscope->range_low_water_mark(). => => => => => => => => => => '10. =over Parameter None Returns The method returns the attribute value.Infoblox API Documentation Use this method to retrieve the percent above "Normal" when the DHCP utilization status becomes "High". range_low_water_mark( ) Use this method to retrieve the percent below "Normal" when the DHCP utilization status becomes "Low". Infoblox::status_detail()). 'true'. A) . #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. 'password'. NIOS 5.1'. $host_name.2". #appliance host ip username => "admin". { Site => 'Somewhere'}. } print "Session created successfully\n". 'user'. Parameter None Returns The method returns the attribute value. 5. 'false'.0.1r4 Page 179 (Rev. Infoblox::status_code() . unless($ms_member) { die("Construct MS Member object failed: ". ":" . Infoblox::status_detail()). #appliance user login password => "infoblox" #appliance password ). Example #Get high-water mark my $range_high_water_mark = $superscope->range_high_water_mark().0. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a superscope object such as add.1. ":" . Infoblox::status_code() . #Preparation prior to a DHCP superscope object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. use Infoblox. and remove. #Create supporting objects. $host_name is the grid member's fqdn my $ms_member = Infoblox::Grid::MSServer->new( address comment disable extensible_attributes login password managing_member read_only synchronization_interval logging_mode ).168. Also. this sample includes error handling for the operations. unless ($session) { die("Construct session failed: ". 'basic member'.

members => [$ms_dhcp]. => "10.1".0. $session->status_detail()).1. unless($network2) { die("Construct DHCP Network object failed: ".0. } print "DHCP Network object created successfully\n".Infoblox API Documentation } print "MS Member object created successfully\n". Infoblox::status_code() . ":" . ":" .0. unless($session->add($dhcp_range1)) { die("Add DHCP Range object failed: ".0/16".0.21". Infoblox::status_code() . Infoblox::status_detail()).0. A) . ":" . } print "DHCP Range object created successfully\n".255. comment => "add network".0.1.0". Infoblox::status_detail()).0. "10. "true".255. Infoblox::status_code() . "10. ":" . Infoblox::status_detail()). ). comment => "add network".1. } print "MS DHCP Member object created successfully\n".0. unless($ms_dhcp) { die("Construct MS DHCP Member object failed: ". } print "DHCP Network object added successfully\n". $session->status_code() . unless($dhcp_range1) { die("Construct DHCP Range object failed: ". } print "MS Member object added successfully\n".0.0.0. unless($session->add($network2)) { die("Add DHCP Network object failed: ". } print "DHCP Network object created successfully\n". my $network1 = Infoblox::DHCP::Network->new( network => "10. => "10. $session->status_detail()).0". Infoblox::status_code() . ":" . NIOS 5. ":" . members => [$ms_dhcp].0.0. $session->status_code() . my $dhcp_range1 = Infoblox::DHCP::Range->new( end_addr network start_addr disable member ).0/16". $ms_dhcp. my $network2 = Infoblox::DHCP::Network->new( network => "10. ":" . $session->status_detail()). } print "DHCP Network object added successfully\n".0/255. $session->status_code() . => => => => => "10. Infoblox::status_detail()).1. $session->status_code() . } print "DHCP Range object added successfully\n". ":" . unless($network1) { die("Construct DHCP Network object failed: ".0. $session->status_detail()). unless($session->add($ms_member)) { die("Add MS Member object failed: ".10".0/255.0.1'). my $dhcp_range2 = Infoblox::DHCP::Range->new( end_addr network start_addr => "10.1r4 Page 180 (Rev. ).30".0. my $ms_dhcp = Infoblox::DHCP::MSServer->new(address => '10. unless($session->add($network1)) { die("Add DHCP Network object failed: ".

$session->remove($dhcp_range1) or die("Remove DHCP Range object failed: ". #Get the DHCP Superscope object my @retrieved_objs = $session->get( object => "Infoblox::DHCP::MSSuperscope". unless ($object) { die("Get DHCP Superscope object failed: ". Infoblox::status_detail()). Infoblox::status_code() . 'test comment'. ":" . 'true'. $session->status_detail()). unless($superscope) { die("Construct DHCP Superscope object failed: ". $session->status_detail()). => $ms_dhcp. unless($dhcp_range2) { die("Construct DHCP Range object failed: ". ":" . NIOS 5. $session->status_detail()). $session->remove($network2) or die("Remove DHCP Network object failed: ". } print "Get DHCP Superscope object found at least 1 matching entry\n". [ $dhcp_range1. $session->status_code() . #Remove DHCP Superscope and support objects $session->remove($object) or die("Remove DHCP Superscope object failed: ". Infoblox::status_detail()). $session->remove($dhcp_range2) or die("Remove DHCP Range object failed: ". $session->status_code() . $session->status_detail()). ":" . $session->status_code() . A) . unless($session->add($dhcp_range2)) { die("Add DHCP Range object failed: ". $session->status_code() . #Create a DHCP Superscope object my $superscope = Infoblox::DHCP::MSSuperscope->new( name => comment => disable => ranges => ). } print "DHCP Range object added successfully\n". ":" . } print "DHCP Superscope object created successfully\n".1r4 Page 181 (Rev. #Get the DHCP Superscope object and change its ranges 'test superscope'. $session->status_detail()). my $object = $retrieved_objs[0]. $session->status_code() . print "DHCP Superscope object with new range assignments updated to Infoblox appliance successfully\n". ":" . ":" .Infoblox API Documentation disable member ). Infoblox::status_code() . $session->remove($network1) or die("Remove DHCP Network object failed: ". unless($session->add($superscope)) { die("Add DHCP Superscope object failed: ". $session->status_code() . } print "DHCP Range object created successfully\n". $session->status_code() . $session->status_code() . ":" . $session->status_detail()). name => "test superscope" ). $dhcp_range2]. ":" . $session->status_detail()). #Apply the changes $session->modify($object) or die("Modify DHCP Superscope object failed: ". ":" . ":" . => "true". } print "DHCP Superscope object added successfully\n". $session->status_detail()).

NIOS 5. $session->status_detail()).Infoblox::DHCP::MSOption COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::Session->modify().1r4 Page 182 (Rev.Infoblox API Documentation $session->status_code() .infoblox. $session->remove($ms_member) or die("Remove Grid MSServer object failed: ". ####PROGRAM ENDS#### AUTHOR Infoblox Inc. print "All objects removed from the Infoblox appliance successfully\n". Infoblox::Session->get().Infoblox::DHCP::Range. $session->status_code() . http://www.com/ SEE ALSO Infoblox::Session. ":" . A) . ":" . $session->status_detail()).

DHCP Network object DESCRIPTION When DHCP services are configured on an appliance. CONSTRUCTOR my $network = Infoblox::DHCP::Network->new( NIOS 5. you can then create all the subnetworks individually or create a parent network that encompasses all the subnetworks.1r4 Page 183 (Rev.DHCP Network object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS authority( ) auto_create_reversezone( ) bootfile( ) bootserver( ) comment( ) ddns_domainname( ) ddns_generate_hostname( ) ddns_server_always_updates( ) ddns_ttl( ) ddns_update_fixed_addresses( ) ddns_use_option81( ) deny_bootp( ) disable( ) email_list( ) enable_ddns( ) enable_dhcp_thresholds( ) enable_email_warnings( ) enable_snmp_warnings( ) extensible_attributes( ) high_water_mark( ) ignore_dhcp_option_list_request( ) lease_scavenge_time( ) low_water_mark( ) members( ) network( ) network_container( ) network_view( ) nextserver( ) next_available_ip( ) options( ) override_ddns_domainname( ) override_ddns_ttl( ) override_lease_scavenge_time( ) override_update_dns_on_lease_renewal( ) pxe_lease_time( ) recycle_leases( ) resize( ) template( ) zone_associations( ) update_dns_on_lease_renewal( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Network . After a network is created. a network must be defined that it serves.Infoblox API Documentation Infoblox::DHCP::Network . A) .

#Optional / Default is undefined deny_bootp => "true" | "false" | undef.. #Optional / Default is "false" enable_snmp_warnings => "true" | "false". .. #Optional / Default is undefined ddns_server_always_updates => "true" | "false". is empty #Optional / Default network_container => $ipv4_subnet/prefix. authority => "true" | "false"| undef.. $string => [ $string | $num.. #Optional / Default is "false" email_list => [ "admin\@test. #Optional / Default is "95" ignore_dhcp_option_list_request => "true" | "false" | undef. #Optional / Default is undefined ddns_domainname => $string| undef. . ] | undef. #Optional / Default is "default" network view nextserver => $ipv4addr | $fqdn | undef. #Optional / Default is undefined recycle_leases => "true" | "false" | undef..1r4 Page 184 (Rev. #Optional / Default is "true" ddns_ttl => $num. when using a template with 'allow_any_netmask' set to false to create a network..]. when creating a network ipv4addr => $ipv4addr. } #Optional / Default is undefined high_water_mark => $string. #Optional / Default is an empty list ). #Optional / Default is undefined enable_dhcp_thresholds => "true" | "false". #Optional / Default value is "false" override_lease_scavenge_time => "true" | "false". #Optional / Default is undefined comment => $string| undef. #Optional / Default value is "false" override_update_dns_on_lease_renewal => "true" | "false". A) . #Optional / Default is undefined lease_scavenge_time => $number.$Member2. $zone2.. #Optional / Default is undefined bootserver => $ipv4addr | $fqdn | undef.] | undef. #Required.. #Optional / Default is undefined bootfile => $filename | undef.$Option2. #Optional / Default is "false" extensible_attributes => { $string => $string | $num.. #Optional / Default is "0" ddns_use_option81 => "true" | "false" | undef. is "/" network_view => $NetworkView. #Optional / Default value is "false" zone_associations => [$zone1. #Optional / Default is undefined auto_create_reversezone => "true" | "false"| undef.]. #Optional / Default is undefined ddns_update_fixed_addresses => "true" | "false" | undef. #Optional / Default is "-1" low_water_mark => $string. #Optional / Default is "0" #Optional / Default members => [ $Member1. SESSION METHODS NIOS 5. #Optional / Default is undefined update_dns_on_lease_renewal => "true" | "false". #Optional / Default is undefined options => [$Option1. #Optional / Default is undefined enable_ddns => "true" | "false" | undef. ].. #Optional / Default is undefined template => $string | undef.. #Use this parameter instead of "network". #Optional / Default is undefined ddns_generate_hostname => "true" | "false" | undef.. #Optional / Default value is "false" override_ddns_ttl => "true" | "false".Infoblox API Documentation network => $ipv4_subnet/prefix. #Optional / Default is undefined disable => "true" | "false"..com". . #Optional / Default is empty list override_ddns_domainname => "true" | "false".. #Optional / Default is "false" enable_email_warnings => "true" | "false".. #Optional / Default value is "false" pxe_lease_time => $num | undef.

unless specified. Examples my @result_array = $session->get( object => "Infoblox::DHCP::Network" .0.1". all network views are searched (except when contain_address is specified -.Optional. my ). extensible_attributes . Infoblox::Session->get( ) Use this method to retrieve all the matching network objects from the Infoblox appliance. my @result_array = $session->get( object => "Infoblox::DHCP::Network" . comment => "my-comment". ).Optional. network_view . network => "20.0. See Infoblox::Session->add() for parameters and return values. See Infoblox::Session->get() for parameters and return values.Optional. The IP address and netmask of a network in CIDR format.0. ). The network view in which the network is located.0. extensible_attributes => { 'Site' => 'Santa Clara' } @result_array = $session->get( object => "Infoblox::DHCP::Network" . Example #Adding a network. NIOS 5.1r4 Page 185 (Rev. By default.Optional.0/8". Notice the syntax difference between simple adding a network and adding a network using a template.0. contains_address => "10.0. # Submit for adding a network my $response = $session->add( $network ). ).see below). except for network_view.1 in the # system-defined default network view.0/8". A hash reference containing extensible attributes. A) . If specified.0.Infoblox API Documentation This section describes all the methods in an Infoblox::Session module that can apply to a DHCP Network object.Optional. contains_address => "10. # Submit for adding a network my $response = $session->add( $network ). #Adding a network using template #Construct an object my $network = Infoblox::DHCP::Network->new( ipv4addr => '20.0. A comment in string format (regular expression). Key References Apply the following attributes to get a specific DHCP Network object: network . all other search attributes are ignored. network_view defaults to the system-defined default network view.0. network_view => $network_view_object. # Returns the smallest network enclosing 10. contains_address .0.0.0'. The returned network is the smallest network enclosing this IPv4 address.0. my ).1 in the # specified network view ($network_view_object). Infoblox::Session->add( ) Use this method to add a network object to the Infoblox appliance.0. When a value for this attribute is provided. #Construct an object my $network = Infoblox::DHCP::Network->new( network => "20.0. ). network_view => "default" @result_array = $session->get( object => "Infoblox::DHCP::Network" . # Returns the smallest network enclosing 10. my @result_array = $session->get( object => "Infoblox::DHCP::Network" . An IPv4 address in string format. comment . template => "mytemplate". ).1".

Optional. except for network_view. => "Infoblox::DHCP::Network" . # Returns the smallest network enclosing 10. ).0\. extensible_attributes => { 'Site' => 'Santa Clara' } ). If specified.Infoblox API Documentation Infoblox::Session->modify( ) Use this method to modify a network object in the Infoblox appliance.0.0.Optional. my $desired_network = $result_array[0]. contains_address => "10. See Infoblox::Session->search() for parameters and return values. Example # Get the object under the same name my @result_array = $session->get( object network network_view ). # Submit modification my $response = $session->modify( $object ).1 in the # system-defined default network view. # search network by comment my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Network".0\. See Infoblox::Session->remove() for parameters and return values. my @result_array = $session->search( object => "Infoblox::DHCP::Network" . and then submit this object for removal. The IP address and netmask of a network in CIDR format. # find the desired object from the retrieved list. To remove a specific object.Optional. all network views are searched. network => '20\. By default. network_view => "default" ).. => "default" Infoblox::Session->search( ) Use this method to search for a DHCP Network object in the Infoblox appliance.*'.Optional.0. A comment in string format (regular expression). network_view . When a value for this attribute is provided. Examples # search for all DHCP Network objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Network". NIOS 5.0. ). # Submit for removal my $response = $session->remove( $desired_network ). comment => "my-comment". An IPv4 address in string format. A hash reference containing extensible attributes. See Infoblox::Session->modify() for parameters and return values. network_view defaults to the system-defined default network view. Example #Use method to modify enable_ddns method. => "20.0/8". comment . The returned network is the smallest network enclosing this IPv4 address. extensible_attributes . # search for all DHCP Network objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Network". unless specified. $object->enable_ddns("true"). Infoblox::Session->remove( ) Use this method to remove an object from the Infoblox appliance.0.0.1". all other search attributes are ignored. A) .Optional.1r4 Page 186 (Rev. Key References Apply the following attributes to search for a DHCP Network object: network . first use get() or search() to retrieve the specific object. contains_address . The network view in which the network is located.

auto_create_reversezone( ) Use this method to set the auto_create_reversezone flag of a DHCP network object. Parameter Specify "true" to set the auto_create_reversezone flag or "false" to deactivate/unset it. The default value for this field is "false". Omit the parameter to retrieve the attribute value.0. Example # Modify auto_create_reversezone $network_container->auto_create_reversezone("true"). which indicates that this attribute inherits the upper-level setting. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP Network object authority( ) Use this method to set or retrieve the authority of a DHCP network object. of the file that the client must download. and returns false when the operation fails.1".0. the method returns true when the modification succeeds. ). Example # Get authority my $authority = $network->authority() # Modify authority $network->authority("true"). Returns If you specified a parameter.0. the method returns the attribute value. Parameter The name. my @result_array = $session->search( object => "Infoblox::DHCP::Network" . the method returns the attribute value. and returns false when the operation fails. the method returns true when the modification succeeds. This option is overridden independently from Infoblox::DHCP::Network->bootserver() and Infoblox::DHCP::Network->nextserver(). contains_address => "10. Returns If you specified a parameter. bootfile( ) Use this method to set or retrieve a bootfile attribute of a DHCP network object. Include the specified parameter to set the attribute value. Returns If you specified a parameter. and returns false when the operation fails. A) . You can configure the DHCP server to support clients that use boot file name option in their DHCPREQUEST messages. Include the specified parameter to set the attribute value.1 in the # specified network view ($network_view_object). in string format. Example NIOS 5.Infoblox API Documentation # Returns the smallest network enclosing 10. Include the specified parameter to set the attribute value. This setting overrides the upper-level settings. the method returns true when the modification succeeds. The default value for this field is undefined. If you did not specify a parameter.0. This is a write-only attribute and cannot be retrieved after it is set.1r4 Page 187 (Rev. The default value is undefined. This setting overrides the upper-level settings. which indicates that this attribute inherit the upper-level setting. Parameter Specify "true" to set the authority or "false" to deactivate/unset it. If you did not specify a parameter. network_view => $network_view_object. Omit the parameter to retrieve the attribute value. The default value is undefined.

and returns false when the operation fails. Include the specified parameter to set the attribute value. # Modify comment $network->comment("add a network"). The FQDN consists of the host name followed by the domain name (example: abc. NIOS 5.1r4 Page 188 (Rev.com). the method returns the attribute value. the method returns true when the modification succeeds. A boot server name can have a maximum of 256 bytes.Infoblox API Documentation # Get bootfile my $bootfile = $network->bootfile(). Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. This option is overridden independently from Infoblox::DHCP::Network->bootfile() and Infoblox::DHCP::Network->nextserver(). Parameter The dynamic DNS domain name in string format. This setting overrides the upper-level settings. Thus the sequence $object->ddns_domainname("testdomain"). the method returns true when the modification succeeds. # Modify bootfile $network->bootfile("bootfile1"). the last operation takes precedence. Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true". Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false". will set override_ddns_domainname to "false". which indicates that this attribute inherits the upper-level setting. Example # Get comment my $comment = $network->comment(). $object->override_ddns_domainname("false"). #Un-override bootserver $network->bootserver(undef). the method returns the attribute value. Omit the parameter to retrieve the attribute value. #Un-override bootfile $network->bootfile(undef). If you did not specify a parameter. Include the specified parameter to set the attribute value. and returns false when the operation fails. Include the specified parameter to set the attribute value.com"). bootserver( ) Use this method to set or retrieve a bootserver attribute of a DHCP network object. Parameter The boot server IP address or name in FQDN (Fully Qualified Domain Name) format. and the sequence $object->override_ddns_domainname("false"). ddns_domainname( ) Use this method to set or retrieve the ddns_domainname value of a DHCP Network object. Example # Get bootserver my $bootserver = $network->bootserver(). $object>ddns_domainname("testdomain"). Returns If you specified a parameter. Returns If you specified a parameter. # Modify bootserver $network->bootserver("abc. Parameter Enter a descriptive comment for the network in string format with a maximum of 256 bytes. The default value is undefined. Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false". comment( ) Use this method to set or retrieve a descriptive comment of a DHCP network object. A) . will result in override_ddns_domainname="true". If you did not specify a parameter.domain. You can specify the name and/or IP address of the boot server that host needs to boot. The default value is undefined.

Enable this method to allow only the DHCP server to update DNS. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. Parameter Specify "true" to generate hostname or "false" to deactivate/unset it. A) . and returns false when the operation fails. Include the specified parameter to set the attribute value. the method returns the attribute value.Infoblox API Documentation Returns If you specified a parameter. #Un-override $network->ddns_generate_hostname(undef). $object->override_ddns_ttl("false"). Example # Get ddns_server_always_updates my $ddns_server_always_updates = $network->ddns_server_always_updates() # Modify ddns_server_always_updates $network->ddns_server_always_updates("true"). the method returns true when the modification succeeds. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_ttl attribute to "false". Parameter NIOS 5. Include the specified parameter to set the attribute value. which indicates that this attribute inherit the member level setting. Parameter Specify "true" to set the flag that enables the DHCP server to always updates DNS or "false" to deactivate/unset it. the method returns the attribute value. This setting overrides the upper-level settings. Example #Get ddns_domainname my $ddns_domainname = $network->ddns_domainname(). If you did not specify a parameter. Setting this method to a defined value implicitly sets the override_ddns_ttl method to "true". Omit the parameter to retrieve the attribute value. will set override_ddns_ttl to "false". Include the specified parameter to set the attribute value. the method returns the attribute value. and returns false when the operation fails. the method returns true when the modification succeeds. Returns If you specified a parameter. If you did not specify a parameter.The default value for this field is "true". Returns If you specified a parameter.The default value for this field is undefined. ddns_generate_hostname( ) Use this method to set or retrieve the ddns_generate_hostname flag of a DHCP network object. and the sequence $object>override_ddns_ttl("false"). #Modify ddns_domainname $network->ddns_domainname("test_domain. and returns false when the operation fails. Thus the sequence $object->ddns_ttl(12). will result in override_ddns_ttl="true". $object->ddns_ttl(12).com"). If you did not specify a parameter. ddns_ttl( ) Use this method to set or retrieve the DNS update Time to Live (TTL) value of a DHCP network object. the method returns true when the modification succeeds. Enable this method to allow only the DHCP server for generating hostname. Example # Get ddns_generate_hostname my $ddns_generate_hostname = $network->ddns_generate_hostname() # Modify ddns_generate_hostname $network->ddns_generate_hostname("true").regardless of the requests from the DHCP clients. the last operation takes precedence. Note that when ddns_ttl is set to a defined value and override_dddns_ttl is set to "false".1r4 Page 189 (Rev. ddns_server_always_updates( ) Use this method to set or retrieve the ddns_server_always_updates flag of a DHCP network object.

This setting overrides the upper-level settings. NIOS 5. Parameter Specify "true" to enable the appliance to update DNS when it assigns a fixed address to a client or "false" to disable it.1r4 Page 190 (Rev. the DHCP server does not update DNS when it allocates a fixed address to a client. the method returns the attribute value. the method returns true when the modification succeeds. the method returns the attribute value. the method returns true when the modification succeeds. and returns false when the operation fails. Include the specified parameter to set the attribute value. deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP Network object. The default value is 0. Returns If you specified a parameter. which indicates that this attribute inherit the member level setting. and returns false when the operation fails. Returns If you specified a parameter. #Modify DNS Update ttl $network->ddns_ttl(1200). You can configure the DHCP server to update the A and PTR records of a client with a fixed address. # un-override ddns_use_option81 $network->ddns_use_option81(undef). If you did not specify a parameter. Example # Get ddns_use_option81 my $ddns_use_option81 = $network->ddns_use_option81() # Modify ddns_use_option81 $network->ddns_use_option81("true"). Zero indicates that the update is not cached. #Un-override $network->ddns_update_fixed_addresses(undef). ddns_update_fixed_addresses( ) Use this method to set or retrieve the ddns_update_fixed_addresses flag of a DHCP network object. Example # Get ddns_update_fixed_addresses my $ddns_update_fixed_addresses= $network->ddns_update_fixed_addresses() # Modify ddns_update_fixed_addresses $network->ddns_update_fixed_addresses("true"). Omit the parameter to retrieve the attribute value. ddns_use_option81( ) Use this method to set or retrieve the ddns_use_option81 flag of a DHCP network object. The default value for this field is undefined. The default value for this field is undefined. By default. and returns false when the operation fails. Include the specified parameter to set the attribute value. A) .Infoblox API Documentation A 32-bit integer (range from 0 to 4294967295) that represents the duration. If you did not specify a parameter. If you did not specify a parameter. which indicates that this attribute inherit the member level setting. This setting overrides the member level settings. the method returns true when the modification succeeds. Returns If you specified a parameter. When this feature is enabled and the DHCP server adds A and PTR records for a fixed address. the method returns the attribute value. Example #Get DNS Update ttl my $dns_ttl = $network->ddns_ttl(). Enable this method to define the settings for option 81 at the network level. the DHCP server never discards the records. in seconds. Omit the parameter to retrieve the attribute value. that the update is cached. Parameter Specify "true" to Configure Support for Option 81 or "false" to deactivate/unset it.

then the appliance sends DHCP threshold alarms to the e-mail addresses. which indicates that this attribute inherit the upper-level setting. Omit the parameter to retrieve the attribute value. The default value is undefined. If you did not specify a parameter. The default value for this field is "false".Infoblox API Documentation Include the specified parameter to set the attribute value. Example #Get email_list my @email_list = $network->email_list(). Returns NIOS 5. and returns false when the operation fails. If you did not specify a parameter. and returns false when the operation fails. If you enter e-mail addresses in the email_list. Omit the parameter to retrieve the attribute value. enable_ddns( ) Use this method to set or retrieve the dynamic DNS updates flag of a DHCP network object. Parameter Specify "true" to set the dynamic DNS updates flag or "false" to deactivate/unset it. Returns If you specified a parameter. Example # Get disable my $disable = $network->disable() # Modify disable $network->disable("true"). A) . Example #Get deny_bootp my $deny_bootp = $network->deny_bootp(). Returns If you specified a parameter. the method returns the attribute value. Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. the method returns the attribute value. email_list( ) Use this method to set or retrieve the e-mail lists to which the appliance sends threshold e-mail messages.1r4 Page 191 (Rev. which indicates that this attribute inherit the member level setting. Returns If you specified a parameter.com" ] ). Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. #Modify email_list $network->email_list( [ "admin\@test. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. The default value for this field is undefined. The DHCP server can send DDNS updates to DNS servers in the same grid and to external DNS servers. If you did not specify a parameter. Include the specified parameter to set the attribute value. Parameter The valid value is an array reference that contains string objects. This setting overrides the member level settings. the method returns true when the modification succeeds. disable( ) Use this method to set or retrieve the disable flag of a DHCP network object. the method returns true when the modification succeeds. the method returns true when the modification succeeds. #Modify deny_bootp $network->deny_bootp("true"). and returns false when the operation fails. the method returns the attribute value.

the method returns the attribute value. the Infoblox appliance generates a syslog message and sends an SNMP notification. Returns If you specified a parameter. If you did not specify a parameter. Returns If you specified a parameter. enable_snmp_warnings( ) Use this method to send DHCP threshold warnings through SNMP. If a DHCP range usage goes above or below these percentage values. Enable this flag if you want the appliance to send DHCP threshold warnings to the "email_list" provided. Example #Get enable_email_warnings my $enable_email_warnings = $network->enable_email_warnings(). Example NIOS 5. the method returns true when the modification succeeds. #Modify enable_dhcp_thresholds $network->enable_dhcp_thresholds("false"). the method returns true when the modification succeeds. Example #Get enable_dhcp_thresholds my $enable_dhcp_thresholds = $network->enable_dhcp_thresholds(). and returns false when the operation fails.1r4 Page 192 (Rev. The default value is undefined. enable_dhcp_thresholds( ) Use this method to set or retrieve DHCP thresholds at the network level. and returns false when the operation fails. the method returns the attribute value. The default value is undefined. #Modify enable_email_warnings $network->enable_email_warnings("false"). The default value is undefined. the method returns true when the modification succeeds. enable_email_warnings( ) Use this method to send DHCP threshold warnings through e-mail. Parameter Specify "true" to set the enable_dhcp_thresholds flag or "false" to deactivate/unset it. Parameter Specify "true" to set the enable_snmp_warnings flag or "false" to deactivate/unset it. Enable this flag to set DHCP thresholds values. If you did not specify a parameter. Parameter Specify "true" to set the enable_email_warnings flag or "false" to deactivate/unset it. A) . Example # Get enable_ddns my $enable_ddns = $network->enable_ddns() # Modify enable_ddns $network->enable_ddns("true"). If you did not specify a parameter. the method returns the attribute value. If you did not specify a parameter.Infoblox API Documentation If you specified a parameter. and returns false when the operation fails. If the flag is enabled. Returns If you specified a parameter. and returns false when the operation fails. the method returns the attribute value. These thresholds are the high and low watermarks. the method returns true when the modification succeeds. # Un-override enable_ddns $network->enable_ddns(undef). then the appliance sends DHCP threshold warnings through SNMP messages.

For an integer. The default value is undefined. the value is a string with a maximum of 64 characters.1r4 Page 193 (Rev. If you did not specify a parameter. Returns If you specified a parameter. For a date. Example #Get high_water_mark my $high_water_mark = $network->high_water_mark(). the method returns true when the modification succeeds. Returns If you specified a parameter. Include the specified parameter to set the attribute value. and returns false when the operation fails. high_water_mark( ) Use this method to set the percentage value for DHCP range usage above which the Infoblox appliance generates a syslog message and sends a warning. the appliance generates a syslog message and sends a warning. which indicates that this attribute inherits the upper-level setting. The default value is undefined. For email. the method returns the attribute value. 'Tom' ] }). #Modify extensible attributes $network->extensible_attributes({ 'Site' => 'Santa Clara'. the method returns true when the modification succeeds. 'Administrator' => [ 'Peter'. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. the appliance returns all the defined DHCP options to the client. A) . Returns If you specified a parameter. This setting overrides the upper-level settings. If you did not specify a parameter. #Modify enable_snmp_warnings $network->enable_snmp_warnings("false"). If this flag is set to false. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP network object Include the specified parameter to set the attribute value. the method returns the attribute value. URL. ignore_dhcp_option_list_request( ) Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP Network object. #Modify high_water_mark $network->high_water_mark("80"). the value is a string with a maximum of 256 characters. Parameter The valid value is in sting format. Example NIOS 5. For a list. If you did not specify a parameter.Infoblox API Documentation #Get enable_snmp_warnings my $enable_snmp_warnings = $network->enable_snmp_warnings(). and returns false when the operation fails. When the percent of allocated addresses in a DHCP range exceeds the high watermark. and string types. and returns false when the operation fails. Parameter Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate/unset it. the method returns the attribute value. the value is the number of seconds that have elapsed since January 1st. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. Default value for this option is 95. Example #Get extensible attributes my $ref_extensible_attributes = $network->extensible_attributes(). 1970 UTC. the value is an integer from -2147483648 through 2147483647.

Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. set the parameter to -1. and returns false when the operation fails. A) . Include the specified parameter to set the attribute value. Returns If you specified a parameter. If you did not specify a parameter. lease_scavenge_time( ) Use this method to set or retrieve the lease_scavenge_time value of a DHCP Network object. and returns false when the operation fails. which means that lease scavenging is disabled. in seconds. the method returns the attribute value. the last operation takes precedence. and the sequence $object->override_lease_scavenge_time("false"). The default value of this parameter is -1. Returns NIOS 5. Parameter The valid value is an array reference that contains Infoblox::DHCP::Member or Infoblox::DHCP::MSServer objects. Example #Get lease_scavenge_time my $lease_scavenge = $network->lease_scavenge_time(). Parameter The valid value is in string format. The minimum positive value must be greater than 86400 seconds (1 day). the method returns true when the modification succeeds. low_water_mark( ) Use this method to set the percentage value for DHCP range usage below which the Infoblox appliance generates a syslog message and sends a warning. Setting the parameter to undefined causes the appliance to use the default from the upper level and automatically resets the override_lease_scavenge_time attribute to "false". Default value for this option is 0. #Modify lease_scavenge_time $network->lease_scavenge_time(30 * 24 * 60 * 60). the method returns the attribute value. To disable lease scavenging. Omit the parameter to retrieve the attribute value. # Modify ignore_dhcp_option_list_request $network->ignore_dhcp_option_list_request("true"). Include the specified parameter to set the attribute value. When the percent of allocated addresses in a DHCP range goes below the low watermark. #Modify low_water_mark $network->low_water_mark("10"). the method returns true when the modification succeeds.1r4 Page 194 (Rev. Thus the sequence $object->lease_scavenge_time(604800). members( ) Use this method to set or retrieve the member or Microsoft (r) server that serves DHCP for a network object. Example #Get low_water_mark my $low_water_mark = $network->low_water_mark(). Parameter An integer that specifies the period of time. will result in override_lease_scavenge_time="true". #Do not override ignore_dhcp_option_list_request $network->ignore_dhcp_option_list_request(undef). If you did not specify a parameter. Setting this method to a defined value implicitly sets the override_lease_scavenge_time method to "true". the appliance generates a syslog message and sends a warning. $object->override_lease_scavenge_time("false"). will set override_lease_scavenge_time to "false". that free and backup leases remain in the database before they are automatically deleted. $object>lease_scavenge_time(604800).Infoblox API Documentation # Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $network->ignore_dhcp_option_list_request(). Note that when lease_scavenge_time is set to a defined value and override_lease_scavenge_time is set to "false".

If you did not specify a parameter. #Create the my $network network members ). If you did not specify a parameter. and returns false when the operation fails.Infoblox API Documentation If you specified a parameter. Returns If you specified a parameter. network( ) Use this method to retrieve the network attribute of a DHCP network object. which means the network is in the default network view.0. Include the specified parameter to set the attribute value. Parameter An IPv4 address is a 32-bit number in dotted decimal notation. The default network view value is the system-defined default network view object. network_container( ) Use this method to set or retrieve the network container of a DHCP network object.0/8"). ).1. Returns NIOS 5. the method returns the attribute value. and returns false when the operation fails. Example #Get network container my $network_container = $network->network_container(). It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. network_view( ) Use this method to set or retrieve the network view of the DHCP network. Include the specified parameter to set the attribute value. If you did not specify a parameter.2". Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds.2).0. the method returns the attribute value. #Modify network container $network->network_container("50.1r4 Page 195 (Rev. A) . Include the specified parameter to set the attribute value. ipv4addr => "192. Parameter Specify the IP address and netmask of a network in CIDR format. and returns false when the operation fails.0. Network object with this member = Infoblox::DHCP::Network->new( => "10. The default value is the "default" network view.1. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. Parameter Valid value is a defined Infoblox::DHCP::View object. Example my $member1 = Infoblox::DHCP::Member->new( name => "infoblox. the method returns true when the modification succeeds. Example #Get network my $network = $network->network().0.localdomain". => [$member1]. Omit the parameter to retrieve the attribute value.168.168. the method returns the attribute value. the method returns true when the modification succeeds.0/8".

the object MUST be retrieved through a get or search call. If you did not specify a parameter. # Modify nextserver $network->nextserver("blue. network => "10. and returns false when the operation fails. the method returns true when the modification succeeds. The FQDN consists of the host name followed by the domain name (example: abc. A next server name can have a maximum of 256 bytes. with an Infoblox::DHCP::View object $network->network_view($nview). This setting overrides the upper-level settings. The default value is undefined. Within a DHCP Network object. Example # Get nextserver my $nextserver = $network->nextserver(). the next available IP address is the first address in the network that matches all of the following rules: * * * * * Example There is no A. Omit the parameter to retrieve the attribute value. #Modify network view. and returns false when the operation fails. the method returns the attribute value.1r4 Page 196 (Rev.0. A) . Returns This method returns the next available IP address in the network in string format. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format.domain. Include the specified parameter to set the attribute value.com). $dhcp_network = $retrieved_objs[0]. Example #Get network view my $nview = $network->network_view(). PTR.com"). next_available_ip( ) Use this method to retrieve the next available IP address in the network that was retrieved. nextserver( ) Use this method to set or retrieve the nextserver attribute of a DHCP network object. Returns If you specified a parameter. the method returns true when the modification succeeds. Note that to use this method. Parameter This method does not accept input parameters. If you did not specify a parameter. options( ) NIOS 5. or it must have been created with an add call.0. fixed address or host address record matching this IP address There is no bulk host record with this IP address There is no unmanaged record matching this IP address The IP address is not the network or broadcast address of this network The IP address is not in any DHCP range within this network (including any exclusion range) # Retrieve a particular network my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Network".0/8" ). #Un-override nextserver $network->nextserver(undef). "\n". The default value is undefined.Infoblox API Documentation If you specified a parameter. This option is overridden independently from Infoblox::DHCP::Network->bootfile() and Infoblox::DHCP::Network->bootserver(). the method returns the attribute value. # Print the next available IP address in the network print $dhcp_network->next_available_ip() . You can specify the name and/or IP address of the next server that the host needs to boot. which indicates that this attribute inherits the upper-level setting.

#Modifying override_ddns_domainname $network->override_ddns_domainname("true"). A) . DHCP options provide network configuration settings and various services available on the network for DHCP. the method returns the attribute value. Returns If you specified a parameter. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. override_ddns_ttl( ) The override_ddns_ttl attribute controls whether the ddns_ttl value in the DHCP Network is used. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. instead of the grid default. It is also set implicitly when ddns_ttl is set to a defined value. and returns false when the operation fails. Example NIOS 5. #Modify options my $option1 = Infoblox::DHCP::Option->new( name => "lease-time".Infoblox API Documentation Use this method to set or retrieve the options value of a member DHCP server. the method returns true when the modification succeeds. Parameter Set the parameter to "true" to override the grid-level setting for ddns_ttl. Returns If you specified a parameter. The default value of this parameter is "false". If you did not specify a parameter. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. Set the parameter to "false" to inherit the grid-level setting for ddns_domainname. The default value of this parameter is "false". Example #Get options my $options = $network->options(). Returns If you specified a parameter. and returns false when the operation fails.1r4 Page 197 (Rev. $network->options([$option1]). Parameter Set the parameter to "true" to override the grid-level setting for ddns_domainname. It is also set implicitly when ddns_domainname is set to a defined value. and returns false when the operation fails. Set the parameter to "false" to inherit the grid-level setting for ddns_ttl. the method returns the attribute value. instead of the grid default. The override_ddns_domainname attribute can be specified explicitly. The override_ddns_ttl attribute can be specified explicitly. Parameter The valid value is an array reference that contains Infoblox::DHCP::Option objects. override_ddns_domainname( ) The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP Network is used. Example #Getting override_ddns_domainname my $override_ddns_domainname=$network->override_ddns_domainname( ). If you did not specify a parameter. Omit the parameter to retrieve the attribute value. value => 50 ). Omit the parameter to retrieve the attribute value. the method returns the attribute value.

Example #Getting override_update_dns_on_lease_renewal my $override_update_dns_on_lease_renewal=$network->override_update_dns_on_lease_renewal( ). in seconds. #Modifying override_lease_scavenge_time $network->override_lease_scavenge_time("true"). If you did not specify a parameter. the method returns true when the modification succeeds. A) . instead of the upper-level default. The override_update_dns_on_lease_renewal attribute can be specified explicitly. Zero NIOS 5. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. The default value of this parameter is "false". Include the specified parameter to set the attribute value. that the update is cached. #Modifying override_ddns_ttl $network->override_ddns_ttl("true"). Returns If you specified a parameter. The override_lease_scavenge_time attribute can be specified explicitly. Include the specified parameter to set the attribute value. and returns false when the operation fails. The default value is undefined. override_update_dns_on_lease_renewal( ) The override_update_dns_on_lease_renewal attribute controls whether the update_dns_on_lease_renewal value in the DHCP Network is used.Infoblox API Documentation #Getting override_ddns_ttl my $override_ddns_ttl=$network->override_ddns_ttl( ). This setting overrides the upper-level settings. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. It is also set implicitly when lease_scavenge_time is set to a defined value.1r4 Page 198 (Rev. set a different lease time for PXE boot requests. Parameter Set the parameter to "true" to override the grid-level setting for update_dns_on_lease_renewal. Parameter A 32-bit integer (range from 0 to 4294967295) that represents the duration. which indicates that this attribute inherits the upper-level setting. #Modifying override_update_dns_on_lease_renewal $network->override_update_dns_on_lease_renewal("true"). and returns false when the operation fails. pxe_lease_time( ) Use this method to set or retrieve the PXE lease time value of a DHCP Network object. Example #Getting override_lease_scavenge_time my $override_lease_scavenge_time=$network->override_lease_scavenge_time( ). Returns If you specified a parameter. To better manage your IP resources. If you did not specify a parameter. It is also set implicitly when update_dns_on_lease_renewal is set to a defined value. Set the parameter to "false" to inherit the setting for lease_scavenge_time from the upper level. Set the parameter to "false" to inherit the grid-level setting for update_dns_on_lease_renewal. so IP addresses are not leased longer than necessary. Parameter Set the parameter to "true" to override the upper-level setting for lease_scavenge_time. the method returns the attribute value. override_lease_scavenge_time( ) The override_lease_scavenge_time attribute controls whether the lease_scavenge_time value in the DHCP network is used. You can configure the DHCP server to allocate an IP address with a shorter lease time to hosts that send PXE boot requests. Omit the parameter to retrieve the attribute value. instead of the grid default. The default value of this parameter is "false". the method returns the attribute value. Some hosts use PXE (Preboot Execution Environment) to boot remotely from a server.

Returns If you specified a parameter. the error code and error message are reported in the Session object's status_code() and status_detail() attributes. Note that to use this method. auto_create_reversezone . template( ) Use this method to set or retrieve the network template name of a DHCP Network object. When an operation fails.Infoblox API Documentation indicates that the update is not cached. $session->status_code() . the leases are kept in the recycle bin until one week after expiration. Returns If you specified a parameter. If the flag is enabled. the method returns the attribute value. If you did not specify a parameter. The default value is undefined. #Un-override PXE Lease Time $network->pxe_lease_time(undef). Parameter Specify "true" to enable the recycle_leases flag or "false" to disable it. Boolean flag indicating whether or not to automatically create the reverse zone.0. and returns false when the operation fails. NIOS 5. The default value is undefined. $session->status_detail()). my $network = $retrieved_objs[0]. inserting # a corresponding reverse zone in the process. and returns false when the operation fails. If you did not specify a parameter. Example #Get Network through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::Network" . the method returns true when the modification succeeds. or it must have been created with an add call. ":" .0. the method returns the attribute value. Example #Get PXE Lease Time my $pxe_lease_time = $network->pxe_lease_time(). # Expand a /24 network to a /16 network. resize( ) Use this method to resize a network. Example #Get recycle_leases my $recycle_leases = $network->recycle_leases().0/8" ). the object MUST be retrieved through a get or search call. network => "20. Parameter prefix . my $response = $network->resize( prefix => "16" auto_create_reversezone => "true" ) or die("Resize Network failed: ". The bitmask prefix length after resizing. the leases are irrecoverably deleted. Returns The method returns true when the operation succeeds. #Modify PXE Lease Time $network->pxe_lease_time(1100).Optional.1r4 Page 199 (Rev. recycle_leases( ) Use this method to set or retrieve the recycle_leases flag at the network level. the method returns true when the modification succeeds.Required. A) . When the flag is disabled. #Modify recycle_leases $network->recycle_leases("false"). and returns false when the operation fails.

Thus the sequence $object->update_dns_on_lease_renewal("true"). my $zone2 = Infoblox::DNS::Zone->new( name => "test2. zone_associations( ) Use this method to set or retrieve the associated zone information. $zone2]). Returns If you specified a parameter. If you did not specify a parameter. the last operation takes precedence. Note that when update_dns_on_lease_renewal is set to a defined value and override_update_dns_on_lease_renewal is set to "false". If you did not specify a parameter. Example #Get template my $template = $network->template(). Setting this method to a defined value implicitly sets the override_update_dns_on_lease_renewal method to "true".1r4 Page 200 (Rev. #Modifying zone_associations $network->zone_associations([$zone1. $object->update_dns_on_lease_renewal("true"). the method returns the attribute value. it is possible to use the zone associations of the parent by setting the parameter to undef. will result in override_update_dns_on_lease_renewal="true". The default value is an empty list. Include the specified parameter to set the attribute value. will set override_update_dns_on_lease_renewal to "false". my $zone1 = Infoblox::DNS::Zone->new( name => "test1. Example NIOS 5. Omit the parameter to retrieve the attribute value. #Clear zone_assocations $network->zone_associations([]).com". A) . Parameter Specify "true" to set the update_dns_on_lease_renewal flag or "false" to deactivate/unset it. and returns false when the operation fails. and the sequence $object>override_update_dns_on_lease_renewal("false"). #Modify template $network->template("Template_Name"). If you did not specify a parameter. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. Parameter The valid value is an array reference that contains Infoblox::DNS::Zone object(s). Examples #Getting zone associations my $zone_associations = $network->zone_associations(). ). ).Infoblox API Documentation Include the specified parameter to set the attribute value.com". the method returns true when the modification succeeds. Parameter The valid name in sting format. Returns If you specified a parameter. the method returns the attribute value. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_update_dns_on_lease_renewal attribute to "false". and returns false when the operation fails. The default value of this parameter is "false". the method returns true when the modification succeeds. and returns false when the operation fails. If the network has a parent. ##Remove the override for zone_associations $network->zone_associations(undef) update_dns_on_lease_renewal( ) The update_dns_on_lease_renewal attribute controls whether the DHCP server updates DNS when a DHCP lease is renewed. the method returns the attribute value. Returns If you specified a parameter. $object>override_update_dns_on_lease_renewal("false").

my $object = $retrieved_objs[0]. network => "10. ipv4addr => "192.0/8". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. search. A) . comment => "add network". modify. $session->status_code() . network => '10\. } print "Search Network found at least 1 matching entry\n". #Get and modify a Network attribute #Get Network through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::Network" .0\. my $response = $session->add($network) or die("Add Network failed: ".0. members => [$memberdhcp]. } NIOS 5. unless ($object) { die("Search Network failed: ".2" ). } print "Session created successfully\n". $session->status_code() .0.168.168. unless ($session) { die("Construct session failed: ". unless ($object) { die("Get Network object failed: ".1r4 Page 201 (Rev.Infoblox API Documentation #Get update_dns_on_lease_renewal my $update_dns_on_lease_renewal=$network->update_dns_on_lease_renewal( ).localdomain". print "Network added successfully\n". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192.0" ). #Create a DHCP Network object my $memberdhcp = Infoblox::DHCP::Member->new( name => "infoblox. my $network = Infoblox::DHCP::Network->new( network => "10. This sample also includes error handling for the operations.0. #Search for a specific Network #Search the network my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Network". my $object = $retrieved_objs[0]. #Modify update_dns_on_lease_renewal $network->update_dns_on_lease_renewal("true").2". $session->status_code() . ":" . $session->status_detail()). #Preparation prior to a DHCP Network insertion #PROGRAM STARTS: Include all the modules that will be used use strict.1. password => "infoblox" ).1..0. use Infoblox. Infoblox::status_code() . $session->status_detail()). ":" .*' ). $session->status_detail()). ":" . Infoblox::status_detail()). and remove. ":" .0\. username => "admin". ).

#Resize a network #Get Network through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::Network" . Infoblox::Session->modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. network => "10. print "Network removed successfully \n". my $object = $retrieved_objs[0].0. network => "10. unless ($object) { die("Get Network object failed: ". $session->modify($object) or die("Modify Network attribute failed: ". Infoblox::DHCP::Member. ":" . NIOS 5. my $object = $retrieved_objs[0]. #Modify attributes of the specified Network attribute $object->enable_ddns("true"). ":" . #Resize my $response = $object->resize( prefix => "16" ) or die("Resize Network failed: ". $session->status_code() . #Un-override nextserver $object->nextserver(undef). $session->status_detail()). Infoblox::Session->add(). #Un-override bootserver $object->bootserver(undef). Infoblox::DHCP::View.com/ SEE ALSO Infoblox::Session. A) . $session->status_detail()).0. $session->status_code() . http://www.Infoblox API Documentation print "Get Network found at least 1 matching entry\n". $session->status_code() . ####PROGRAM ENDS#### AUTHOR Infoblox Inc.infoblox. Infoblox::DHCP::Option.1r4 Page 202 (Rev. ":" .0. #Remove a Network Object #Get Network object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Network" . print "Network object modified successfully \n". $session->status_detail()). #Submit the object for removal $session->remove($object) or die("Remove Network failed: ".0. $session->status_code() . #Apply the changes #Un-override bootfile $object->bootfile(undef). Infoblox::Session->get(). Infoblox::Session->remove().0" ).0/8" ). Infoblox::Session->search(). $session->status_detail()). } print "Get Network object found at least 1 matching entry\n". ":" .

A) .Infoblox API Documentation NIOS 5.1r4 Page 203 (Rev.

A) . ]. when creating a network container auto_create_reversezone => "true" | "false". #Construct an object my $network_container = Infoblox::DHCP::NetworkContainer->new( network => "20.1r4 Page 204 (Rev. ] | undef. Infoblox::Session->add( ) Use this method to add a DHCP Network Container object to the Infoblox appliance. . #Optional / Default is undefined remove_subnets => "true" | "false". See Infoblox::Session->add() for parameters and return values. . } #Optional / Default is undefined ). #Optional / Default is an empty list extensible_attributes => { $string => $string | $num. The network that contains the child network is called a network container.DHCP Network Container object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS auto_create_reversezone( ) comment( ) extensible_attributes( ) network( ) remove_subnets( ) network_container( ) network_view( ) resize( ) zone_associations( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::NetworkContainer . #Optional / Default is undefined network_container => $ipv4_subnet/prefix.DHCP Network Container object DESCRIPTION A network can contain child networks.0. . #Optional / Default is "default" network view zone_associations => [$zone1. #Optional / Default is "/" network_view => $NetworkView...0/8"..0.. #Optional / Default is "false" comment => $string| undef.Infoblox API Documentation Infoblox::DHCP::NetworkContainer ... Example #Adding a network container. NIOS 5. $string => [ $string | $num. SESSION METHODS This section describes all the methods in an Infoblox::Session module that you can apply to a DHCP Network Container object. CONSTRUCTOR my $network = Infoblox::DHCP::NetworkContainer->new( network => $ipv4_subnet/prefix. $zone2. #Required.

To remove a specifc object. extensible_attributes => { 'Site' => 'Santa Clara' } @result_array = $session->get( object => "Infoblox::DHCP::NetworkContainer".Optional. => "Infoblox::DHCP::NetworkContainer" .0.Optional. # Find the desired object in the retrieved list. => "20. $network_container->comment("modified comment").Optional. my ). # Submit for removal my $response = $session->remove( $network_container ). See Infoblox::Session->modify() for parameters and return values. A) . Example # Get the object under the same name my @result_array = $session->get( object network network_view ). my ). Infoblox::Session->get( ) Use this method to retrieve all the matching DHCP Network Container objects from the Infoblox appliance. Key References Apply the following attributes to get a specific DHCP Network Container object: network . The network view in which the network is located. comment => "my-comment". extensible_attributes . => "default" Infoblox::Session->search( ) Use this method to search for a DHCP Network Container object in the Infoblox appliance. and then submit this object for removal. network views are searched. Key References NIOS 5. See Infoblox::Session->search() for parameters and return values.Infoblox API Documentation ). Example #Use method to modify comment. # Submit modification my $response = $session->modify( $network_container ). Infoblox::Session->remove( ) Use this method to remove an object from the Infoblox appliance.0. A comment in string format. # Submit for adding a network container my $response = $session->add( $network_container ). all A hash reference containing extensible attributes. my @result_array = $session->get( object => "Infoblox::DHCP::NetworkContainer". network => "20.0.0. my $network_container = $result_array[0].Optional.0/8". comment .1r4 Page 205 (Rev.0/8". network_view . first use get() or search() to retrieve the specific object. network_view => "default" @result_array = $session->get( object => "Infoblox::DHCP::NetworkContainer". By default. ). See Infoblox::Session->remove() for parameters and return values. Infoblox::Session->modify( ) Use this method to modify a DHCP Network Container object in the Infoblox appliance. See Infoblox::Session->get() for parameters and return values. Examples The IP address and netmask of a network in CIDR format.

network_view => "default" ). extensible_attributes . and returns false when the operation fails. network_view . Parameter Specify "true" to set the auto_create_reversezone flag or "false" to deactivate/unset it.Optional. comment => "my-comment". auto_create_reversezone( ) Use this method to set the auto_create_reversezone flag of a DHCP Network Container object. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP Network Container object. Include the specified parameter to set the attribute value. If you did not specify a parameter. the method returns the attribute value. # Modify comment $network_container->comment("add a network"). This is a write-only attribute and cannot be retrieved after it is set.Optional. ).0\. Omit the parameter to retrieve the attribute value.*'. Returns If you specified a parameter. all A hash reference containing extensible attributes. the method returns true when the modification succeeds. comment( ) Use this method to set or retrieve a descriptive comment for a DHCP Network Container object. comment . NIOS 5. the method returns true when the modification succeeds. By default. # search network by comment my @retrieved_objs = $session->search( object => "Infoblox::DHCP::NetworkContainer". network views are searched.1r4 Page 206 (Rev.Optional. Returns If you specified a parameter. Include the specified parameter to set the attribute value. Example # Modify auto_create_reversezone $network_container->auto_create_reversezone("true"). A) .0\. and returns false when the operation fails. Examples The IP address and netmask of a network in CIDR format (regular The network view in which the network is located. network => '20\. expression). # search for all DHCP Network Container objects my @retrieved_objs = $session->search( object => "Infoblox::DHCP::NetworkContainer". Example # Get comment my $comment = $network_container->comment(). A comment in string format (regular expression). extensible_attributes => { 'Site' => 'Santa Clara' } ).. # search for all DHCP Network Container objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::NetworkContainer".Optional.Infoblox API Documentation Apply the following attributes to search for a DHCP Network Container object: network . The default value for this field is "false". Parameter Enter a descriptive comment for the network container in string format with a maximum of 256 bytes.

the method returns true when the modification succeeds. and returns false when the operation fails. If you did not specify a parameter. If you did not specify a parameter. The default value is undefined. #Remove the container keeping the subnets $session->remove($network_container). For a list. the value is a string with a maximum of 256 characters. Omit the parameter to retrieve the attribute value. It is not retrieved or used for any other operation. the value is the number of seconds that have elapsed since January 1st. the value is an integer from -2147483648 through 2147483647.Infoblox API Documentation extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP Network Container object Include the specified parameter to set the attribute value. The default value is undefined. Omit the parameter to retrieve the attribute value.0. Example #Set remove_subnets before submitting for removal $network_container->remove_subnets("false"). network( ) Use this method to retrieve the network attribute of a DHCP Network Container object. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. the method returns true when the modification succeeds. Example #Get network my $network = $network_container->network(). 'Administrator' => [ 'Peter'. 'Tom' ] }). the method returns the attribute value. the method returns the attribute value. Example #Get extensible attributes my $ref_extensible_attributes = $network_container->extensible_attributes(). If you did not specify a parameter. 1970 UTC. For email. #Modify extensible attributes $network_container->extensible_attributes({ 'Site' => 'Santa Clara'. A) . Returns If you specified a parameter. and string types. Parameter Specify "false" to keep the subnets or "true" to remove them. For a date. Include the specified parameter to set the attribute value. Returns If you specified a parameter. and returns false when the operation fails.0/8). remove_subnets( ) Use this method to set or retrieve the remove_subnets flag of a DHCP Network Container object. the method returns the attribute value. URL. which is to remove all subnets. the method returns true when the modification succeeds. This flag is only intended as an option when removing DHCP Network Container objects.1r4 Page 207 (Rev. network_container( ) NIOS 5. Include the specified parameter to set the attribute value. the value is a string with a maximum of 64 characters. and returns false when the operation fails. Returns If you specified a parameter. You can remove the network. Omit the parameter to retrieve the attribute value. but keep all subnets under it if this flag is set to false. Parameter Specify the address and netmask of the network in CIDR format (example: 10.0. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. For an integer.

0/8" ). The bitmask prefix length after resizing.1r4 Page 208 (Rev.0. The default value is the "default" network view. Parameter Specify the IP address and netmask of a network in CIDR format.Required.Infoblox API Documentation Use this method to set or retrieve the network container of a DHCP Network Container object. # Expand a /24 network container to a /16 network container. The default network view value is the system-defined default network view object. If you did not specify a parameter. the method returns true when the modification succeeds.0. NIOS 5.0/8"). the method returns the attribute value. and returns false when the operation fails. A) . and returns false when the operation fails. my $response = $network_container->resize( prefix => "16" auto_create_reversezone => "true" ) or die("Resize Network Container failed: ". the method returns true when the modification succeeds. #Modify network container $network->network_container("50. the object MUST be retrieved through a get or search call. with an Infoblox::DHCP::View object $network_container->network_view($nview).0. network => "20. Parameter Valid value is a defined Infoblox::DHCP::View object. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter prefix . and returns false when the operation fails. which means the network is in the default network view. or it must have been created with an add call. Returns If you specified a parameter. inserting # a corresponding reverese zone in the process. Note that to use this method. Example #Get network container my $network_container = $network->network_container().0. the method returns the attribute value. the error code and error message are reported in the Session object's status_code() and status_detail() attributes. Returns The method returns true when the operation succeeds. my $network_container = $retrieved_objs[0]. auto_create_reversezone . Example #Get network view my $nview = $network_container->network_view(). Example #Get Network Container through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::NetworkContainer" . Boolean flag indicating whether or not to automatically create the reverse zone. #Modify network view. network_view( ) Use this method to set or retrieve the network view of the DHCP network container. Omit the parameter to retrieve the attribute value. When an operation fails. Include the specified parameter to set the attribute value. Returns If you specified a parameter. If you did not specify a parameter. resize( ) Use this method to resize a network container.Optional.

search. unless ($session) { die("Construct session failed: ". use Infoblox. $session->status_detail()). If the network container has a parent.2". and returns false when the operation fails. ). comment => "add network container".Infoblox API Documentation $session->status_code() . ). This sample also includes error handling for the operations.0\. and remove. ":" . #Search for a specific Network Container #Search the network container my @retrieved_objs = $session->search( object => "Infoblox::DHCP::NetworkContainer". A) . $zone2]). ##Remove the override for zone_associations $network_container->zone_associations(undef) SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. $session->status_code() . the method returns the attribute value.1r4 Page 209 (Rev. #Modifying zone_associations $network_container->zone_associations([$zone1. #Create a DHCP Network Container object my $network_container = Infoblox::DHCP::NetworkContainer->new( network => "10. modify. Examples #Getting zone associations my $zone_associations = $network_container->zone_associations().0/8". If you did not specify a parameter..168.*' ). the method returns true when the modification succeeds.com". #Preparation prior to a DHCP Network Container object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. my $zone1 = Infoblox::DNS::Zone->new( name => "test1. ). Parameter The valid value is an array reference that contains Infoblox::DNS::Zone object(s). ":" .1.com". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. #Clear zone_assocations $network_container->zone_associations([]). Returns If you specified a parameter. Infoblox::status_detail()). my $zone2 = Infoblox::DNS::Zone->new( name => "test2. NIOS 5. password => "infoblox" ). ":" .0. username => "admin".0\. } print "Session created successfully\n". $session->status_detail()). network => '10\. my $response = $session->add($network_container) or die("Add Network Container failed: ". print "Network Container added successfully\n". Infoblox::status_code() . zone_associations( ) Use this method to set or retrieve the associated zone information. The default value is an empty list. it is possible to use the zone associations of the parent by setting the parameter to undef.0.

#Submit the object for removal $session->remove($object) or die("Remove Network Container failed: ". my $object = $retrieved_objs[0]. #Remove a Network Container Object #Get Network Container object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::NetworkContainer" . network => "10.0. $session->status_detail()). unless ($object) { die("Get Network Container object failed: ". #Get and modify a Network Container attribute #Get Network Container through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::NetworkContainer" .0/8" ). print "Network Container object modified successfully \n". #Resize a network container #Get Network through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::NetworkContainer" .0/8" ).0. print "Network Container removed successfully \n". ":" . network => "10. ":" . network => "10. $session->status_code() . ":" . A) . #Modify one of the attributes of the specified Network Container object $object->comment("modified comment"). $session->status_detail()). ":" . #Resize my $response = $object->resize( prefix => "16" ) or die("Resize Network Container failed: ". unless ($object) { die("Get Network Container object failed: ".Infoblox API Documentation my $object = $retrieved_objs[0]. $session->status_code() . $session->status_code() . ####PROGRAM ENDS#### AUTHOR NIOS 5. my $object = $retrieved_objs[0]. } print "Get Network Container object found at least 1 matching entry\n".0. $session->status_detail()). $session->status_code() . $session->status_code() . $session->status_detail()). unless ($object) { die("Search Network Container failed: ".1r4 Page 210 (Rev. #Apply the changes $session->modify($object) or die("Modify Network Container attribute failed: ".0. } print "Get Network Container found at least 1 matching entry\n". } print "Search Network Container found at least 1 matching entry\n". my $object = $retrieved_objs[0]. $session->status_detail()). ":" .0.0. $session->status_detail()).0" ). $session->status_code() . ":" .

com/ SEE ALSO Infoblox::Session. NIOS 5. Infoblox::Session->modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::Session->search(). Infoblox::Session->get(). A) .Infoblox API Documentation Infoblox Inc. Infoblox::DHCP::View. Infoblox::Session->add().1r4 Page 211 (Rev. Infoblox::Session->remove(). http://www. Infoblox::DHCP::Network.infoblox.

Infoblox API Documentation Infoblox::DHCP::NetworkTemplate . CONSTRUCTOR my $network_template = Infoblox::DHCP::NetworkTemplate->new( name => $string. #Optional / Default is "false" #Required NIOS 5. allow_any_netmask => "true" | "false". A) .DHCP Network Template object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->search( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) METHODS allow_any_netmask( ) authority( ) auto_create_reversezone( ) bootfile( ) bootserver( ) comment( ) ddns_domainname( ) ddns_generate_hostname( ) ddns_update_fixed_addresses( ) ddns_server_always_updates( ) ddns_ttl( ) ddns_use_option81( ) deny_bootp( ) email_list( ) enable_ddns( ) enable_dhcp_thresholds( ) enable_email_warnings( ) enable_snmp_warnings( ) extensible_attributes( ) fixed_address_templates( ) high_water_mark( ) ignore_dhcp_option_list_request( ) lease_scavenge_time( ) low_water_mark( ) members( ) name( ) netmask( ) nextserver( ) options( ) override_ddns_domainname( ) override_ddns_ttl( ) override_lease_scavenge_time( ) override_update_dns_on_lease_renewal( ) pxe_lease_time( ) range_templates( ) update_dns_on_lease_renewal( ) recycle_leases( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::NetworkTemplate .DHCP Network Template object DESCRIPTION You can use a template to create networks in a quick and consistent way. Networks created from a network template inherit all the properties defined in the network template. except for the comment and netmask if they are defined in the network.1r4 Page 212 (Rev.

#Optional / Default undefined email_list => [ "admin\@test..] #Optional / Default is empty override_ddns_ttl => "true" | "false". #Optional / Default is -1 low_water_mark => $string.].. #Optional / Default value is "false" override_ddns_domainname => "true" | "false".... Infoblox::Session->add( ) Use this method to add a network template object to the Infoblox appliance. #Optional / Default is undefined deny_bootp => "true" | "false" | undef. #Optional / Default value is "false" override_lease_scavenge_time => "true" | "false".$FixedAddrTemplate2.] . #Optional / Default is undefined ddns_generate_hostname => "true" | "false" | undef. #Optional / Default is undefined comment => $string. }.com". .. $string => [ $string | $num.. ]. #Optional / Default is undefined options => [$Option1. SESSION METHODS This section describes all the methods in an Infoblox::Session module that you can apply to a DHCP Network Template object. #Optional / Default is empty ddns_domainname => $string | undef.. #Optional / Default is "false" auto_create_reversezone => "true" | "false" #Optional / Default is "false" bootfile => $filename | undef. A) . #Optional / Default is 0 ddns_use_option81 => "true" | "false" | undef. #Optional / Default is "true" ddns_ttl => $num. #Optional / Default is undefined enable_snmp_warnings => "true" | "false". NIOS 5.$Option2. #Optional / Default is undefined fixed_address_templates => [$FixedAddrTemplate1. #Optional / Default value is "false" pxe_lease_time => $num | undef..Infoblox API Documentation authority => "true" | "false". #Optional / Default is undefined ddns_server_always_updates => "true" | "false". #Optional / Default is undefined update_dns_on_lease_renewal => "true" | "false".$RangeTemplate2. #Optional / Default is undefined enable_dhcp_thresholds => "true" | "false"... #Optional / Default is undefined extensible_attributes => { $string => $string | $num. #Optional / Default is empty netmask => $netmask. #Optional / Default is empty ignore_dhcp_option_list_request => "true" | "false" | undef.. #Optional / Default is empty recycle_leases => "true" | "false" | undef... #Optional / Default is empty members => [$Member1. #Optional / Default value is "false" override_update_dns_on_lease_renewal => "true" | "false".$Member2.. #Optional / Default is undefined enable_ddns => "true" | "false" | undef.. .1r4 Page 213 (Rev. #Optional / Default is undefined ddns_update_fixed_addresses => "true" | "false" | undef. #Optional / Default is undefined enable_email_warnings => "true" | "false".... #Optional / Default value is "false" ). #Optional / Default is /8 nextserver => $ipv4addr | $fqdn | undef.] #Optional / Default is empty high_water_mark => $string. #Optional / Default is undefined lease_scavenge_time => $number. #Optional / Default is undefined range_templates => [$RangeTemplate1. #Optional / Default is undefined bootserver => $ipv4addr | $fqdn | undef.]. See Infoblox::Session->add() for parameters and return values.

Optional. # Submit for adding network template my $response = $session->add( $network_template ). Key References Apply the following attributes to get a specific DHCP Network template object: name .Infoblox API Documentation Example #Construct an object my $network_template = Infoblox::DHCP::NetworkTemplate->new( name => "custom_network_template". ). See Infoblox::Session->search() for parameters and return values. # search all Network Templates with a given extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::NetworkTemplate". name => "custom_network_template" comment => ".*". extensible_attributes => { 'Site' => 'Santa Clara' }). The name of network template. The comment of the network template (regular expression). A hash reference containing extensible attributes. A) . allow_any_netmask => "true". name => "custom_network_template" Infoblox::Session->search( ) Use this method to retrieve all the matching network template objects from the Infoblox appliance.Optional. Infoblox::Session->modify( ) Use this method to modify a network template object in the Infoblox appliance. Example my @result_array = $session->search( object => "Infoblox::DHCP::NetworkTemplate" . See Infoblox::Session->get() for parameters and return values. To remove a specifc object. Key References Apply the following attributes to search for a specific DHCP Network Template object: name . first use get() or search() to retrieve the specific object. # Submit modification my $response = $session->modify( $object ). See Infoblox::Session->modify() for parameters and return values. @result_array = $session->get( object => "Infoblox::DHCP::NetworkTemplate" . Example # Get the object under the same name NIOS 5.Optional.Required. Example my ). ). The name of the network template (regular expression). extensible_attributes . Example #Use method to modify enable_ddns method. See Infoblox::Session->remove() for parameters and return values. Infoblox::Session->remove( ) Use this method to remove an object from the Infoblox appliance. $object->enable_ddns("true").1r4 Page 214 (Rev. Infoblox::Session->get( ) Use this method to retrieve the matching network template objects from the Infoblox appliance. comment . and then submit this object for removal.

Infoblox API Documentation my @result_array = $session->get( object => "Infoblox::DHCP::NetworkTemplate" . This flag indicates whether the appliance must automatically create the corresponding reverse zone. name => "custom_network_template" ). authority( ) Use this method to set or retrieve the authority flag of a DHCP network template object. If you did not specify a parameter. A) . the method returns the attribute value. Omit the parameter to retrieve the attribute value. =item B<Returns> If you specified a parameter. If you set this parameter to "true". Include the specified parameter to set the attribute value. Example # Get authority my $authority = $network_template->authority() # Modify authority $network_template->authority("true"). the method returns true when the modification succeeds. and returns false when the operation fails. The default value is undefined which indicates that this attribute inherits the upper-level setting. This flag specifies if a DHCP server is authoritative for the network. then the template allows any netmask.1r4 Page 215 (Rev. # Submit for removal my $response = $session->remove( $desired_network_template ). Parameter Specify "true" to set the authority flag or "false" to deactivate/unset it. # find the desired object from retrieved list. Include the specified parameter to set the attribute value. If you did not specify a parameter. A user must specify a netmask when creating a network using this template. Parameter NIOS 5. the method returns the attribute value. The default value is false. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. If you set this parameter to false. Parameter Specify "true" to set the allow_any_netmask parameter or specify "false" if you want to specify a particular netmask. Example # Get allow_any_netmask my $allow_any_netmask = $network_template->allow_any_netmask() # Modify allow_any_netmask $network_template->allow_any_netmask("true"). Returns If you specified a parameter. and returns false when the operation fails. my $desired_network_template = $result_array[0]. auto_create_reversezone( ) Use this method to set or retrieve the auto_create_reversezone flag of a DHCP network template object. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP Network template object allow_any_netmask( ) Use this method to set or retrieve the allow_any_netmask parameter of a DHCP network template object. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. you must specify the "netmask" property for the network template object.

If you did not specify a parameter. Returns If you specified a parameter. Parameter The name. the method returns true when the modification succeeds. The default value is undefined which indicates that this attribute inherits the upper-level setting. You can specify the name of the boot server on which the boot file is stored. Example # Get bootfile my $bootfile = $network_template->bootfile(). and returns false when the operation fails. If you did not specify a parameter.1r4 Page 216 (Rev. #Un-override bootserver $network_template->bootserver(undef). Example # Get bootserver my $bootserver = $network_template->bootserver(). the method returns the attribute value. the method returns the attribute value.com). The FQDN consists of the host name followed by the domain name (example: abc. in string format. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. bootserver( ) Use this method to set or retrieve the boot server attribute of a DHCP network template object. The default value is undefined. This option is overridden independently from Infoblox::DHCP::NetworkTemplate->bootfile() and Infoblox::DHCP::NetworkTemplate>nextserver(). A next server name can have a maximum of 256 bytes. comment( ) NIOS 5. The default value is undefined. # Modify auto_create_reversezone $network_template->auto_create_reversezone("true"). Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds.The default value for this field is false. Example # Get auto_create_reversezone my $auto_create_reversezone = $network_template->auto_create_reversezone(). The default value is undefined which indicates that this attribute inherits the upper-level setting. If you did not specify a parameter. You can configure the DHCP server to support clients that use the boot file name option in their DHCPREQUEST messages. # Modify bootfile $network_template->bootfile("bootfile1").com").Infoblox API Documentation Specify "true" to create a reverse zone automatically or "false" to disable the automatic creation of a reverse zone. A) . Returns If you specified a parameter.domain. the method returns the attribute value. #Un-override bootfile $network_template->bootfile(undef). This option is overridden independently from Infoblox::DHCP::NetworkTemplate->bootserver() and Infoblox::DHCP::NetworkTemplate>nextserver(). and returns false when the operation fails. bootfile( ) Use this method to set or retrieve the bootfile attribute of a DHCP network template object. Omit the parameter to retrieve the attribute value. of the file that the client must download. # Modify bootserver $network_template->bootserver("abc. Returns If you specified a parameter. Include the specified parameter to set the attribute value. and returns false when the operation fails.

Set this flag to allow only the DHCP server to generate a host name. will set override_ddns_domainname to "false". Include the specified parameter to set the attribute value. Returns If you specified a parameter. A) . The default value is undefined which indicates that this attribute inherits the upper-level setting. Include the specified parameter to set the attribute value. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. Parameter The dynamic DNS domain name in string format. the method returns true when the modification succeeds. and returns false when the operation fails. the method returns the attribute value. Parameter Specify "true" to generate hostname or "false" to deactivate/unset it. #Un-override $network_template->ddns_generate_hostname(undef).com"). #Modify ddns_domainname $network_template->ddns_domainname("test_domain. the method returns true when the modification succeeds. the method returns the attribute value. Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false". If you did not specify a parameter. NIOS 5. and returns false when the operation fails. # Modify comment $network_template->comment("add a network"). Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.Infoblox API Documentation Use this method to set or retrieve a descriptive comment about a DHCP network template object. If you did not specify a parameter. $object->override_ddns_domainname("false"). This setting overrides the upper-level settings. Example #Get ddns_domainname my $ddns_domainname = $network_template->ddns_domainname(). Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false".1r4 Page 217 (Rev. the method returns the attribute value. Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true". $object>ddns_domainname("testdomain"). Omit the parameter to retrieve the attribute value. ddns_domainname( ) Use this method to set or retrieve the ddns_domainname value of a DHCP Network template object. If you did not specify a parameter. Parameter Enter a descriptive comment for the network in string format with a maximum of 256 bytes. Thus the sequence $object->ddns_domainname("testdomain"). the method returns true when the modification succeeds. Example # Get comment my $comment = $network_template->comment(). the last operation takes precedence. ddns_generate_hostname( ) Use this method to set or retrieve the ddns_generate_hostname flag of a DHCP network template object. Returns If you specified a parameter. Example # Get ddns_generate_hostname my $ddns_generate_hostname = $network_template->ddns_generate_hostname() # Modify ddns_generate_hostname $network_template->ddns_generate_hostname("true"). will result in override_ddns_domainname="true". and returns false when the operation fails. and the sequence $object->override_ddns_domainname("false").

Setting this method to a defined value implicitly sets the override_ddns_ttl method to "true". Parameter Specify "true" to update DNS when it allocates a fixed address to a client or "false" to deactivate/unset it. the method returns the attribute value. and returns false when the operation fails.Infoblox API Documentation ddns_update_fixed_addresses( ) Use this method to set server does not update records of a client with the DHCP server never or retrieve the ddns_update_fixed_addresses flag of a DHCP network template object. A) . Zero indicates that the update should not be cached. the method returns the attribute value.1r4 Page 218 (Rev. the DHCP DNS when it allocates a fixed address to a client. If you did not specify a parameter. and returns false when the operation fails. By default. will result in override_ddns_ttl="true". that the update is cached. Returns If you specified a parameter. and the sequence $object>override_ddns_ttl("false"). Example # Get ddns_server_always_updates my $ddns_server_always_updates = $network_template->ddns_server_always_updates() # Modify ddns_server_always_updates $network_template->ddns_server_always_updates("true"). $object->ddns_ttl(12). regardless of the requests from DHCP clients. NIOS 5. $object->override_ddns_ttl("false"). Example # Get ddns_update_fixed_addresses my $ddns_update_fixed_addresses= $network_template->ddns_update_fixed_addresses() # Modify ddns_update_fixed_addresses $network_template->ddns_update_fixed_addresses("true"). Parameter A 32-bit integer (range from 0 to 4294967295) that represents the duration. ddns_ttl( ) Use this method to set or retrieve the DNS update Time to Live (TTL) value of a DHCP network template object. When this feature is enabled and the DHCP server adds A and PTR records for a fixed address. Omit the parameter to retrieve the attribute value. the method returns the attribute value. The default value is 0. the method returns true when the modification succeeds. the method returns true when the modification succeeds. discards the records. The TTL value indicates the number of seconds the Infoblox appliance caches a DDNS update. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. This setting overrides the upper-level settings. ddns_server_always_updates( ) Use this method to set or retrieve the ddns_server_always_updates flag of a DHCP network template object. If you did not specify a parameter. and returns false when the operation fails. will set override_ddns_ttl to "false". Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Thus the sequence $object->ddns_ttl(12). Set this flag to allow the DHCP server only to update DNS. Note that when ddns_ttl is set to a defined value and override_dddns_ttl is set to "false". Parameter Specify "true" to set this flag and allow the DHCP server only to update DNS or "false" to deactivate/unset the flag. the last operation takes precedence. in seconds. If you did not specify a parameter. Returns If you specified a parameter. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_ttl attribute to "false". You can configure the DHCP server to update the A and PTR a fixed address. Omit the parameter to retrieve the attribute value. #Un-override $network_template->ddns_update_fixed_addresses(undef). The default value is true. The default value is undefined which indicates that this attribute inherits the upper-level setting. Include the specified parameter to set the attribute value. Returns If you specified a parameter.

then the appliance sends DHCP threshold alarms to the e-mail addresses. Example #Get deny_bootp my $deny_bootp = $network->deny_bootp(). Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. Enable this method to define the settings for option 81 at the network template level. Parameter The valid value is an array reference that contains string objects. and returns false when the operation fails. the method returns true when the modification succeeds. the method returns the attribute value. This setting overrides the upper-level settings. #Modify email_list NIOS 5. Example #Get email_list my @email_list = $network_template->email_list(). Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. the method returns the attribute value. the method returns true when the modification succeeds. #Modify deny_bootp $network->deny_bootp("true"). If you did not specify a parameter. If you enter e-mail addresses in the email_list. and returns false when the operation fails. The default value is undefined which indicates that this attribute inherits the upper-level setting. Returns If you specified a parameter. # un-override ddns_use_option81 $network_template->ddns_use_option81(undef). Returns If you specified a parameter. Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. The default value is undefined which indicates that this attribute inherits the upper-level setting. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Example # Get ddns_use_option81 my $ddns_use_option81 = $network_template->ddns_use_option81() # Modify ddns_use_option81 $network_template->ddns_use_option81("true"). If you did not specify a parameter. email_list( ) Use this method to set or retrieve the e-mail lists to which the appliance sends threshold e-mail messages.Infoblox API Documentation Example #Get DNS Update ttl my $dns_ttl = $network_template->ddns_ttl(). ddns_use_option81( ) Use this method to set or retrieve the ddns_use_option81 flag of a DHCP network template object. #Modify DNS Update ttl $network_template->ddns_ttl(1200).1r4 Page 219 (Rev. Parameter Specify "true" to enable support for option 81 or "false" to disable support. deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP Network object. A) . the method returns the attribute value. Returns If you specified a parameter. and returns false when the operation fails.

the method returns the attribute value. and returns false when the operation fails. Parameter Specify "true" to set the enable_dhcp_thresholds flag or "false" to deactivate/unset it. #Modify enable_dhcp_thresholds $network_template->enable_dhcp_thresholds("false"). Enable this flag to set DHCP threshold values. the method returns the attribute value. Enable this flag if you want the appliance to send DHCP threshold warnings to the "email_list" provided. the method returns true when the modification succeeds. Example #Get enable_email_warnings my $enable_email_warnings = $network_template->enable_email_warnings(). enable_snmp_warnings( ) NIOS 5. The default value is undefined. The default value is undefined. Returns If you specified a parameter. Parameter Specify "true" to set the dynamic DNS updates flag or "false" to deactivate/unset it. The default value is undefined which indicates that this attribute inherits the upper-level setting. If you did not specify a parameter. #Modify enable_email_warnings $network_template->enable_email_warnings("false"). Include the specified parameter to set the attribute value. A) . Omit the parameter to retrieve the attribute value. Parameter +Specify "true" to set the enable_email_warnings flag or "false" to deactivate/unset it. enable_ddns( ) Use this method to set or retrieve the dynamic DNS updates flag of a DHCP network template object.1r4 Page 220 (Rev. enable_email_warnings( ) Use this method to send DHCP thresholds warnings through e-mail.com" ] ). and returns false when the operation fails. Example #Get enable_dhcp_thresholds my $enable_dhcp_thresholds = $network_template->enable_dhcp_thresholds(). If you did not specify a parameter. the Infoblox appliance generates a syslog message and sends an SNMP notification. This setting overrides the upper-level settings. If DHCP range usage goes above or below these percentage values. enable_dhcp_thresholds( ) Use this method to set or retrieve the DHCP thresholds of a network template object. Returns If you specified a parameter. These thresholds are the high and low watermarks. the method returns true when the modification succeeds. the method returns the attribute value. Returns If you specified a parameter.Infoblox API Documentation $network_template->email_list( [ "admin\@test. # Un-override enable_ddns $network_template->enable_ddns(undef). Example # Get enable_ddns my $enable_ddns = $network_template->enable_ddns() # Modify enable_ddns $network_template->enable_ddns("true"). If you did not specify a parameter. The DHCP server can send DDNS updates to DNS servers in the same grid and to external DNS servers. the method returns true when the modification succeeds. and returns false when the operation fails.

'Tom' ] }). high_water_mark( ) NIOS 5. the value is a string with a maximum of 256 characters. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. For a date. the method returns the attribute value. the value is a string with a maximum of 64 characters. and returns false when the operation fails. The default value is undefined. Parameter Specify "true" to set the enable_snmp_warnings flag or "false" to deactivate/unset it. A) . $network_template->fixed_address_templates([$tmpl]). If the flag is enabled. #Modify enable_snmp_warnings $network_template->enable_snmp_warnings("false"). the method returns the attribute value. # Modify fixed_address_templates my $tmpl = Infoblox::DHCP::Template->new( name => "custom_fixed_address_template" ). If you did not specify a parameter. The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. the value is an integer from -2147483648 through 2147483647. #Modify extensible attributes $network_template->extensible_attributes({ 'Site' => 'Santa Clara'. Example # Get fixed_address_templates my $fixed_address_templates = $network_template->fixed_address_templates().1r4 Page 221 (Rev. the fixed addresses are created based on the associated fixed address template. 'Administrator' => [ 'Peter'. If you did not specify a parameter. When you create a network based on a network template object with a fixed address template. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. the value is the number of seconds that have elapsed since January 1st. Include the specified parameter to set the attribute value. Example #Get extensible attributes my $ref_extensible_attributes = $network_template->extensible_attributes(). For a list. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter The valid value is an array reference of Infoblox::DHCP::Template objects. the method returns the attribute value. If you did not specify a parameter. Returns If you specified a parameter. and returns false when the operation fails. Returns If you specified a parameter. the method returns true when the modification succeeds. the method returns true when the modification succeeds. For an integer. Example #Get enable_snmp_warnings my $enable_snmp_warnings = $network_template->enable_snmp_warnings(). The default value is undefined. 1970 UTC.Infoblox API Documentation Use this method to send DHCP threshold warnings through SNMP. URL. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a Network Template object. and returns false when the operation fails. For email. and string types. fixed_address_templates( ) Use this method to set or retrieve the fixed address template assigned to this network template object. Returns If you specified a parameter. then the appliance sends DHCP threshold warnings through SNMP messages.

Example #Get high_water_mark my $high_water_mark = $network_template->high_water_mark(). the appliance generates a syslog message and sends a warning. Example NIOS 5. Setting the parameter to undefined causes the appliance to use the default from the upper level and automatically resets the override_lease_scavenge_time attribute to "false". # Modify ignore_dhcp_option_list_request $network_template->ignore_dhcp_option_list_request("false"). Parameter Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate/unset it. the method returns the attribute value. $object>lease_scavenge_time(604800). If you did not specify a parameter. the last operation takes precedence. Parameter An integer that specifies the period of time. Include the specified parameter to set the attribute value. which means that lease scavenging is disabled. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. The minimum positive value must be greater than 86400 seconds (1 day). To disable lease scavenging. # Un-override ignore_dhcp_option_list_request $network_template->ignore_dhcp_option_list_request(undef). the method returns the attribute value. and returns false when the operation fails. If you did not specify a parameter. set the parameter to -1. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. the method returns the attribute value. in seconds.1r4 Page 222 (Rev. #Modify high_water_mark $network_template->high_water_mark("80"). ignore_dhcp_option_list_request( ) Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP network template object. The default value is empty. Returns If you specified a parameter. Returns If you specified a parameter. Include the specified parameter to set the attribute value. The default value of this parameter is -1. and returns false when the operation fails. Set this flag to ignore option lists requested by clients and return all defined options at the network template level. When the percent of allocated addresses in a DHCP range exceeds the high_water_mark. Thus the sequence $object->lease_scavenge_time(604800). $object->override_lease_scavenge_time("false"). and the sequence $object->override_lease_scavenge_time("false"). the method returns true when the modification succeeds. that free and backup leases remain in the database before they are automatically deleted.Infoblox API Documentation Use this method to set the percentage value for DHCP range usage above which the Infoblox appliance generates a syslog message and sends a warning. the method returns true when the modification succeeds. Setting this method to a defined value implicitly sets the override_lease_scavenge_time method to "true". A) . will result in override_lease_scavenge_time="true". Note that when lease_scavenge_time is set to a defined value and override_lease_scavenge_time is set to "false". lease_scavenge_time( ) Use this method to set or retrieve the lease_scavenge_time value of a Network Template object. Parameter The valid value is in string format. Returns If you specified a parameter. will set override_lease_scavenge_time to "false". If you did not specify a parameter. Example # Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $network_template->ignore_dhcp_option_list_request().

the method returns the attribute value. the appliance generates a syslog message and sends a warning. Omit the parameter to retrieve the attribute value. the method returns the attribute value. When the percent of allocated addresses in a DHCP range goes below the low_water_mark. Returns If you specified a parameter. Parameter The valid value is in string format. the method returns true when the modification succeeds.1. members( ) Use this method to set or retrieve the member or Microsoft (r) server that serves DHCP for the network created from the network template object. and returns false when the operation fails.localdomain". Example my $member1 = Infoblox::DHCP::Member->new( name => "infoblox. Returns If you specified a parameter. If you did not specify a parameter. # Modify members $network_template->members([$member1]). and returns false when the operation fails. If you did not specify a parameter. Example #Get name my $name = $network_template->name(). Include the specified parameter to set the attribute value. name( ) Use this method to set or retrieve the description of the name of the DHCP network template.2". Include the specified parameter to set the attribute value.1r4 Page 223 (Rev. ). the method returns the attribute value. NIOS 5.168. #Modify lease_scavenge_time $network_template->lease_scavenge_time(30 * 24 * 60 * 60). Returns If you specified a parameter. A) . Parameter The valid value is an array reference that contains Infoblox::DHCP::Member or Infoblox::DHCP::MSServer objects. the method returns true when the modification succeeds. low_water_mark( ) Use this method to set the percentage value for DHCP range usage below which the Infoblox appliance generates a syslog message and sends a warning. the method returns true when the modification succeeds. Parameter Name of the network template in string format with a maximum of 64 bytes. and returns false when the operation fails. #Modify low_water_mark $network_template->low_water_mark("10").Infoblox API Documentation #Get lease_scavenge_time my $lease_scavenge = $network_template->lease_scavenge_time(). Omit the parameter to retrieve the attribute value. # Get members my $members = $network_template->members(). Example #Get low_water_mark my $low_water_mark = $network_template->low_water_mark(). If you did not specify a parameter. ipv4addr => "192.

The default value is undefined which indicates that this attribute inherit the upper-level setting. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. and returns false when the operation fails. and returns false when the operation fails. Example # Get nextserver my $nextserver = $network_template->nextserver(). nextserver( ) Use this method to set or retrieve the nextserver attribute of a DHCP network template object. A) .com").domain. the method returns true when the modification succeeds. The default value is "255. the method returns the attribute value.0. my $netmask = $network_template->netmask("255.Infoblox API Documentation #Modify name $network_template->name("custom_network_template").0. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. Parameter A valid subnet mask. A next server name can have a maximum of 256 bytes. The default value is undefined.0. This setting overrides the upper-level settings. the method returns true when the modification succeeds. Returns If you specified a parameter. If you did not specify a parameter. netmask( ) Use this method to set or retrieve the netmask attribute of a DHCP network template object. Example #Get netmask my $netmask = $network_template->netmask(). the method returns true when the modification succeeds.0"). Returns If you specified a parameter. If you did not specify a parameter. If "allow_any_netmask" is set to "false". # Modify nextserver $network_template->nextserver("blue. Omit the parameter to retrieve the attribute value. NIOS 5. The FQDN consists of the host name followed by the domain name (example: abc. The default value is undefined which indicates that this attribute inherits the upper-level setting. You can specify the name and/or IP address of the next server to which the host needs to connect in order to boot. Include the specified parameter to set the attribute value.0". Include the specified parameter to set the attribute value. options( ) Use this method to set or retrieve the options value of a network template object. DHCP options provide network configuration settings and various services available on the network for DHCP. Include the specified parameter to set the attribute value.0. This option is overridden independently from Infoblox::DHCP::NetworkTemplate->bootfile() and Infoblox::DHCP::NetworkTemplate>bootserver(). the method returns the attribute value. #Un-override nextserver $network_template->nextserver(undef). #Set netmask $nework_template->allow_any_netmask( "false" ). If you did not specify a parameter.com). Parameter The valid value is an array reference that contains Infoblox::DHCP::Option objects. then this attribute must be specified.1r4 Page 224 (Rev. Omit the parameter to retrieve the attribute value. the method returns the attribute value. Returns If you specified a parameter. This setting overrides the upper-level setting.

NIOS 5. value => 50 ). #Modifying override_ddns_domainname $network_template->override_ddns_domainname("true"). the method returns the attribute value. Set the parameter to "false" to inherit the grid-level setting for ddns_domainname. Omit the parameter to retrieve the attribute value. Parameter Set the parameter to "true" to override the grid-level setting for ddns_domainname. and returns false when the operation fails. instead of the grid default. and returns false when the operation fails. Parameter Set the parameter to "true" to override the grid-level setting for ddns_ttl. The override_ddns_domainname attribute can be specified explicitly. Include the specified parameter to set the attribute value. The override_lease_scavenge_time attribute can be specified explicitly. If you did not specify a parameter. Example #Getting override_ddns_ttl my $override_ddns_ttl=$network_template->override_ddns_ttl( ). instead of the grid default. The default value of this parameter is "false". If you did not specify a parameter.1r4 Page 225 (Rev. override_ddns_ttl( ) The override_ddns_ttl attribute controls whether the ddns_ttl value in the DHCP network template object is used. Returns If you specified a parameter. Set the parameter to "false" to inherit the grid-level setting for ddns_ttl. Returns If you specified a parameter.Infoblox API Documentation Example #Get options my $options = $network_template->options(). the method returns the attribute value. Example #Getting override_ddns_domainname my $override_ddns_domainname=$network_template->override_ddns_domainname( ). $network_template->options([$option1]). override_lease_scavenge_time( ) The override_lease_scavenge_time attribute controls whether the lease_scavenge_time value in the network template is used. the method returns true when the modification succeeds. It is also set implicitly when ddns_ttl is set to a defined value. Include the specified parameter to set the attribute value. It is also set implicitly when ddns_domainname is set to a defined value. #Modify options my $option1 = Infoblox::DHCP::Option->new( name => "lease-time". instead of the upper-level default. Omit the parameter to retrieve the attribute value. override_ddns_domainname( ) The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP network template object is used. A) . the method returns true when the modification succeeds. It is also set implicitly when lease_scavenge_time is set to a defined value. The default value of this parameter is "false". The override_ddns_ttl attribute can be specified explicitly. #Modifying override_ddns_ttl $network_template->override_ddns_ttl("true").

If you did not specify a parameter. in seconds. Zero indicates that the update should not be cached. Parameter Set the parameter to "true" to override the upper-level setting for lease_scavenge_time. the method returns the attribute value. Example #Get PXE Lease Time my $pxe_lease_time = $network_template->pxe_lease_time(). If you did not specify a parameter. pxe_lease_time( ) Use this method to set or retrieve the PXE lease time value of a DHCP network template object. override_update_dns_on_lease_renewal( ) The override_update_dns_on_lease_renewal attribute controls whether the update_dns_on_lease_renewal value in the DHCP network template object is used. which indicates that this attribute inherits the upper-level setting. A) . It is also set implicitly when update_dns_on_lease_renewal is set to a defined value. set a different lease time for PXE boot requests. Returns If you specified a parameter. #Modify PXE Lease Time NIOS 5. and returns false when the operation fails. and returns false when the operation fails. #Modifying override_update_dns_on_lease_renewal $network_template->override_update_dns_on_lease_renewal("true"). Set the parameter to "false" to inherit the grid-level setting for update_dns_on_lease_renewal. The default value is undefined. the method returns the attribute value. Some hosts use PXE (Preboot Execution Environment) to boot remotely from a server. the method returns true when the modification succeeds. Returns If you specified a parameter. Parameter Set the parameter to "true" to override the grid-level setting for update_dns_on_lease_renewal. the method returns the attribute value. the method returns true when the modification succeeds. #Modifying override_lease_scavenge_time $network_template->override_lease_scavenge_time("true"). Include the specified parameter to set the attribute value. You can configure the DHCP server to allocate an IP address with a shorter lease time to hosts that send PXE boot requests. This setting overrides the upper-level settings. The default value of this parameter is "false". The default value is undefined Returns If you specified a parameter. The default value of this parameter is "false". Example #Getting override_update_dns_on_lease_renewal my $override_update_dns_on_lease_renewal=$network_template->override_update_dns_on_lease_renewal( ). Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. Parameter A 32-bit integer (range from 0 to 4294967295) that represents the duration. so IP addresses are not leased longer than necessary. The override_update_dns_on_lease_renewal attribute can be specified explicitly. Example #Getting override_lease_scavenge_time my $override_lease_scavenge_time=$network_template->override_lease_scavenge_time( ). that the update is cached. Include the specified parameter to set the attribute value. To better manage your IP resources.Infoblox API Documentation Include the specified parameter to set the attribute value. instead of the grid default. Omit the parameter to retrieve the attribute value. Set the parameter to "false" to inherit the setting for lease_scavenge_time from the upper level.1r4 Page 226 (Rev. If you did not specify a parameter. the method returns true when the modification succeeds.

will set override_update_dns_on_lease_renewal to "false". Returns If you specified a parameter. which indicates that this attribute inherit the upper-level setting. $network_template->range_templates([ $tmpl ]). If the flag is enabled. Include the specified parameter to set the attribute value. the last operation takes precedence. If you did not specify a parameter. Parameter The valid value is an array reference of Infoblox::DHCP::Template objects. When the flag is disabled. When you create a network based on a network template object with a range template. the leases are kept in the recycle bin until one week after expiration. Note that when update_dns_on_lease_renewal is set to a defined value and override_update_dns_on_lease_renewal is set to "false". #Modify range_templates my $tmpl = Infoblox::DHCP::Template->new( name => "custom_range_template" ).1r4 Page 227 (Rev. Omit the parameter to retrieve the attribute value. #Modify update_dns_on_lease_renewal $network_template->update_dns_on_lease_renewal("true"). and the sequence $object>override_update_dns_on_lease_renewal("false"). and returns false when the operation fails. #Un-override PXE Lease Time $network_template->pxe_lease_time(undef). the method returns the attribute value. the method returns true when the modification succeeds. NIOS 5. Example #Get update_dns_on_lease_renewal my $update_dns_on_lease_renewal=$network_template->update_dns_on_lease_renewal( ). range_templates( ) Use this method to set or retrieve the IP address range template assigned to this network template object. will result in override_update_dns_on_lease_renewal="true". Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_update_dns_on_lease_renewal attribute to "false". The default value of this parameter is "false".Infoblox API Documentation $network_template->pxe_lease_time(1100). recycle_leases( ) Use this method to set or retrieve the recycle_leases flag at the network template level. The default value is undefined. $object>override_update_dns_on_lease_renewal("false"). Parameter Specify "true" to enable the recycle_leases flag or "false" to disable it. Parameter Specify "true" to set the update_dns_on_lease_renewal flag or "false" to deactivate/unset it. Example #Get range_templates my $range_templates = $network_template->range_templates(). the method returns true when the modification succeeds. Setting this method to a defined value implicitly sets the override_update_dns_on_lease_renewal method to "true". and returns false when the operation fails. A) . Returns If you specified a parameter. the leases are irrecoverably deleted. the method returns the attribute value. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. update_dns_on_lease_renewal( ) The update_dns_on_lease_renewal attribute controls whether the DHCP server updates DNS when a DHCP lease is renewed. Include the specified parameter to set the attribute value. $object->update_dns_on_lease_renewal("true"). the IP address ranges are created based on the associated IP address range template. Thus the sequence $object->update_dns_on_lease_renewal("true").

$session->status_detail()). } print "Session created successfully\n". ":" . username => "admin".0. my $host_name = "infoblox. ). If you did not specify a parameter. and returns false when the operation fails. Also. search. #Modify recycle_leases $network_template->recycle_leases("false").168. #Preparation prior to a DHCP network template insertion #PROGRAM STARTS: Include all the modules that will be used use strict.0. use Infoblox.3. ":" . modify.1. bootfile => "bootfile. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. #Add network template object #Create a DHCP Network template object my $network_template = Infoblox::DHCP::NetworkTemplate->new( name => "custom_network_template". $session->status_code() . pxe_lease_time => "3600". #Create a session to the Infoblox appliance my $host_ip = "192. Example #Get recycle_leases my $recycle_leases = $network_template->recycle_leases().0".1r4 Page 228 (Rev. comment => "add network template". this sample code includes error handling for the operations. nextserver => "3.Infoblox API Documentation Returns If you specified a parameter. bootserver => "someserver. my $session = Infoblox::Session->new( master => $host_ip. Infoblox::status_code() . my $response = $session->add($network_template) or die("Add Network template failed: ". enable_ddns => "true". name => "custom_network_template" ). my $memberdhcp = Infoblox::DHCP::Member->new( name => $host_name.2". Infoblox::status_detail()).3. the method returns the attribute value. auto_create_reversezone => "true". NIOS 5.com". password => "infoblox" ). members => [ $memberdhcp ]. netmask => "255.localdomain".3". the method returns true when the modification succeeds. #Get and modify a network template attribute #Get Network template through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::NetworkTemplate". and remove. unless ($session) { die("Construct session failed: ". authority => "true". ipv4addr => $host_ip ).com". A) . print "Network template added successfully\n".

$session->status_detail()). ":" .com/ SEE ALSO NIOS 5. $session->status_code() . #Un-override bootserver $object->bootserver(undef). ":" . $session->status_detail()).Infoblox API Documentation my $object = $retrieved_objs[0]. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. unless ($object) { die("Search Network template object failed: ". #Remove a network template object #Get Network Template object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::NetworkTemplate". #Un-override nextserver $object->nextserver(undef). } print "Get Network Template object found at least 1 matching entry\n". $session->modify($object) or die("Modify Network template attribute failed: ". print "Network Template removed successfully \n". print "Network template object modified successfully \n". } print "Search Network template found at least 1 matching entry\n". $session->status_code() . A) . ":" . #Apply the changes #Un-override bootfile $object->bootfile(undef). #Submit the object for removal $session->remove($object) or die("Remove Network Template failed: ". $session->status_detail()). my $object = $retrieved_objs[0]. $session->status_code() . $session->status_detail()). ":" . $session->status_code() . } print "Get Network template found at least 1 matching entry\n". name => "custom_network_template" ). $session->status_code() . ":" . unless ($object) { die("Get Network Template object failed: ". #Modify attributes of the specified Network Template $object->enable_ddns("true"). unless ($object) { die("Get Network template object failed: ". http://www. #Search a network template attribute #Search Network template through the session my @retrieved_objs = $session->search( object => "Infoblox::DHCP::NetworkTemplate".infoblox.1r4 Page 229 (Rev. $session->status_detail()). my $object = $retrieved_objs[0]. name => "custom_network_template" ).

Infoblox::DHCP::Member.1r4 Page 230 (Rev. A) . Infoblox::Session->search().Infoblox API Documentation Infoblox::Session. Infoblox::Session->modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::DHCP::FixedAddrTemplate. NIOS 5. Infoblox::DHCP::Network. Infoblox::DHCP::Template. Infoblox::Session->get(). Infoblox::DHCP::RangeTemplate. Infoblox::Session->remove(). Infoblox::DHCP::Option. Infoblox::Session->add().

CONSTRUCTOR my $option = Infoblox::DHCP::Option->new( value => $num | $string |"true"|"false".One of name or num must be specified / Default is undefined num => $num. See Infoblox::Grid::DHCP->options() for parameters and return values.Infoblox API Documentation Infoblox::DHCP::Option . # Configure a DHCP option for a grid my $response = $Grid_DHCP->options([$option1]).One of name or num must be specified / Default is undefined vendor_class => $string. #Optional / Default Option Space name is "DHCP" ). #Optional .1r4 Page 231 (Rev. Infoblox::Grid::DHCP->options( ) Use this function to specify DHCP options at the grid level on the Infoblox appliance. DHCP options describe network configuration settings and various services available on the network. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::Grid::DHCP->options( ) Infoblox::Grid::Member::DHCP->options( ) Infoblox::DHCP::Network->options( ) Infoblox::DHCP::NetworkTemplate->options( ) Infoblox::DHCP::SharedNetwork->options( ) Infoblox::DHCP::FixedAddr->options( ) Infoblox::DHCP::FixedAddrTemplate->options( ) Infoblox::DHCP::Range->options( ) Infoblox::DHCP::RangeTemplate->options( ) Infoblox::DHCP::Filter::Option->option_list( ) METHODS name( ) num( ) value( ) vendor_class( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Option . Example #Construct a DHCP Option object my $option1 = Infoblox::DHCP::Option->new( name => "lease-time". These options occur as variable-length fields at the end of DHCP messages. MODULE METHODS The following functions can be applied to a DHCP Option object. NIOS 5. #Optional .DHCP Option object. Infoblox::Grid::Member::DHCP->options( ) Use this function to specify DHCP options at the grid member level on the Infoblox appliance. value => "50" ). DESCRIPTION An Option sets the value of a DHCP option that has been defined in an option space. A) . See Infoblox::Grid::Member::DHCP>options() for parameters and return values. #Required name => $string.DHCP Option object.

#Construct another DHCP Option object my $option5 = Infoblox::DHCP::Option->new( name => "routers".2" ). Example #Construct a DHCP Option object my $option4 = Infoblox::DHCP::Option->new( name => "broadcast". value => "1. value => "domainname.$option5]).0.0. # Configure a DHCP option for a fixed address my $response = $Fixed_Address_DHCP->options([$option7]).0" ). See Infoblox::DHCP::FixedAddr>options() for parameters and return values.1r4 Page 232 (Rev. value => "2" ). # Configure a DHCP option for a grid member my $response = $Grid_Member_DHCP->options([$option2]). value => "host1. value => "255.0" ). Example #Construct a DHCP Option object my $option3 = Infoblox::DHCP::Option->new( name => "broadcast".com" ). See Infoblox::DHCP::NetworkTemplate->options() for parameters and return values. # Configure a DHCP option for a network my $response = $Network_DHCP->options([$option3]).0. Infoblox::DHCP::Network->options( ) Use this function to specify DHCP options at the network level on the Infoblox appliance. Infoblox::DHCP::NetworkTemplate->options( ) Use this function to specify DHCP options at the network template level on the Infoblox appliance. Infoblox::DHCP::SharedNetwork->options( ) Use this function to specify DHCP options at the shared network level on the Infoblox appliance. Example #Construct a DHCP Option object my $option6 = Infoblox::DHCP::Option->new( name => "subnet-mask". # Configure a DHCP option for a shared network my $response = $Shared_Network_DHCP->options([$option6]). # Configure a DHCP options for a network template my $response = $Network_Template_DHCP->options([$option4. value => "255. Example #Construct a DHCP Option object my $option7 = Infoblox::DHCP::Option->new( name => "host-name". Infoblox::DHCP::FixedAddrTemplate->options( ) NIOS 5. See Infoblox::DHCP::Network->options() for parameters and return values.Infoblox API Documentation Example #Construct a DHCP Option object my $option2 = Infoblox::DHCP::Option->new( name => "domain-name".255. See Infoblox::DHCP::SharedNetwork>options() for parameters and return values. Infoblox::DHCP::FixedAddr->options( ) Use this function to specify DHCP options at the fixed address level on the Infoblox appliance.com" ). A) .

2" ). value => "10. Infoblox::DHCP::RangeTemplate->options( ) Use this function to specify DHCP options at the range template level on the Infoblox appliance. value => "1. Infoblox::DHCP::Filter::Option->option_list( ) Use this function to specify DHCP options at the filter level on the Infoblox appliance. Example #Construct a DHCP Option object my $option11 = Infoblox::DHCP::Option->new( name => "broadcast".Infoblox API Documentation Use this function to specify DHCP options at the fixed address template level on the Infoblox appliance. #Construct another DHCP Option object my $option9 = Infoblox::DHCP::Option->new( name => "routers". Example #Construct a DHCP Option object my $option8 = Infoblox::DHCP::Option->new( name => "broadcast". See Infoblox::DHCP::Range->options() for parameters and return values. # Configure a DHCP option for a DHCP range my $response = $DHCP_Range->options([$option10]). # Configure a DHCP options for a fixed address template my $response = $Fixed_Address_Template_DHCP->options([$option8. #Construct another DHCP Option object my $option12 = Infoblox::DHCP::Option->new( name => "routers". NIOS 5. Example #Construct a DHCP Option object my $option10 = Infoblox::DHCP::Option->new( name => "swap-server". METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP option. value => "1. # Configure a DHCP Option for a filter my $response = $Filter_Option->option_list([$option13]). Example #Construct a DHCP Option object my $option13 = Infoblox::DHCP::Option->new( name => "pop-server".$option9]).1" ).10.$option12]). See Infoblox::DHCP::FixedAddrTemplate->options() for parameters and return values. A) . value => "2" ).2" ).10" ).1. See Infoblox::DHCP::RangeTemplate>options() for parameters and return values. value => "2" ). Infoblox::DHCP::Range->options( ) Use this function to specify DHCP options at the DHCP range level on the Infoblox appliance. # Configure a DHCP options for a range template my $response = $Range_Template_DHCP->options([$option11. value => "1. See Infoblox::DHCP::Filter::Option->option_list() for parameters and return values.1. name( ) Use this method to set or retrieve the name of the DHCP option.1r4 Page 233 (Rev.10.

. . . .array of ip-address . .array of ip-address . .string . . . . . .DHCP Option "netbios-name-servers".text . . Parameter Specify the name of the DHCP option in string format.boolean .32-bit unsigned integer .ip-address | offset (for boolean boolean boolean ip-address array of ip-address | . . Omit the parameter to retrieve the attribute value.32-bit unsigned integer . .DHCP Option "log-servers".DHCP Option integer "dhcp-message".4.16-bit unsigned integer .string .DHCP Option "www-server".DHCP Option "dhcp-client-identifier".DHCP Option "merit-dump".DHCP Option "user-class". . .DHCP Option "routers".DHCP Option "boot-size".custom defined .DHCP Option "smtp-server".array of ip-address .DHCP Option ip-address "max-dgram-reassembly".DHCP Option "router-solicitation-address". Valid values are "subnet-mask".text .DHCP Option "nwip-suboptions". .boolean .ip-address .array of ip-address .16-bit unsigned integer .text . .DHCP Option "ip-forwarding". .DHCP Option "bootfile-name".DHCP Option "ieee802-3-encapsulation".array of ip-address | . . .array of ip-address .DHCP Option "nis-servers".array of ip-address . .boolean .8-bit unsigned . . .text .text .DHCP Option "resource-location-servers".text .DHCP Option "tcp-keepalive-interval".DHCP Option "nntp-server".DHCP Option "lease-time". .DHCP Option "netbios-node-type". .DHCP Option array of offsets (for templates) "time-servers". .DHCP Option "ntp-servers". . .1r4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 .DHCP Option "arp-cache-timeout".DHCP Option "non-local-source-routing". . .DHCP Option "dhcp-rebinding-time".8) "netbios-scope".string .array of ip-address .DHCP Option "nameservers".DHCP Option "nwip-domain".array of ip-address . .DHCP Option "broadcast".DHCP Option "router-discovery".array of ip-address . . .DHCP Option "extensions-path".DHCP Option "font-servers".DHCP Option "mask-supplier". . .DHCP Option "irc-server".DHCP Option "lpr-servers". .DHCP Option "path-mtu-plateau-table". . .DHCP Option ip-address "trailer-encapsulation". .array of ip-address .array of ip-address . .ip-address .array of ip-address | 16-bit unsigned integer 8-bit unsigned integer 32-bit unsigned integer array of 16-bit .array of ip-address .DHCP Option "dhcp-message-type".DHCP Option "domain-name".text . .32-bit unsigned integer . .DHCP Option "default-ip-ttl". .DHCP Option unsigned integer "interface-mtu".ip-address .DHCP Option "vendor-encapsulated-options".DHCP Option "dhcp-parameter-request-list".DHCP Option "root-path". .array of ip-address . A) . .array of ip-address .32-bit unsigned integer . .text . .string .DHCP Option "dhcp-server-identifier". .DHCP Option "slp-directory-agent".text . .array of ip-address .array of ip-address . .32-bit unsigned integer . . . .ip-address .DHCP Option "streettalk-server".DHCP Option "nisplus-domain".DHCP Option "streettalk-directory-assistance-server".DHCP Option "mobile-ip-home-agent". .DHCP Option "swap-server".DHCP Option "ien116-name-servers".DHCP Option "netbios-dd-server".DHCP Option "tcp-keepalive-garbage".DHCP Option integer(1. .boolean .array of ip-address .array of ip-address .boolean .boolean | array of ip. .DHCP Option "vendor-class-identifier".8-bit unsigned integer .DHCP Option "all-subnets-local". .DHCP Option "finger-server".DHCP Option "nisplus-servers".DHCP Option templates) "perform-mask-discovery". .DHCP Option "cookie-servers". .8-bit unsigned integer . . . . .DHCP Option "option-80". .DHCP Option "dhcp-renewal-time".DHCP Option "impress-servers". .32-bit signed integer . . .boolean | text . . .array of ip-address .Infoblox API Documentation Include the specified parameter to set the attribute value.DHCP Option "tftp-server-name".DHCP Option "dhcp-requested-address".DHCP Option "nis-domain".array of 8-bit unsigned .DHCP Option "static-routes".array of ip-address .array of ip-address .DHCP Option "host-name".string Page 234 (Rev. .2.boolean .array of ip-address .text .16-bit unsigned integer .DHCP Option "x-display-manager". . . .array of ip-address .DHCP Option "dhcp-option-overload". .DHCP Option address "slp-service-scope".text .DHCP Option "policy-filter".array of ip-address . .DHCP Option "fqdn".string .8-bit unsigned integer . . .DHCP Option "time-offset". .DHCP Option "path-mtu-aging-timeout". .DHCP Option "default-tcp-ttl". .DHCP Option "pop-server".DHCP Option NIOS 5.string .DHCP Option "dhcp-max-message-size".

custom defined . "option-138".DHCP Option 130 .DHCP Option 147 .custom defined Page 235 (Rev.string .custom defined .custom defined . "nds-servers". "option-88".custom defined .DHCP Option 119 .DHCP Option 148 .custom defined .DHCP Option 111 . "nds-context".DHCP Option 139 .custom defined .DHCP Option 141 . "option-175". "option-156". "option-154".DHCP Option 163 . "option-150". "option-152". "option-151". "option-176".custom defined .DHCP Option 134 .custom defined .DHCP Option 155 . "option-172". "option-109".custom defined . "option-147".DHCP Option 140 . NIOS 5.custom defined .DHCP Option 95 .DHCP Option 94 .custom defined .custom defined . "option-123".DHCP Option 88 . "option-94". "option-104".custom defined . "option-136". "option-141".custom defined .DHCP Option 83 . "option-108". "option-155".DHCP Option 107 .custom defined .DHCP Option 97 .custom defined . "option-133". "option-83".custom defined .custom defined .DHCP Option 92 . "vivco". "option-178". "option-146".custom defined .DHCP Option 133 .text . "option-167".custom defined .string .DHCP Option 173 . "option-107".DHCP Option 116 . "option-111". "associated-ip".DHCP Option 169 .DHCP Option 167 .DHCP Option 171 .custom defined .DHCP Option 113 .custom defined .DHCP Option 150 .DHCP Option 159 .DHCP Option 178 . "option-157". "option-163".DHCP Option 172 . "option-84". "vivso".DHCP Option 121 .DHCP Option 101 .DHCP Option 162 . "option-158".DHCP Option 112 .custom defined . "bcms-controller-address". "option-165".custom defined .DHCP Option 103 .custom defined .text . "option-160".DHCP Option 151 .DHCP Option 86 .custom defined .custom defined . "option-142".DHCP Option 104 .DHCP Option 143 . "option-117". "option-95". "client-last-transaction-time".DHCP Option 138 .DHCP Option 117 . "option-137".custom defined .DHCP Option 165 . "option-140". "option-174". "option-153".custom defined .DHCP Option 102 .custom defined .DHCP Option 87 .string .string .DHCP Option 118 .custom defined .DHCP Option 149 .custom defined .DHCP Option 85 . "option-116". "option-145". "option-121".custom defined .custom defined . "option-139".DHCP Option 146 .custom defined .custom defined . "option-171".custom defined . "nds-tree-name".DHCP Option 137 . "option-144".DHCP Option 157 . "subnet-selection". "option-128".DHCP Option 168 .array of ip-address . "option-143".DHCP Option 120 . "option-100". "option-106".DHCP Option 135 .custom defined . "option-131".custom defined .string . "uap-servers".custom defined .DHCP Option 96 . "option-102". "netinfo-server-tag".DHCP Option 145 . A) . "option-101".custom defined . "option-132".custom defined .array of ip-address . "option-90".DHCP Option 176 .custom defined .custom defined .DHCP Option 109 .DHCP Option 129 .custom defined . "default-url".DHCP Option 161 .custom defined . "option-148". "option-93".custom defined . "option-149".DHCP Option 160 .DHCP Option 82 . "option-166".DHCP Option 106 .custom defined .DHCP Option 98 .DHCP Option 175 .DHCP Option 174 .DHCP Option 93 .custom defined .DHCP Option 156 . "option-169".DHCP Option 166 .DHCP Option 90 .array of ip-address . "option-115".custom defined . "option-103".DHCP Option 177 .1r4 . "option-168".custom defined .custom defined .custom defined .DHCP Option 127 . "option-170".DHCP Option 122 .custom defined .DHCP Option 132 .custom defined . "option-162". "domain-search".domain-list .text .custom defined .custom defined . "option-99".custom defined . "option-159".DHCP Option 89 .custom defined .custom defined .DHCP Option 144 . "option-127".DHCP Option 84 .DHCP Option 152 .custom defined . "option-122". "option-97".string .DHCP Option 115 .custom defined . "netinfo-server-address".DHCP Option 99 .DHCP Option 142 .custom defined .DHCP Option 153 .DHCP Option 170 .custom defined .custom defined .custom defined .custom defined .DHCP Option 125 .custom defined .array of ip-address .DHCP Option 105 .custom defined . "option-129".DHCP Option 124 .DHCP Option 131 . "option-134". "option-173".DHCP Option 114 .DHCP Option 164 .DHCP Option 91 . "option-177". "option-120".DHCP Option 158 .custom defined . "option-105".DHCP Option 108 .custom defined .DHCP Option 154 .DHCP Option 100 .DHCP Option 126 . "option-135".custom defined .custom defined .custom defined . "option-164".32-bit unsigned integer . "option-96".custom defined .custom defined .DHCP Option 110 .custom defined . "option-161".custom defined .custom defined . "option-130".custom defined .custom defined .Infoblox API Documentation "relay-agent-information".DHCP Option 136 .DHCP Option 123 . "option-126". "option-110".DHCP Option 128 .

"option-253".1r4 Page 236 (Rev. "option-206". "option-183". "option-191". "option-231". "option-235". "option-203". "option-239". "option-236". "option-226". "option-220". "option-208". "option-184". Returns - DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP DHCP Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option Option 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 - custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom custom defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined defined If you specified a parameter. "option-210". and returns false when the operation fails. "option-193". the method returns the attribute value. "option-240". A) . "option-190". "option-197". num( ) Use this method to set or retrieve the numeric value of the DHCP option. "option-242". "option-189". "option-230". "option-205". "option-229". "option-201". "option-254". "option-180". #Modify name $option->name("host-name"). "option-249". "option-218". "option-225". "option-224". "option-234". "option-227". "option-251". "option-204". "option-237". "option-181". "option-186". "option-215". "option-213". "option-247". Example #Get name my $name = $option->name(). "option-214". "option-195". "option-182". "option-243". "option-222". "option-250". "option-192". "option-199". "option-198". "option-252". "option-245". "option-216". "option-185". "option-196". "option-212". "option-209". "option-219". "option-233". "option-200". "option-202". "option-228". "option-187". "option-207". "option-188". "option-194". "option-217". the method returns true when the modification succeeds. "option-244". "option-248".Infoblox API Documentation "option-179". "option-246". "option-232". "option-211". "option-221". NIOS 5. "option-238". If you did not specify a parameter. "option-223". "option-241".

. each separated by . Valid values are "boolean" "ip-address" in dotted decimal notation. . An IPv4 address is a 32-bit number It consists of four 8-bit groups of decimal digits separated by decimal points (example: "192. 10. .Specify a numeric value between -2147483648 and 2147483647.2. A) . Returns .168.2.Specify a list of 16-bit signed integers.Specify a list of 8-bit signed integers.Specify a numeric value between 0 and 255. Add a space between each If you specified a parameter. .Specify "true" or "false" for boolean values.Specify a list of 32-bit unsigned integers.13. If you did not specify a parameter. If you did not specify a parameter.Specify a list of 8-bit unsigned integers.168. . and returns false when the operation fails.1. . each separated by .Specify a value in ASCII text string or a list of hexadecimal characters (0-9. NIOS 5. the method returns the attribute value. . Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. value( ) Use this method to set or retrieve the custom value of the DHCP option. #Modify num $option->num("12").Specify a list of domain names.Specify a list of 32-bit signed integers. "8-bit signed integer" "array of 8-bit signed integer" comma.1. each separated by . Example #Get num my $num = $option->num(). each separated .Specify a numeric value between -128 and 127. "16-bit unsigned integer" "array of 16-bit unsigned integer" by a comma. . . "32-bit signed integer" "array of 32-bit signed integer" a comma.1") . (example: "192. Parameter Specify the number of the DHCP option. each separated by a . "text" "8-bit unsigned integer" "array of 8-bit unsigned integer" a comma. Omit the parameter to retrieve the attribute value. the method returns the attribute value. "16-bit signed integer" "array of 16-bit signed integer" a comma.Specify a numeric value between -32768 and 32767.Specify a numeric value between 0 and 65535. It must be an integer ranging from 1 to 254. and returns false when the operation fails. the method returns true when the modification succeeds.Specify a numeric value between 0 and 4294967295.1r4 Page 237 (Rev. Include the specified parameter to set the attribute value.3.11.Infoblox API Documentation Include the specified parameter to set the attribute value.Specify a list of 16-bit unsigned integers. "domain-list" name.Specify an IPv4 address. the method returns true when the modification succeeds.Specify a value in ASCII text string. each separated by a comma. "32-bit unsigned integer" "array of 32-bit unsigned integer" by a comma.12. "array of ip-address" "string" spaces and separated by colons. Parameter Specify the data type of the DHCP option. or A-F) without . a-f. each separated .2").Specify a list of IPv4 addresses. 79.

Include the specified parameter to set the attribute value. unless ($session) { die("Construct session failed: ". the method returns true when the modification succeeds. value => "255. Returns If you specified a parameter. num => "1". #appliance user login password => "infoblox" #appliance password ).0". #Modify value $option->value("abc.1. A) . #Get the Grid DHCP object and add a DHCP option to it #Get the Grid DHCP object my @retrieved_objs = $session->get( object => "Infoblox::Grid::DHCP". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP Option object such as add. vendor_class => "DHCP" ). Infoblox::status_detail()). unless($dhcp_option) { die("Construct DHCP option object failed: ". Infoblox::status_code() . and returns false when the operation fails. #Create a DHCP Option object my $dhcp_option = Infoblox::DHCP::Option->new( name => "subnet-mask". NIOS 5. #Modify vendor_class $option->vendor_class("DHCP").2". unless ($object) { die("Get Grid DHCP object failed: ". Infoblox::status_code() . #Preparation prior to a DHCP Option object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. and remove. the method returns the attribute value. modify.168.0. this sample includes error handling for the operations. If you did not specify a parameter.com"). Infoblox::status_detail()).0. grid => "Infoblox" ). } print "DHCP option object created successfully\n". my $object = $retrieved_objs[0].Infoblox API Documentation Example #Get value my $value = $option->value(). } print "Session created successfully\n". Also. use Infoblox. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. #appliance host ip username => "admin". Example #Get vendor_class my $name = $option->vendor_class(). Omit the parameter to retrieve the attribute value. The default option space name is "DHCP". ":" . vendor_class( ) Use this method to set an option space name as the vendor class value of a DHCP option or to retrieve an option space name. ":" .1r4 Page 238 (Rev. Parameter Specify the defined option space name in string format.

A) . #Modifying the number of the DHCP option object. Infoblox::Grid::Member::DHCP. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. Infoblox::Session->modify(). http://www. #Update Grid DHCP object through the Infoblox session. Infoblox::DHCP::Filter::Option COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.com"). Infoblox::DHCP::Network. $object->options([$dhcp_option]). Infoblox::DHCP::SharedNetwork. print "Grid DHCP object with modified DHCP option updated to Infoblox appliance successfully\n". ":" .Infoblox::Grid::DHCP. $dhcp_option->name("host-name"). $dhcp_option->num("12"). $session->status_detail()). #Apply the changes to the Grid DHCP object $object->options([$dhcp_option]). Infoblox::Session->get().infoblox.1r4 Page 239 (Rev. $session->status_detail()). $session->status_code() . print "Grid DCHP object with DHCP option updated to Infoblox appliance successfully\n". #Modify DHCP option #Modify an existing option object #Modifying the name of the DHCP option object. Infoblox::DHCP::RangeTemplate. Infoblox::DHCP::NetworkTemplate. ":" . #Remove DHCP option #Apply changes to the Grid DHCP object. $dhcp_option->value("infoblox. $session->modify($object) or die("modify Grid DHCP object failed: ". Infoblox::DHCP::FixedAddr. $session->status_detail()). ":" . #Modifying the value of the DHCP option object. } print "Get Grid DHCP object found at least 1 matching entry\n".Infoblox API Documentation $session->status_code() . #Update Grid DHCP object through the Infoblox session. $session->status_code() . #Apply changes to the Grid DHCP object. $object->options([]). $session->status_code() . Infoblox::DHCP::Range.com/ SEE ALSO Infoblox::Session. Infoblox::DHCP::FixedAddrTemplate. ":" . $session->modify($object) or die("modify Grid DHCP object failed: ". NIOS 5. $session->status_detail()). print "Removed DHCP option from Grid DHCP object successfully\n". #Apply the changes $session->modify($object) or die("Modify Grid DHCP object failed: ".

NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::Grid::DHCP->option60_match_rules( ) Infoblox::Grid::Member::DHCP->option60_match_rules( ) METHODS match_value( ) option_space( ) is_substring( ) substring_offset( ) substring_length( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Option60MatchRule . #Optional / Default is undefined substring_length => $num #Optional / Default is undefined ). See Infoblox::Grid::DHCP->option60_match_rules() for parameters and return values. DESCRIPTION An Option60MatchRule object allows specifying match rules for Option 60 globally. CONSTRUCTOR my $option60_match_rule = Infoblox::DHCP::Option60MatchRule->new( match_value => $string. "substring_length" => "14" ). #Optional / Default is undefined substring_offset => $num. Example #Construct a DHCP Option60MatchRule object my $option60_match_rule = Infoblox::DHCP::Option60MatchRule->new( "option_space" => "infospace". See Infoblox::Grid::Member::DHCP->option60_match_rules() for parameters and return values. "match_value" => "Nortel-i2004-A". #Required is_substring => "true" | "false".1r4 Page 240 (Rev. Infoblox::Grid::DHCP->option60_match_rules( ) Use this function to specify match rule for option60 at grid level. "is_substring" => "true". MODULE METHODS The following functions are available to be applied to a DHCP Option60MatchRule object.DHCP Option60MatchRule object. # Configure DHCP Option60MatchRule on the Grid DHCP object my $response = $grid_dhcp->option60_match_rules([$option60_match_rule]).Infoblox API Documentation Infoblox::DHCP::Option60MatchRule .DHCP Option60MatchRule object. Infoblox::Grid::Member::DHCP->option60_match_rules( ) Use this function to specify match rule for option60 at member level. A) . #Required option_space => $string. Example #Construct a DHCP Option60MatchRule object my $option60_match_rule = Infoblox::DHCP::Option60MatchRule->new( NIOS 5. "substring_offset" => "8".

match_value( ) Use this method to set or retrieve the match value of a DHCP Option60MatchRule object. Parameter Desired match value in string format. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. the method returns the attribute value. The default value for this field is undefined. NIOS 5. Omit the parameter to retrieve the attribute value. Example # Get match_value my $match_value = $option60_match_rule->match_value(). Omit the parameter to retrieve the attribute value. Parameter Valid value is an string that contains defined Infoblox::DHCP::OptionSpace object. Parameter Specify "true" to set the is_substring flag or "false" to deactivate/unset it. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. "match_value" => "Nortel-i2004-A". "is_substring" => "true". is_substring( ) Use this method to set or retrieve the is_substring flag of a DHCP Option60MatchRule object. option_space( ) Use this method to set or retrieve the option space of a DHCP Option60MatchRule object. If you did not specify a parameter.Infoblox API Documentation "option_space" => "infospace". and returns false when the operation fails. Returns If you specified a parameter. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value.1r4 Page 241 (Rev. the method returns true when the modification succeeds. Example # Get option_space my $match_value = $option60_match_rule->option_space(). If you did not specify a parameter. # Modify option_space $option60_match_rule->option_space("new_option"). the method returns the attribute value. "substring_offset" => "10". the method returns the attribute value. A) . the method returns true when the modification succeeds. # Configure DHCP Option60MatchRule on the Grid Member DHCP object my $response = $grid_member_dhcp->option60_match_rules([$option60_match_rule]). and returns false when the operation fails. # Modify match_value $option60_match_rule->match_value("SUNW"). If you did not specify a parameter. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP Option60MatchRule object. See Infoblox::DHCP::OptionSpace for parameters and return values. Returns If you specified a parameter. and returns false when the operation fails. "substring_length" => "24" ).

unless ($session) { die("Construct session failed: ".168. and remove. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. Parameter The substring_length for the DHCP Option60MatchRule object (range from 0 to 65535). #Preparation prior to a DHCP Option60MatchRule insertion #PROGRAM STARTS: Include all the modules that will be used use strict.2". Parameter The substring_offset for the DHCP Option60MatchRule object (range from 0 to 65535). The default value is undefined. this sample includes error handling for the operations. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. and returns false when the operation fails. the method returns true when the modification succeeds. Returns If you specified a parameter. A) . Infoblox::status_code() . Infoblox::status_detail()). If you did not specify a parameter. # Modify substring_offset $option60_match_rule->substring_offset("10"). Omit the parameter to retrieve the attribute value. ":" . # Modify is_substring $option60_match_rule->is_substring("true"). Example # Get substring_length my $substring_length = $option60_match_rule->substring_length(). the method returns the attribute value. substring_length( ) Use this method to set or retrieve the substring_length of a DHCP Option60MatchRule object. } print "Session created successfully\n". use Infoblox. Omit the parameter to retrieve the attribute value. NIOS 5. Also. Example # Get substring_offset my $substring_offset = $option60_match_rule->substring_offset(). # Modify substring_length $option60_match_rule->substring_length("23"). Include the specified parameter to set the attribute value. username => "admin". and returns false when the operation fails. Returns If you specified a parameter. The default value is undefined. If you did not specify a parameter. the method returns the attribute value.1. password => "infoblox" ). substring_offset( ) Use this method to set or retrieve the substring_offset of a DHCP Option60MatchRule object.1r4 Page 242 (Rev.Infoblox API Documentation Example # Get is_substring my $is_substring = $option60_match_rule->is_substring(). the method returns true when the modification succeeds. Include the specified parameter to set the attribute value.

Infoblox API Documentation

my $option_space1 = Infoblox::DHCP::OptionSpace->new( "name" => "infospace" ); my $response = $session->add( $option_space1); print "Add option space operation success \n" if ($response ); print "Add option space operation failed \n" if ( not $response ); #Create a DHCP OptionDefinition object.> my $option60_match_rule = Infoblox::DHCP::Option60MatchRule->new( "option_space" => "infospace", "match_value" => "Nortel-i2004-A", "is_substring" => "true", "substring_offset" => "0", "substring_length" => "14" ); unless ($option60_match_rule) { die("Construct DHCP Option60MatchRule failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } #Get on Grid DHCP object to add Option60MatchRule object> my @result = $session->get( object => "Infoblox::Grid::DHCP", grid => "Infoblox" ) or die("get DHCP failed: ", $session->status_code(). ":" .$session->status_detail()); print "get grid DHCP Objcet successful.\n"; unless (scalar(@result) == 0) { my $griddhcp = $result[0]; if ($griddhcp) { $griddhcp->option60_match_rules([$option60_match_rule]); #Applying the changes to appliance through session. $session->modify($griddhcp) or die("Modify DHCP failed: ", $session->status_code(). ":" .$session->status_detail()); print"Modified Grid DHCP Object successfully.\n"; } } else { print "No Grid DHCP object found."; } #To remove Option60MatchRule object in Grid DHCP object> my @result = $session->get( object => "Infoblox::Grid::DHCP", grid => "Infoblox" ) or die("get DHCP failed: ", $session->status_code(). ":" .$session->status_detail()); print "get grid DHCP Objcet successful.\n"; unless (scalar(@result) == 0) { my $griddhcp = $result[0]; if ($griddhcp) { $griddhcp->option60_match_rules(undef); #Applying the changes to appliance through session. $session->modify($griddhcp) or die("Modify DHCP failed: ", $session->status_code(). ":" .$session->status_detail()); print"Modified Grid DHCP Object successfully to remove Option60MatchRule object.\n"; } } else { print "No Grid DHCP object found."; } #Get OptionSpace object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::OptionSpace", name => "infospace" ); my $object = $retrieved_objs[0]; unless $object
NIOS 5.1r4 Page 243 (Rev. A)

Infoblox API Documentation

( ) { die("Get OptionSpace object failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get OptionSpace object found at least 1 matching entry\n"; #Submit the object for removal $session->remove($object) or die("Remove OptionSpace object failed: ", $session->status_code() . ":" . $session->status_detail()); print "OptionSpace object removed successfully \n"; ####PROGRAM ENDS####

AUTHOR
Infoblox Inc. http://www.infoblox.com/

SEE ALSO
Infoblox::Session,Infoblox::Grid::DHCP, Infoblox::Grid::Member::DHCP,Infoblox::DHCP::OptionSpace, Infoblox::Session->get(), Infoblox::Session->add(), Infoblox::Session->remove(), Infoblox::Session->modify()

COPYRIGHT
Copyright (c) 1999-2010 Infoblox Inc.

NIOS 5.1r4

Page 244 (Rev. A)

Infoblox API Documentation

Infoblox::DHCP::OptionDefinition - DHCP option definition object
NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->search( ) Infoblox::Session->remove( ) METHODS name( ) code( ) space( ) type( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT

NAME
Infoblox::DHCP::OptionDefinition - DHCP option definition object

DESCRIPTION
An OptionDefinition defines a DHCP option within a specific option space. A custom option can be defined in the predefined DHCP option space or in the user-defined vendor option space. To define an option, add the option definition to the required option space.

CONSTRUCTOR
my $option_definition1 = Infoblox::DHCP::OptionDefinition->new( name => $string, #Required code => $num, #Optional / Default is 1 space => $string, #Optional / Default is DHCP type => $string, #Optional / Default is string );

SESSION METHODS
This section describes all the methods in an Infoblox::Session module that can be applied to a DHCP option definition object.

Infoblox::Session->add( )
Use this method to add a option definition object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values. Example

#Create a DHCP OptionDefinition object. my $option_definition1 = Infoblox::DHCP::OptionDefinition->new( space => "SUNW", name => "JumpStart-server", code => "6", type => "text" ); # Submit for adding my $response = $session->add( $option_definition1 );

Infoblox::Session->get( )
Use this method to retrieve all the matching DHCP option definition objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values. Key References

Apply the following attributes to get a specific DHCP option definition object:

NIOS 5.1r4

Page 245 (Rev. A)

Infoblox API Documentation

name - A name for the option definition in string format (regular expression). code - Option number. Either a name or code is required. space- Optional. The option space in which the option is defined. The default is the DHCP option space.
Example

#Getting option by name my @result_array = $session->get( object => "Infoblox::DHCP::OptionDefinition", space => "SUNW", name => "JumpStart-server", ); #Getting option by code my @result_array = $session->get( object => "Infoblox::DHCP::OptionDefinition", space => "DHCP", code => 176, );

Infoblox::Session->modify( )
Use this method to modify a DHCP option definition object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values. Example

#Use method to modify code $object->code(20); # Submit modification my $response = $session->modify($object);

Infoblox::Session->search( )
Use this method to retrieve all the matching DHCP option definition objects from the Infoblox appliance. See Infoblox::Session>search() for parameters and return values. Key References

Apply the following attributes to get a specific DHCP option definition object: name - A name for the option definition in string format (regular expression). code - Option number. Either a name or code is required. space- Optional. The option space in which the option is defined. The default is the DHCP option space.
Example

#Getting option by name my @result_array = $session->search( object => "Infoblox::DHCP::OptionDefinition", space => "SUNW", name => "JumpStart-server", ); #Getting option by code my @result_array = $session->search( object => "Infoblox::DHCP::OptionDefinition", space => "DHCP", code => 176, );

Infoblox::Session->remove( )
Use this method to remove a DHCP option definition object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values. To remove a specifc object, first use get() to retrieve the specific object, and then submit this object for removal. Example

my

@result_array = $session->get( object => "Infoblox::DHCP::OptionDefinition", space => "SUNW", name => "JumpStart-server", );
Page 246 (Rev. A)

NIOS 5.1r4

Infoblox API Documentation

# find the desired object from retrieved list. my $desired_obj = $result_array[0]; # Submit for removal my $response = $session->remove($desired_obj);

METHODS
This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP option definition object.

name( )
Use this method to set or retrieve the name of a DHCP option definition object. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter Desired name in string format with a maximum of 256 bytes. Returns If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

# Get name my $option_definitionname = $option_definition1 ->name(); # Modify name $option_definition1 ->name("Start-server");

code( )
Use this method to set or retrieve the code of a DHCP option definition object. An option code number is used to identify the DHCP option. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter Number for the option code. Value must be between 1 and 254. Values 1-79, 81-82, 85-87, 89, 91-92, 98, 112-114, 118-119, 124-125 are predefined. These option codes have corresponding predefined Types. Therefore, you cannot change the predefined Types. Returns If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

# Get code my $option_definitionname = $option_definition1 ->code(); # Modify code $option_definition1 ->code(14);

space( )
Use this method to set or retrieve the space of a DHCP option definition object. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter Specify the space name in string format. Returns If you did not specify a parameter, the method returns the attribute value. Example

# Get space my $option_space = $option_definition1 ->space();
NIOS 5.1r4 Page 247 (Rev. A)

Infoblox API Documentation

# Modify space $option_definition1 ->space("SUNW");

type( )
Use this method to set or retrieve the data type of the grid DHCP option. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter The accepted types are the following:

"boolean" "ip-address" decimal notation.

- For "true" or "false" boolean values. - For a single IPv4 address. An IPv4 address is a 32-bit number in dotted It consists of four 8-bit groups of decimal digits separated by decimal points (example: "192.168.1.2").

"array of ip-address" "string" separated by colons. "text" "domain-name" "domain-list" "8-bit unsigned integer"

- For a list of IPv4 addresses, each separated by a comma. (example: "192.168.1.2, 10.11.12.13, 79.2.3.1") - For value in ASCII text string or a list of hexadecimal characters (0-9, a-f, or A-F) without spaces and - For value in ASCII text string. - For domain name in ASCII text format - For a list of domain names, each separated by a comma. - For numeric value between 0 and 255.

"16-bit unsigned integer" - For numeric value between 0 and 65535. "32-bit unsigned integer" - For numeric value between 0 and 4294967295. "8-bit signed integer" "16-bit signed integer" "32-bit signed integer" - For numeric value between -128 and 127. - For numeric value between -32768 and 32767. - For numeric value between -2147483648 and 2147483647. - For a list of numeric values between 0 and 255, each

"array of 8-bit unsigned integer" separated by a comma.

"array of 16-bit unsigned integer" - For a list of numeric values between 0 and 65535, each separated by a comma. "array of 32-bit unsigned integer" - For a list of numeric values between 0 and 4294967295, each separated by a comma. "array of 8-bit integer" separated by a comma. "array of 16-bit integer" separated by a comma. - For a list of numeric values between -128 and 127, each - For a list of numeric values between -32768 and 32767, each

"array of 32-bit integer" - For a list of numeric values between -2147483648 and 2147483647, each separated by a comma.
Returns If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

# Get type my $option_definitiontype = $option_definition1 ->type(); # Modify type $option_definition1 ->type("string");

SAMPLE CODE
The following sample code demonstrates the different functions that can be applied to an object such as add, modify, and remove. Also, this sample includes error handling for the operations. #Preparation prior to a DHCP Network insertion

#PROGRAM STARTS: Include all the modules that will be used

NIOS 5.1r4

Page 248 (Rev. A)

Infoblox API Documentation

use strict; use Infoblox; #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192.168.1.2", username => "admin", password => "infoblox" ); unless ($session) { die("Construct session failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Session created successfully\n"; my $option_space1 = Infoblox::DHCP::OptionSpace->new( "name" => "SUNW" ); my $response = $session->add( $option_space1); print "Add option space operation success \n" if ($response ); print "Add option space operation failed \n" if ( not $response );
#Create a DHCP OptionDefinition object.

my $option_definition1 = Infoblox::DHCP::OptionDefinition->new( space => "SUNW", name => "JumpStart-server", code => "6", type => "text" ); unless ($option_definition1) { die("Construct DHCP OptionDefinition failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "DHCP OptionDefinition object created successfully\n"; #Add the DHCP OptionDefinition object to Infoblox appliance through a session my $response = $session->add( $option_definition1 ) or die("Add a DHCP OptionDefinition object failed: ", $session->status_code() . ":" . $session->status_detail()); print "Add a DHCP OptionDefinition object successfully\n";

#Get and modify a DHCP OptionDefinition object attribute

#Get Network through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::OptionDefinition", space => "SUNW", name => "JumpStart-server", ); my $object = $retrieved_objs[0]; unless ($object) { die("Get DHCP OptionDefinition object failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get DHCP OptionDefinition object found at least 1 matching entry\n"; #Modify one of the attributes of the specified Network attribute $object->code(20); #Apply the changes

$session->modify($object) or die("Modify DHCP OptionDefinition attribute failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP OptionDefinition object modified successfully \n";
#Remove a DHCP OptionDefinition Object

#Get DHCP OptionDefinition object through the session my @retrieved_objs = $session->get( object =>"Infoblox::DHCP::OptionDefinition", space => "SUNW",

NIOS 5.1r4

Page 249 (Rev. A)

Infoblox API Documentation

name );

=> "JumpStart-server",

my $object = $retrieved_objs[0]; unless ($object) { die("Get DHCP OptionDefinition object failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get DHCP OptionDefinition object found at least 1 matching entry\n";
#Submit the object for removal

$session->remove($object) or die("Remove Network failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP OptionDefinition removed successfully \n"; #Remove option space. my $response = $session->remove( object => "Infoblox::DHCP::OptionSpace" , name => "SUNW", ); print "Remove option space success \n" if ($response ); print "Remove option space failed \n" if ( not $response ); ####PROGRAM ENDS####

AUTHOR
Infoblox Inc. http://www.infoblox.com/

SEE ALSO
Infoblox::Session, Infoblox::DHCP::OptionSpace, Infoblox::DHCP::Option, Infoblox::Session->get(), Infoblox::Session->add(), Infoblox::Session->remove(), Infoblox::Session->modify()

COPYRIGHT
Copyright (c) 1999-2010 Infoblox Inc.

NIOS 5.1r4

Page 250 (Rev. A)

Infoblox API Documentation

Infoblox::DHCP::OptionSpace - DHCP OptionSpace object.
NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS name( ) comment( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT

NAME
Infoblox::DHCP::OptionSpace - DHCP OptionSpace object.

DESCRIPTION
An Option Space defines a namespace in which vendor options can be defined. To define a specific vendor option space, add an option space to DHCP.

CONSTRUCTOR
my $option_space = Infoblox::DHCP::OptionSpace->new( name => $string, #Required comment => $string, #Optional, default is undefined );

SESSION METHODS
This section describes all the methods in Infoblox::Session module that can be applied to a DHCP OptionSpace object.

Infoblox::Session->add( )
Use this method to add a DHCP OptionSpace object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values. Example

#Construct a DHCP OptionSpace object my $option_space = Infoblox::DHCP::OptionSpace->new( name => "infospace", comment => "some comment" ); #Submit for addition my $response = $session->add($option_space)

Infoblox::Session->get( )
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values. Key References

Apply the following attributes to get a specific DHCP OptionSpace object: name comment
Example

- Required. Option space name in string format. - Optional. Option space comment.

#Get DHCP OptionSpace object through the session my @retrieved_objs = $session->get(
NIOS 5.1r4 Page 251 (Rev. A)

Infoblox API Documentation

object => "Infoblox::DHCP::OptionSpace", name => "infospace", );

Infoblox::Session->modify( )
Use this method to modify a DHCP OptionSpace object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values. Example

#Use method to modify the name. $option_space->name("info_space"); #Submit modification my $response = $session->modify( $option_space );

Infoblox::Session->remove( )
Use this method to remove a DHCP OptionSpace object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values. To remove a specific object, first use get() to retrieve the specific DHCP OptionSpace object, and then submit this object for removal. Example

#Get DHCP OptionSpace object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::OptionSpace", name => "info_space", ); #Find the desired object from the retrieved list. my $desired_option_space = $retrieved_objs[0]; #Submit for removal my $response = $session->remove( $desired_option_space );

Infoblox::Session->search( )
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->search() for parameters and return values. Key References

Apply the following attributes to get a specific DHCP OptionSpace object: name comment
Example

- Optional. Option space name in string format. - Optional. Option space comment (regular expression).

#Get DHCP OptionSpace object through the session my @retrieved_objs = $session->search( object => "Infoblox::DHCP::OptionSpace", comment => ".*comm.*" );

METHODS
This section describes all the methods that can used to set and retrieve the attribute values of a DHCP OptionSpace object.

name( )
Use this method to set or retrieve name of option space object. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter Desired name in string format with a maximum of 256 bytes. Returns If parameter is specified, the method returns true when the modification succeeds, and returns false when the operation fails. If parameter is not specified, the method returns the attribute value. Example

NIOS 5.1r4

Page 252 (Rev. A)

Infoblox API Documentation

#Get name my $name = $option_space->name(); #Modify name $option_space->name("info_space");

comment( )
Use this method to set or retrieve a comment about the option space object. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter Desired comment in string format with a maximum of 256 bytes. Returns If the parameter is specified, the method returns true when the modification succeeds, and returns false when the operation fails. If the parameter is not specified, the method returns the attribute value. Example

#Get comment my $comment = $option_space->comment(); #Modify comment $option_space->comment("my comment");

SAMPLE CODE
The following sample code demonstrates the different functions that can be applied to an OptionSpace object, such as get, add, modify and remove. Also sample includes error handling for the operations. #Preparation prior to a DHCP OptionSpace object insertion

#PROGRAM STARTS: Include all the modules that will be used use strict; use Infoblox; #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192.168.1.2", #appliance host ip username => "admin", #appliance user login password => "infoblox" #appliance password ); unless ($session) { die("Construct session failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Session created successfully\n";
#Create an OptionSpace object

my $option_space = Infoblox::DHCP::OptionSpace->new ( "name" => "infospace" ); unless($option_space) { die("Construct option_space filter failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "OptionSpace object created successfully\n"; #Verify if the DHCP OptionSpace exists in the Infoblox appliance my $object = $session->get( object => "Infoblox::DHCP::OptionSpace", name => "infospace" ); unless ($object) { print "option space does not exist on server, safe to add the option_space\n"; $session->add($option_space) or die("Add option space failed: ", $session->status_code() . ":" . $session->status_detail()); } print "DHCP OptionSpace added successfully\n";
NIOS 5.1r4 Page 253 (Rev. A)

Infoblox API Documentation

#Get and Modify an OptionSpace object

#Get OptionSpace object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::OptionSpace", name => "infospace" ); my $object = $retrieved_objs[0]; unless ($object) { die("Get OptionSpace object failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get OptionSpace object found at least 1 matching entry\n"; #Modify name of the obtained OptionSpace object $object->name("info_space"); #Apply the changes $session->modify($object) or die("Modify OptionSpace object failed: ", $session->status_code() . ":" . $session->status_detail()); print "OptionSpace object modified successfully \n";
#Remove an OptionSpace object

#Get OptionSpace object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::OptionSpace", name => "info_space" ); my $object = $retrieved_objs[0]; unless ($object) { die("Get OptionSpace object failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get OptionSpace object found at least 1 matching entry\n"; #Submit the object for removal $session->remove($object) or die("Remove OptionSpace object failed: ", $session->status_code() . ":" . $session->status_detail()); print "OptionSpace object removed successfully \n"; ####PROGRAM ENDS####

AUTHOR
Infoblox Inc. http://www.infoblox.com/

SEE ALSO
Infoblox::DHCP::OptionDefinition,Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session

COPYRIGHT
Copyright (c) 1999-2010 Infoblox Inc.

NIOS 5.1r4

Page 254 (Rev. A)

Infoblox API Documentation

Infoblox::DHCP::OrderedRanges - Ordered Ranges object.
NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) METHODS network( ) ranges( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT

NAME
Infoblox::DHCP::OrderedRanges - Ordered Ranges object.

DESCRIPTION
An object type to set or retrieve an ordered list of DHCP ranges in a network.

CONSTRUCTOR
my $ordered_ranges = Infoblox::DHCP::OrderedRanges->new( network => $network, ranges => [$range1, $range2, ...], ); #Required #Required

SESSION METHODS
This section describes all the methods in the Infoblox::Session module that you can apply to an Ordered Ranges object.

Infoblox::Session->add( )
Use this method to add an object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values. No object is added in this method, but the ranges for the specified network assume the specified order. Example

#Construct an object my $ordered_ranges = Infoblox::DHCP::OrderedRanges->new( network => $network, ranges ); #Submit for addition my $response = $session->add( $ordered_ranges ); => [$range1, $range2]

Infoblox::Session->get( )
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values. Key References

Apply the following attributes to get a specific Ordered Ranges object: network - Required. An Infoblox::DHCP::Network object.
Examples

my @retrieved_objs = $session->get( object => "Infoblox::DHCP::OrderedRanges", network => $network

NIOS 5.1r4

Page 255 (Rev. A)

Infoblox API Documentation

);

Infoblox::Session->modify( )
Use this method to modify an object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values. No object is modified in this method, but the ranges for the specified network assume the specified order. Example

#Use this method to modify the comment. $ordered_ranges->ranges([$range4, $range2, $range3, $range1]); #Submit modification my $response = $session->modify( $ordered_ranges );

METHODS
Use the following methods to access the attributes of an Infoblox::DHCP::OrderedRanges object. Specify a parameter to set the attribute's value, or omit the parameter to get the attribute's value.

network( )
Use this method to set or retrieve the parent network object. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter An Infoblox::DHCP::Network object. Returns If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

#Getting network my $network = $ordered_ranges->network(); #Modifying network $ordered_ranges->network($nw1);

ranges( )
Use this method to set or retrieve an ordered list of DHCP ranges object references. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter A list of Infoblox::DHCP::Range objects. Returns If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

#Getting ranges my $ranges_ref = $ordered_ranges->ranges(); #Modifying ranges $ordered_ranges->ranges([$range1, $range2, @range3]);

SAMPLE CODE
The following sample code demonstrates the different functions that can be applied to an object, such as add, search, modify, and remove. This sample also includes error handling for the operations. #Preparation prior to the range reordering

#PROGRAM STARTS: Include all the modules that will be used use strict; use Infoblox;

NIOS 5.1r4

Page 256 (Rev. A)

Infoblox API Documentation

#Create a session to the Infoblox appliance my $host_ip = "192.168.1.2"; my $session = Infoblox::Session->new( master => $host_ip, username => "admin", password => "infoblox" ); unless($session){ die("Constructor for session failed: ", Infoblox::status_code(). ":" . Infoblox::status_detail()); } print "Session created successfully.\n"; my $network = Infoblox::DHCP::Network->new( network comment ); => "10.0.0.0/255.255.0.0", => "add network",

$session->add($network) or die("Add network failed: ", $session->status_code(). ":" .$session->status_detail()); print"Network added successfully.\n"; my $range = Infoblox::DHCP::Range->new( start_addr end_addr network comment ); => => => => "10.0.0.1", "10.0.0.10", "10.0.0.0/16", "range 1",

$session->add($range) or die("Add range failed: ", $session->status_code(). ":" .$session->status_detail()); print"Range added successfully.\n"; $range = Infoblox::DHCP::Range->new( start_addr end_addr network comment ); => => => => "10.0.0.21", "10.0.0.30", "10.0.0.0/16", "range 2",

$session->add($range) or die("Add range failed: ", $session->status_code(). ":" .$session->status_detail()); print"Range added successfully.\n"; $range = Infoblox::DHCP::Range->new( start_addr end_addr network comment ); => => => => "10.0.0.31", "10.0.0.40", "10.0.0.0/16", "range 3",

$session->add($range) or die("Add range failed: ", $session->status_code(). ":" .$session->status_detail()); print"Range added successfully.\n";
#Get the current range order.

my $tnetwork = Infoblox::DHCP::Network->new( network ); my $or = $session->get( object => "Infoblox::DHCP::OrderedRanges", network => $tnetwork );

=> "10.0.0.0/255.255.0.0",

unless($or){ die("Get ordered ranges failed: ", $session->status_code() . ":" . $session->status_detail());

NIOS 5.1r4

Page 257 (Rev. A)

Infoblox API Documentation

} print "Get ordered ranges object found at least 1 matching entry\n"; my ($r1, $r2, $r3) = @{$or->ranges()}; print "The current order of the ranges is : " . $r1->comment() . "," . $r2->comment() . "," . $r3->comment() . "\n";
#Modify the range order.

$or->ranges([$r3, $r2, $r1]); #Apply the change $session->modify($or) or die("Modify ordered ranges failed: ", $session->status_code(). ":" .$session->status_detail()); print "Ordered ranges modified successfully.\n"; $or = $session->get( object => "Infoblox::DHCP::OrderedRanges", network => $tnetwork ); unless($or){ die("Get ordered ranges failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get ordered ranges object found at least 1 matching entry\n"; ($r1, $r2, $r3) = @{$or->ranges()}; print "The current order of the ranges is : " . $r1->comment() . "," . $r2->comment() . "," . $r3->comment() . "\n"; ####PROGRAM ENDS####

AUTHOR
Infoblox Inc. http://www.infoblox.com

SEE ALSO
Infoblox::DHCP::Network, Infoblox::DHCP::Range, Infoblox::Session, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify()

COPYRIGHT
Copyright (c) 1999-2010 Infoblox Inc.

NIOS 5.1r4

Page 258 (Rev. A)

Infoblox API Documentation

Infoblox::DHCP::Range - DHCP Range object.
NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS authority( ) always_update_dns( ) bootfile( ) bootserver( ) comment( ) ddns_domainname( ) ddns_generate_hostname( ) deny_all_clients( ) deny_bootp( ) disable( ) email_list( ) enable_ddns( ) enable_dhcp_thresholds( ) enable_email_warnings( ) enable_known_clients_option( ) enable_snmp_warnings( ) enable_unknown_clients_option( ) end_addr( ) exclude( ) extensible_attributes( ) failover_assoc( ) filters( ) known_clients_option( ) lease_scavenge_time( ) name( ) next_available_ip( ) ignore_dhcp_option_list_request( ) member( ) ms_options( ) network( ) network_view( ) nextserver( ) options( ) override_ddns_domainname( ) override_lease_scavenge_time( ) override_update_dns_on_lease_renewal( ) pxe_lease_time( ) range_high_water_mark( ) range_low_water_mark( ) recycle_leases( ) start_addr( ) template( ) unknown_clients_option( ) update_dns_on_lease_renewal( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT

NAME
Infoblox::DHCP::Range - DHCP Range object.

DESCRIPTION
A DHCP range defines the specified range of IP addresses in a network. A DHCP range should be added for a network so the Infoblox appliance can assign IP addresses within that specified range to DHCP clients. If the client is on a network that is assigned a DHCP range, the device distributes an available IP address from that range to the DHCP client, or to a DHCP relay agent if the request came
NIOS 5.1r4 Page 259 (Rev. A)

Infoblox API Documentation

through an agent. The DHCP range should also be assigned with a device. If devices are in a grid, the particular member serving DHCP for the DHCP range must be specified. If the server is an independent device, this device must be specified as the member that serves the DHCP range.

CONSTRUCTOR
my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => $ipv4addr, #Required network => $network, #Optional network_view => $NetworkView, #Optional / Default is system-defined default network view start_addr => $ipv4addr, #Required authority => "true" | "false", #Optional / Default is undefined always_update_dns => "true" | "false", #Optional / Default is "false" bootfile => $filename | undef, #Optional / Default is undefined bootserver => $ipv4addr | $fqdn | undef, #Optional / Default is undefined comment => $string, #Optional / Default is undefined ddns_domainname => $string | undef, #Optional / Default is undefined ddns_generate_hostname => "true" | "false", #Optional / Default is undefined deny_all_clients => "true" | "false", #Optional / Default is "false" deny_bootp => "true" | "false" | undef, #Optional / Default is undefined disable => "true" | "false", #Optional / Default is "false" email_list => [ "admin\@test.com",...] | undef, #Optional / Default is undefined enable_ddns => "true" | "false", #Optional / Default is undefined enable_dhcp_thresholds => "true" | "false", #Optional / Default is "false" enable_email_warnings => "true" | "false", #Optional / Default is "false" enable_known_clients_option => "true" | "false", #Optional / Default is "false" enable_snmp_warnings => "true" | "false", #Optional / Default is "false" enable_unknown_clients_option => "true" | "false", #Optional / Default is "false" exclude => [$ExclusionRange1,$ExclusionRange2,...], #Optional / Default is empty extensible_attributes => { $string => $string | $num, $string => [ $string | $num, ... ], ... } #Optional / Default is undefined failover_assoc => $string, #Optional / Default is undefined filters => [$MAC, $RelayAgent, $Option...], #Optional / Default is empty ignore_dhcp_option_list_request => "true" | "false" | undef, #Optional / Default is undefined #Optional / Default is known_clients_option => "Allow" | "Deny", undefined lease_scavenge_time => $number, #Optional / Default is -1 member => $Member, #Optional / Default is undefined ms_options => [$MSOption1,$MSOption2,...], #Optional / Default is empty name => $string, #Optional / Default is undefined nextserver => $ipv4addr | $fqdn | undef, #Optional / Default is undefined options => [$Option1,$Option2,...], #Optional / Default is empty override_ddns_domainname => "true" | "false", #Optional / Default value is "false" override_lease_scavenge_time => "true" | "false", #Optional / Default value is "false" override_update_dns_on_lease_renewal => "true" | "false", #Optional / Default value is "false" pxe_lease_time => $num, #Optional / Default is undefined range_high_water_mark => $num, #Optional / Default is 0 range_low_water_mark => $num, #Optional / Default is 95 recycle_leases => "true" | "false", #Optional / Default is

NIOS 5.1r4

Page 260 (Rev. A)

Infoblox API Documentation

undefined template undefined unknown_clients_option undefined update_dns_on_lease_renewal value is "false" );

=> $string, => "Allow" | "Deny", => "true" | "false",

#Optional / Default is #Optional / Default is #Optional / Default

SESSION METHODS
This section describes all the methods in an Infoblox::Session module that you can apply to a DHCP range object.

Infoblox::Session->add( )
Use this method to add a DHCP range object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values. Example

#Construct an object my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10.0.0.10", network => "10.0.0.0/8", start_addr => "10.0.0.1", authority => "true", bootfile => "bootfile1.com", bootserver => "someserver.com", comment => "add range", ddns_generate_hostname => "true", deny_all_clients => "true", deny_bootp => "true", disable => "true", enable_ddns => "true", exclude => [$exclusion_range], filters => [$filter], member => $memberdhcp, network => $nview, nextserver => "3.3.3.3", options => [$option1], pxe_lease_time => "3600", recycle_leases => "true", ); # Submit for addition my $response = $session->add( $dhcp_range );

Infoblox::Session->get( )
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values. Key References

Apply the following attributes to get a specific DHCP range object: start_addr - Optional. Starting IP address of DHCP range within the network. network_view - Optional. Network view in which the DHCP range is located. By default, all network views are searched. extensible_attributes - Optional. A hash reference containing extensible attributes.
Examples

my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1" ); my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1", network_view => "default" ); my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", extensible_attributes => { 'Site' => 'Santa Clara' });

Infoblox::Session->modify( )
NIOS 5.1r4 Page 261 (Rev. A)

Infoblox API Documentation

Use this method to modify a DHCP range object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values. Example

# Use method to modify the comment. $dhcp_range->comment("this is a modified comment"); # Submit modification my $response = $session->modify( $dhcp_range );

Infoblox::Session->remove( )
Use this method to remove a DHCP range object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values. To remove a specific object, first use get() or search() to retrieve the specific DHCP range object, and then submit this object for removal. Example

# Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1", newtork_view => "default" ); # Find the desired object from the retrieved list. my $desired_dhcp_range = $retrieved_objs[0]; # Submit for removal my $response = $session->remove( $desired_dhcp_range );

Infoblox::Session->search( )
Use this method to search for DHCP range objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values. Key References

Apply the following attributes to search for a DHCP range object: network - Optional. Network in CIDR format (regular expression). network_view - Optional. Network view in which the DHCP range is located. By default, all network views are searched. start_addr - Optional. IPv4 address in dotted decimal notation (regular expression). end_addr - Optional. IPv4 address in dotted decimal notation (regular expression). comment - Optional. Comment in string format (regular expression). extensible_attributes - Optional. A hash reference containing extensible attributes.
Examples

# search for DHCP range object with start address having last octet as 1 my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Range", network => "10.0.0.0/.", network => "default", start_addr => ".*1", comment => ".*comment" ); # search for DHCP range objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Range", extensible_attributes => { 'Site' => 'Santa Clara' });

METHODS
This section describes all the methods that you can use to configure and retrieve the attribute values of a DHCP range.

authority( )
Use this method to set or retrieve the authority flag of a DHCP range. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Parameter Specify "true" to set the authority flag or "false" to deactivate/unset it. The default value is undefined. Returns

NIOS 5.1r4

Page 262 (Rev. A)

Infoblox API Documentation

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

#Get authority my $authority = $dhcp_range->authority(); #Modify authority $dhcp_range->authority("false");

always_update_dns( )
Use this method to set or retrieve the always_update_dns flag of a DHCP range. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. This flag only applies if the range is associated with a Microsoft (r) server. If it is set to "true", the DHCP server will always update DNS, regardless of the requests from the DHCP clients. If this flag is set to false, clients will be allowed to update DNS when they request it. Parameter Specify "true" to set the always_update_dns flag or "false" to deactivate/unset it. The default value is "false". Returns If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

#Get always_update_dns my $always_update_dns = $dhcp_range->always_update_dns(); #Modify always_update_dns $dhcp_range->always_update_dns("false");

bootfile( )
Use this method to set or retrieve a bootfile name which is the name of the file the client must download. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. This option is overridden independently from Infoblox::DHCP::Range->bootserver() and Infoblox::DHCP::Range->nextserver(). Parameter The boot file name in string format with a maximum of 128 bytes. The default value is undefined. Returns If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. If you did not specify a parameter, the method returns the attribute value. Example

#Get bootfile my $bootfile = $dhcp_range->bootfile(); #Modify bootfile $dhcp_range->bootfile("bootfile2.com"); #Un-override bootfile $dhcp_range->bootfile(undef);

bootserver( )
Use this method to set or retrieve a bootserver name which is the name of the server where the boot file is stored. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. This option is overridden independently from Infoblox::DHCP::Range->bootfile() and Infoblox::DHCP::Range->nextserver(). Parameter The boot server IP address or name in FQDN (Fully Qualified Domain Name) format. The FQDN consists of the host name followed by the domain name (example: abc.com). A boot server name can have a maximum of 256 bytes. The default value is undefined. Returns
NIOS 5.1r4 Page 263 (Rev. A)

Include the specified parameter to set the attribute value. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false". the last operation takes precedence. Enable this method to allow only the DHCP server to generate a hostname. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true".Infoblox API Documentation If you specified a parameter. NIOS 5. If you did not specify a parameter. Example #Get ddns_domainname my $ddns_domainname = $dhcp_range->ddns_domainname(). the method returns true when the modification succeeds. the method returns the attribute value. A) . #Un-override bootserver $dhcp_range->bootserver(undef). #Modify bootserver $dhcp_range->bootserver("anotherserver. ddns_generate_hostname( ) Use this method to set or retrieve the ddns_generate_hostname flag of a DHCP range. Parameter The dynamic DNS domain name in string format. Thus the sequence $object->ddns_domainname("testdomain").1r4 Page 264 (Rev. Returns If you specified a parameter. $object->override_ddns_domainname("false"). the method returns true when the modification succeeds. ddns_domainname( ) Use this method to set or retrieve the ddns_domainname value of a DHCP Range object. Example #Get bootserver my $bootserver = $dhcp_range->bootserver(). Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.com"). The default value is undefined. will set override_ddns_domainname to "false". the method returns the attribute value. #Modify ddns_domainname $dhcp_range->ddns_domainname("test_domain. comment( ) Use this method to set or retrieve a descriptive comment. If you did not specify a parameter. the method returns true when the modification succeeds. Parameter Specify "true" to set the ddns_generate_hostname flag or "false" to deactivate/unset it. and the sequence $object->override_ddns_domainname("false"). Omit the parameter to retrieve the attribute value.com"). #Modify comment $dhcp_range->comment("Modifying the DHCP range comment"). and returns false when the operation fails. will result in override_ddns_domainname="true". $object>ddns_domainname("testdomain"). If you did not specify a parameter. The default value is undefined. Returns If you specified a parameter. and returns false when the operation fails. Parameter Desired comment in string format with a maximum of 256 bytes. Example #Get comment my $comment = $dhcp_range->comment(). Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false". and returns false when the operation fails. Include the specified parameter to set the attribute value.

Include the specified parameter to set the attribute value. #Modify deny_all_clients $dhcp_range->deny_all_clients("false"). Omit the parameter to retrieve the attribute value. #Modify deny_bootp $dhcp_range->deny_bootp("false"). the method returns the attribute value. The default value for this field is false. the method returns true when the modification succeeds. Enable this method to deny all lease requests for the DHCP range. Example #Get deny_bootp my $deny_bootp = $dhcp_range->deny_bootp(). Example #Get deny_all_clients my $deny_all_clients = $dhcp_range->deny_all_clients(). Include the specified parameter to set the attribute value. and returns false when the operation fails.1r4 Page 265 (Rev. the method returns the attribute value. Returns If you specified a parameter. If you did not specify a parameter. deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP range. #Modify ddns_generate_hostname $dhcp_range->ddns_generate_hostname("false"). deny_all_clients( ) Use this method to set or retrieve the deny_all_clients flag of a DHCP range. Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. and returns false when the operation fails. If you did not specify a parameter. NIOS 5. Returns If you specified a parameter. If you did not specify a parameter. the method returns the attribute value. The default value for this field is false. Enable this method to deny all BOOTP requests.Infoblox API Documentation Returns If you specified a parameter. and returns false when the operation fails. A) . the method returns true when the modification succeeds. If you did not specify a parameter. Include the specified parameter to set the attribute value. disable( ) Use this method to set or retrieve the disable flag of a DHCP range. Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. Returns If you specified a parameter. the method returns true when the modification succeeds. and returns false when the operation fails. Example #Get ddns_generate_hostname my $ddns_generate_hostname = $dhcp_range->ddns_generate_hostname(). Parameter Specify "true" to set the deny_all_clients flag or "false" to deactivate/unset it. The default value is false which indicates that this attribute inherit the upper-level setting. the method returns the attribute value. Omit the parameter to retrieve the attribute value.

Example #Get email_list my @email_list = $range->email_list(). If you did not specify a parameter. the method returns the attribute value. the Infoblox appliance generates a syslog message and sends an SNMP trap. If you did not specify a parameter. The default value is undefined.Infoblox API Documentation Example #Get disable my $disable = $dhcp_range->disable(). enable_ddns( ) Use this method to set or retrieve the enable_ddns flag of a DHCP range. A) . Enable this flag to set DHCP threshold values. If you did not specify a parameter. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. Example #Get enable_dhcp_thresholds my $enable_dhcp_thresholds = $range->enable_dhcp_thresholds(). enable_dhcp_thresholds( ) Use this method to set or retrieve DHCP thresholds at the DHCP address range level. Example #Get enable_ddns my $enable_ddns = $dhcp_range->enable_ddns(). If DHCP range usage goes above or below these percentage values. Returns If you specified a parameter. and returns false when the operation fails. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. Enable this method to allow dynamic DNS updates. and returns false when the operation fails. The default value is undefined. the method returns the attribute value. Parameter The valid value is an array reference that contains string objects. Parameter Specify "true" to set the enable_dhcp_thresholds flag or "false" to deactivate/unset it. the method returns the attribute value. if configured. #Modify enable_ddns $dhcp_range->enable_ddns("false").1r4 Page 266 (Rev. #Modify email_list $range->email_list( [ "admin\@test. #Modify disable $dhcp_range->disable("false"). then the appliance sends DHCP threshold alarms to the email addresses. Parameter Specify "true" to set the enable_ddns flag or "false" to deactivate/unset it. If you enter email addresses in the email_list. Returns If you specified a parameter. Returns If you specified a parameter. and returns false when the operation fails. email_list( ) Use this method to set or retrieve the email list to which the appliance sends notifications when DHCP address usage for the grid crosses a threshold. the method returns true when the modification succeeds. NIOS 5. These thresholds are the high and low watermarks.com" ] ).

enable_known_clients_option( ) Use this method to set or retrieve the enable_known_clients_option flag of a DHCP range. Example #Get enable_snmp_warnings my $enable_snmp_warnings = $range->enable_snmp_warnings(). NIOS 5. and returns false when the operation fails. and returns false when the operation fails. Example #Get enable_email_warnings my $enable_email_warnings = $range->enable_email_warnings(). #Modify enable_known_clients_option $dhcp_range->enable_known_clients_option("false"). Enable this flag if you want the appliance to send DHCP threshold warnings to the "email_list" provided. Parameter Specify "true" to set the enable_email_warnings flag or "false" to deactivate/unset it. #Modify enable_snmp_warnings $range->enable_snmp_warnings("false"). If you did not specify a parameter. enable_unknown_clients_option( ) Use this method to set or retrieve the enable_unknown_clients_option flag of a DHCP range. If you did not specify a parameter. Parameter Specify "true" to set the enable_snmp_warnings flag or "false" to deactivate/unset it. enable_email_warnings( ) Use this method to enable the appliance to send email notifications when DHCP address usage crosses a high or low watermark threshold. Returns If you specified a parameter. the method returns true when the modification succeeds. The default value is undefined. Returns If you specified a parameter. You must set the enable_known_clients_option flag to true in order to use the known_clients_option attribute. the method returns the attribute value. the method returns the attribute value. Returns If you specified a parameter. the method returns the attribute value. Example #Get enable_known_clients_option my $enable_known_clients_option = $dhcp_range->enable_known_clients_option(). If the flag is enabled. Include the specified parameter to set the attribute value. and returns false when the operation fails. Parameter Specify "true" to set the enable_known_clients_option flag or "false" to deactivate/unset it.1r4 Page 267 (Rev. #Modify enable_email_warnings $range->enable_email_warnings("false"). If you did not specify a parameter.Infoblox API Documentation #Modify enable_dhcp_thresholds $range->enable_dhcp_thresholds("false"). the method returns true when the modification succeeds. The default value is undefined. Omit the parameter to retrieve the attribute value. The default value is "false". then the appliance sends SNMP traps when DHCP address usage crosses a watermark threshold. A) . the method returns true when the modification succeeds. enable_snmp_warnings( ) Use this method to enable the appliance to send an SNMP trap when DHCP address usage crosses a watermark threshold.

#Modify end_addr $dhcp_range->end_addr("10. An end address is the last IP address in the DHCP range available for the clients. and returns false when the operation fails. Example #Get end_addr my $end_addr = $dhcp_range->end_addr(). end_addr( ) Use this method to set or retrieve the end address of the DHCP range. The default value is "false". the method returns the attribute value. Parameter Specify "true" to set the enable_unknown_clients_option flag or "false" to deactivate/unset it.20"). If you did not specify a parameter. Omit the parameter to retrieve the attribute value. the method returns the attribute value. and returns false when the operation fails. Example #Get exclude my $ref_exclude = $dhcp_range->exclude(). If you did not specify a parameter. exclude( ) Use this method to set or retrieve the exclusion range of IP addresses in the DHCP range which should not be assigned to clients. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds.0. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.2). An IPv4 address is a 32-bit number in dotted decimal notation. Include the specified parameter to set the attribute value. NIOS 5. The default value is empty. A) . Include the specified parameter to set the attribute value.1r4 Page 268 (Rev.1. the method returns true when the modification succeeds. #Modify exclude $dhcp_range->exclude([$exl1]).0. the method returns true when the modification succeeds. #Modify enable_unknown_clients_option $dhcp_range->enable_unknown_clients_option("false"). Example #Get enable_unknown_clients_option my $enable_unknown_clients_option = $dhcp_range->enable_unknown_clients_option(). Parameter Specify the end address of the DHCP range in IPv4 address format. If static addresses in the middle of an DHCP range are assigned to certain hosts. #$exl1 is an Infoblox::DHCP::ExclusionRange object extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP range object Include the specified parameter to set the attribute value.168.Infoblox API Documentation You must set the enable_unknown_clients_option flag to true in order to use the unknown_clients_option attribute. Omit the parameter to retrieve the attribute value. Parameter Valid value is an array reference that contains defined Infoblox::DHCP::ExclusionRange objects. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. If you did not specify a parameter. and returns false when the operation fails. Returns If you specified a parameter. those addresses can be excluded from the DHCP range using this method. Returns If you specified a parameter. the method returns the attribute value. Returns If you specified a parameter.

For a date. failover_assoc( ) Use this method to set or retrieve the failover peer association name of the DHCP range. the value is a string with a maximum of 256 characters. the method returns true when the modification succeeds. Filters are used to screen the address assignments if the addresses in the DHCP range needs to be assigned to specific hosts. Infoblox::DHCP::FilterRule::Option objects. Returns If you specified a parameter. The default value is empty. #Modify failover_assoc $dhcp_range->failover_assoc("peer2").Infoblox API Documentation Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. Example #Get extensible attributes my $ref_extensible_attributes = $dhcp_range->extensible_attributes(). #Modify filters $dhcp_range->filters([$exl1]). If you did not specify a parameter. For a list. the method returns true when the modification succeeds. The default value is undefined. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. Infoblox::DHCP::FilterRule::NAC. Returns If you specified a parameter. Parameter Valid value is an array reference that contains defined Infoblox::DHCP::FilterRule::MAC. filters( ) Use this method to set or retrieve the filters of the DHCP range. Infoblox::DHCP::FilterRule::RelayAgent. URL. Example #Get failover_assoc my $failover_assoc = $dhcp_range->failover_assoc(). Omit the parameter to retrieve the attribute value. Example #Get filters my $ref_filters = $dhcp_range->filters(). Include the specified parameter to set the attribute value. and returns false when the operation fails. #Modify extensible attributes $dhcp_range->extensible_attributes({ 'Site' => 'Santa Clara'. or Infoblox::DHCP::FilterRule::Option object. Infoblox::DHCP::FilterRule::NAC. Parameter Specify the failover peer association name in string format. Use an empty string ('') to remove a failover peer association from the DHCP range. If you did not specify a parameter. For an integer. the method returns the attribute value. #Remove failover_assoc (using undef for removal is deprecated) $dhcp_range->failover_assoc(""). Omit the parameter to retrieve the attribute value. the value is a string with a maximum of 64 characters. Returns If you specified a parameter. the method returns the attribute value. the method returns the attribute value. and string types. Using undef is deprecated and may be changed in the future. the value is the number of seconds that have elapsed since January 1st. A) . The default value is undefined. 'Tom' ] }). and returns false when the operation fails. Infoblox::DHCP::FilterRule::RelayAgent. 'Administrator' => [ 'Peter'. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. If you did not specify a parameter. and returns false when the operation fails. For email. 1970 UTC. #$exl1 is an Infoblox::DHCP::FilterRule::MAC.1r4 Page 269 (Rev. the value is an integer from -2147483648 through 2147483647. known_clients_option( ) NIOS 5.

1r4 Page 270 (Rev. Returns If you specified a parameter. Parameter An integer that specifies the period of time. Thus the sequence $object->lease_scavenge_time(604800). Omit the parameter to retrieve the attribute value. If you did not specify a parameter. Setting this method to a defined value implicitly sets the override_lease_scavenge_time method to "true". will result in override_lease_scavenge_time="true". Parameter The desired name in string format with a maximum of 256 bytes. the method returns true when the modification succeeds. that free and backup leases remain in the database before they are automatically deleted. the method returns true when the modification succeeds. $object>lease_scavenge_time(604800). If you did not specify a parameter. The default value is undefined. Example #Get name my $name = $dhcp_range->name(). will set override_lease_scavenge_time to "false". Include the specified parameter to set the attribute value. Returns If you specified a parameter. The default value is undefined. which means that lease scavenging is disabled. the method returns true when the modification succeeds. NIOS 5. and returns false when the operation fails.Infoblox API Documentation Use this method to set or retrieve the known_clients_option option of a DHCP range. and the sequence $object->override_lease_scavenge_time("false"). #Modify known_clients_option $dhcp_range->known_clients_option("Deny"). the method returns the attribute value. the last operation takes precedence. in seconds. lease_scavenge_time( ) Use this method to set or retrieve the lease_scavenge_time value of a DHCP Range object. Note that when lease_scavenge_time is set to a defined value and override_lease_scavenge_time is set to "false". Returns If you specified a parameter. Set this option to "Allow" or "Deny" to allow or prevent the allocation of an IP address from this pool to any client that has a host declaration. name( ) Use this method to set or retrieve a descriptive name for the range. and returns false when the operation fails. The minimum positive value must be greater than 86400 seconds (1 day). Setting the parameter to undefined causes the appliance to use the default from the upper level and automatically resets the override_lease_scavenge_time attribute to "false". Include the specified parameter to set the attribute value. the method returns the attribute value. Include the specified parameter to set the attribute value. Example #Get known_clients_option my $known_clients_option = $dhcp_range->known_clients_option(). $object->override_lease_scavenge_time("false"). Example #Get lease_scavenge_time my $lease_scavenge = $dhcp_range->lease_scavenge_time(). Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. Parameter Specify "Allow" or "Deny" to set the known_clients_option flag value. A) . If you did not specify a parameter. To disable lease scavenging. set the parameter to -1. #Modify lease_scavenge_time $dhcp_range->lease_scavenge_time(30 * 24 * 60 * 60). the method returns the attribute value. The default value of this parameter is -1.

Example # Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $dhcp_range->ignore_dhcp_option_list_request(). $dhcp_range = $retrieved_objs[0]. the object MUST be retrieved via a get or search call. Returns NIOS 5. # Print the next available IP address in the range print $dhcp_range->next_available_ip() . Parameter The valid value is a defined Infoblox::DHCP::Member or Infoblox::DHCP::MSServer object. next_available_ip( ) Use this method to get the next available IP address in the DHCP range object that was retrieved.) Example # Retrieve a particular range my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range".0. Parameter Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate/unset it. the method returns true when the modification succeeds. This setting overrides the upper-level settings. # Un-override ignore_dhcp_option_list_request $dhcp_range->ignore_dhcp_option_list_request(undef). Include the specified parameter to set the attribute value. Note that to use this method. The default value is empty. If you did not specify a parameter. member( ) Use this method to set or retrieve the member or Microsoft server that serves the DHCP range. Returns If you specified a parameter. start_addr => "10.1r4 Page 271 (Rev. A) . Omit the parameter to retrieve the attribute value.0. ignore_dhcp_option_list_request( ) Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP shared network object. the next available IP address is the first address in this range that matches all of the following rules: * There is no fixed address or host address record matching this IP address * There is no unmanaged record matching this IP address * The IP address is not contained in any excluded range of this DHCP range * There is no active lease matching this IP address (Deleted leases in the recycle bin are not considered. # Modify ignore_dhcp_option_list_request $dhcp_range->ignore_dhcp_option_list_request("true"). The member or Microsoft server that serves DHCP for this IP address range.. Within a DHCP Range object. the method returns the attribute value. Parameter This method does not accept input parameters. The default value is undefined which indicates that this attribute inherit the upper-level setting. and returns false when the operation fails. or have been created first with an add call. Returns This method returns the next available IP address in the range in string format.Infoblox API Documentation #Modify name $dhcp_range->name("external").20" ). Include the specified parameter to set the attribute value. If this flag is set to false all the defined DHCP options will be returned to the client. "\n". Omit the parameter to retrieve the attribute value.

#Modify member $dhcp_range->member($member1). the method returns true when the modification succeeds. Example NIOS 5. Example #Get network my $network = $dhcp_range->network(). Include the specified parameter to set the attribute value. which means the DHCP range is in the default network view. Parameter Valid value is a defined Infoblox::DHCP::View object. Returns If you specified a parameter.0. the method returns the attribute value. #Modify options $dhcp_range->ms_options([$option12]). Example #Get options my $ref_options = $dhcp_range->ms_options(). Omit the parameter to retrieve the attribute value. Returns If you specified a parameter.Infoblox API Documentation If you specified a parameter. If you did not specify a parameter.0. Include the specified parameter to set the attribute value. Parameter The valid value is an array reference that contains defined Infoblox::DHCP::MSOption objects. Note: You can set only options that are included in both the Microsoft server and NIOS predefined option definitions. A) . and returns false when the operation fails. the method returns true when the modification succeeds. If you did not specify a parameter.0/8). network_view( ) Use this method to set or retrieve the network view of the DHCP range. Include the specified parameter to set the attribute value. and returns false when the operation fails.1r4 Page 272 (Rev. The default network view value is the system-defined default network view object. Parameter Specify the address and netmask of network in CIDR format (example: 10. and returns false when the operation fails. the method returns the attribute value. the method returns true when the modification succeeds. #$member is an Infoblox::DHCP::Member object ms_options( ) Use this method to set or retrieve the Microsoft server custom DHCP options that are associated with this DHCP range. If you did not specify a parameter. #$option12 is an Infoblox::DHCP::MSOption object network( ) Use this method to set or retrieve the DHCP network of the address range. Example #Get member my $ref_member = $dhcp_range->member(). and returns false when the operation fails. Options that are not common to both are read only and cannot be modified. If you did not specify a parameter. The default value is the "default" network view. Omit the parameter to retrieve the attribute value. the method returns the attribute value. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. the method returns the attribute value. Returns If you specified a parameter. The default value is empty.

com). Example #Get options my $ref_options = $dhcp_range->options(). #Modify network view. This option is overridden independently from Infoblox::DHCP::Range->bootfile() and Infoblox::DHCP::Range->bootserver(). The override_ddns_domainname attribute can be specified explicitly. DHCP options describe network configuration settings and various services available on the network.Infoblox API Documentation #Get network view my $nview = $dhcp_range->network_view(). #Modify options $dhcp_range->options([$option12]). and returns false when the operation fails. Include the specified parameter to set the attribute value. If you did not specify a parameter. Returns If you specified a parameter. #$option12 is an Infoblox::DHCP::Option object override_ddns_domainname( ) The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP range is used. Omit the parameter to retrieve the attribute value.4.1r4 Page 273 (Rev. Include the specified parameter to set the attribute value. #Un-override nextserver $dhcp_range->nextserver(undef). The default value is undefined. #Modify nextserver $dhcp_range->nextserver("4. instead of the grid default. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Example #Get nextserver my $nextserver = $dhcp_range->nextserver(). It is also set implicitly when ddns_domainname is set to a defined value. Returns If you specified a parameter. nextserver( ) Use this method to set or retrieve the nextserver IP address which is the boot file server where the boot file is stored. Returns NIOS 5. Parameter Valid value is an array reference that contains defined Infoblox::DHCP::Option objects. The default value of this parameter is "false". If you did not specify a parameter. with an Infoblox::DHCP::View object $dhcp_range->network_view($nview).4. A) . Set the parameter to "false" to inherit the grid-level setting for ddns_domainname. the method returns the attribute value. options( ) Use this method to set or retrieve the options of the DHCP range. the method returns the attribute value. A next server name can have a maximum of 256 bytes. the method returns true when the modification succeeds. The FQDN consists of the host name followed by the domain name (example: abc. the method returns true when the modification succeeds. The default value is empty.4"). Omit the parameter to retrieve the attribute value. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. Setting the DHCP options for the DHCP range overrides the options set at the network level. Parameter Set the parameter to "true" to override the grid-level setting for ddns_domainname. Include the specified parameter to set the attribute value.

override_update_dns_on_lease_renewal( ) The override_update_dns_on_lease_renewal attribute controls whether the update_dns_on_lease_renewal value in the DHCP range is used. Set the parameter to "false" to inherit the setting for lease_scavenge_time from the upper level. Include the specified parameter to set the attribute value. the method returns the attribute value. If you did not specify a parameter. It is also set implicitly when lease_scavenge_time is set to a defined value. the method returns the attribute value. override_lease_scavenge_time( ) The override_lease_scavenge_time attribute controls whether the lease_scavenge_time value in the DHCP range is used. #Modifying override_lease_scavenge_time $dhcp_range->override_lease_scavenge_time("true"). instead of the upper-level default. Include the specified parameter to set the attribute value. Returns If you specified a parameter. NIOS 5. If you did not specify a parameter. The default value of this parameter is "false". instead of the grid default. It is also set implicitly when update_dns_on_lease_renewal is set to a defined value. A) . the method returns the attribute value. If you did not specify a parameter.Infoblox API Documentation If you specified a parameter. The Preboot Execution Environment Lease Time value is used by some hosts to boot remotely from a server. Example #Getting override_lease_scavenge_time my $override_lease_scavenge_time=$dhcp_range->override_lease_scavenge_time( ). pxe_lease_time( ) Use this method to set or retrieve PXE Lease Time value of the DHCP range. the method returns true when the modification succeeds. and returns false when the operation fails. Example #Getting override_update_dns_on_lease_renewal my $override_update_dns_on_lease_renewal=$dhcp_range->override_update_dns_on_lease_renewal( ). Omit the parameter to retrieve the attribute value. Example #Getting override_ddns_domainname my $override_ddns_domainname=$dhcp_range->override_ddns_domainname( ). Returns If you specified a parameter. #Modifying override_update_dns_on_lease_renewal $dhcp_range->override_update_dns_on_lease_renewal("true"). #Modifying override_ddns_domainname $dhcp_range->override_ddns_domainname("true"). Omit the parameter to retrieve the attribute value. The default value of this parameter is "false".1r4 Page 274 (Rev. Include the specified parameter to set the attribute value. Set the parameter to "false" to inherit the grid-level setting for update_dns_on_lease_renewal. The override_lease_scavenge_time attribute can be specified explicitly. the method returns true when the modification succeeds. Parameter Set the parameter to "true" to override the upper-level setting for lease_scavenge_time. Parameter Set the parameter to "true" to override the grid-level setting for update_dns_on_lease_renewal. and returns false when the operation fails. the method returns true when the modification succeeds. and returns false when the operation fails. The override_update_dns_on_lease_renewal attribute can be specified explicitly. Omit the parameter to retrieve the attribute value.

The default low watermark number is 0. #Modify pxe_lease_time $dhcp_range->pxe_lease_time("7200"). #Modify range_high_water_mark $range->range_high_water_mark(80). and returns false when the operation fails. the leases are irrecoverably deleted. the leases are kept in recycle bin until one week after expiration. A) . the method returns the attribute value. The default value is 95. If you did not specify a parameter. Include the specified parameter to set the attribute value. If the percentage of allocated addresses drops below this watermark. #Modify range_low_water_mark $range->range_low_water_mark(10). Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. If you did not specify a parameter. If you did not specify a parameter. an SNMP trap is sent. Example #Get pxe_lease_time my $pxe_lease_time = $dhcp_range->pxe_lease_time(). The low watermark value must be lower than the high watermark value. When the flag is disabled. the method returns the attribute value. and returns false when the operation fails. The range is from 1 to 100. Example #Get range_high_water_mark my $range_high_water_mark = $range->range_high_water_mark(). The default value is undefined. the method returns true when the modification succeeds. The default value is undefined. an SNMP trap is sent. Include the specified parameter to set the attribute value. The range is from 1 to 100. Example #Get range_low_water_mark my $range_low_water_mark = $range->range_low_water_mark(). the method returns true when the modification succeeds. the method returns the attribute value. unless this is a range served by a Microsoft server.1r4 Page 275 (Rev. If the percentage of allocated addresses exceeds this value. unless this is a range served by a Microsoft server. Omit the parameter to retrieve the attribute value. Parameter A number that specifies the percentage of allocated addresses. range_low_water_mark( ) Use this method to set or retrieve the range_low_water_mark value. If the flag is enabled. Returns If you specified a parameter. NIOS 5. Parameter Specify "true" to set the recycle_leases flag or "false" to deactivate/unset it.Infoblox API Documentation Parameter A 32-bit integer (range from 0 to 4294967295) represents the duration in seconds that the record is cached. Zero indicates that the record should not be cached. The high watermark value must be greater than the low watermark value. Returns If you specified a parameter. Parameter A number that specifies the percentage of allocated addresses. range_high_water_mark( ) Use this method to set or retrieve the range_high_water_mark value. and returns false when the operation fails. recycle_leases( ) Use this method to set or retrieve the recycle_leases flag of the DHCP range. the method returns true when the modification succeeds.

Parameter Specify the start address of the DHCP range in IPv4 address format. Example #Get recycle_leases my $recycle_leases = $dhcp_range->recycle_leases(). template( ) Use this method to set or retrieve the DHCP range template name for a DHCP Range object. the method returns the attribute value.168.1r4 Page 276 (Rev. Example #Get start_addr my $start_addr = $dhcp_range->start_addr(). Returns If you specified a parameter. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. If you did not specify a parameter.0. the method returns true when the modification succeeds. Example #Get template my $template = $dhcp_range->template(). Omit the parameter to retrieve the attribute value.2). the method returns the attribute value. An IPv4 address is a 32-bit number in dotted decimal notation. A) . and returns false when the operation fails. Parameter The valid name in sting format. A start address is the first IP address in the DHCP range available for the clients. The default value is undefined. the method returns true when the modification succeeds.Infoblox API Documentation Returns If you specified a parameter. and returns false when the operation fails. NIOS 5. the method returns true when the modification succeeds. #Modify recycle_leases $dhcp_range->recycle_leases("false"). If you did not specify a parameter. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. Include the specified parameter to set the attribute value. Parameter Specify "Allow" or "Deny" to set the unknown_clients_option flag value. Template is the name of a DHCP range template which will be used to create the DHCP range. #Modify start_addr $dhcp_range->start_addr("10. unknown_clients_option( ) Use this method to set or retrieve the unknown_clients_option option of a DHCP range. The template parameter can be used to only add a new DHCP range and cannot be used during object modify or returned during object get.1. and returns false when the operation fails.2"). #Modify template $dhcp_range->template("Template_Name"). Set this option to "Allow" or "Deny" to allow or prevent the allocation of an IP address from this pool to any client that has no host declaration. Include the specified parameter to set the attribute value. start_addr( ) Use this method to set or retrieve the start address of the DHCP range. Returns If you specified a parameter. Include the specified parameter to set the attribute value. If you did not specify a parameter.0.

the method returns the attribute value. search. #appliance user login password => "infoblox" #appliance password ). Parameter Specify "true" to set the update_dns_on_lease_renewal flag or "false" to deactivate/unset it. the last operation takes precedence. Infoblox::status_detail()). #Modify update_dns_on_lease_renewal $dhcp_range->update_dns_on_lease_renewal("true"). Thus the sequence $object->update_dns_on_lease_renewal("true").Infoblox API Documentation Returns If you specified a parameter. such as add.168. will set override_update_dns_on_lease_renewal to "false". and returns false when the operation fails. #Create a DHCP Member object my $memberdhcp = Infoblox::DHCP::Member->new( name => "infoblox. $object->update_dns_on_lease_renewal("true"). #Modify unknown_clients_option $dhcp_range->unknown_clients_option("Deny"). ipv4addr => "192.1r4 Page 277 (Rev.1. Omit the parameter to retrieve the attribute value.2" ). The default value of this parameter is "false". This sample also includes error handling for the operations. Note that when update_dns_on_lease_renewal is set to a defined value and override_update_dns_on_lease_renewal is set to "false". unless ($session) { die("Construct session failed: ". the method returns the attribute value. If you did not specify a parameter. use Infoblox.2".localdomain". Example #Get unknown_clients_option my $unknown_clients_option = $dhcp_range->unknown_clients_option(). #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. update_dns_on_lease_renewal( ) The update_dns_on_lease_renewal attribute controls whether the DHCP server updates DNS when a DHCP lease is renewed. Returns If you specified a parameter. #Preparation prior to a DHCP Range object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. unless($memberdhcp) { NIOS 5. and remove. If you did not specify a parameter. } print "Session created successfully\n". SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP range object. #appliance host ip username => "admin". and returns false when the operation fails. Infoblox::status_code() . Example #Get update_dns_on_lease_renewal my $update_dns_on_lease_renewal=$dhcp_range->update_dns_on_lease_renewal( ). the method returns true when the modification succeeds. $object>override_update_dns_on_lease_renewal("false"). will result in override_update_dns_on_lease_renewal="true".168. the method returns true when the modification succeeds. A) . ":" . Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_update_dns_on_lease_renewal attribute to "false". modify. and the sequence $object>override_update_dns_on_lease_renewal("false"). Setting this method to a defined value implicitly sets the override_update_dns_on_lease_renewal method to "true".1. Include the specified parameter to set the attribute value.

":" . #Create the Network object with the member my $network = Infoblox::DHCP::Network->new( network => "10. #Create a DHCP Range object my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10.0.0. comment => "Excluded range" ). } print "Mac Filter object created successfully\n". } print "Network object created successfully\n". A) . $session->status_code() . ":" . #Add the Mac Filter object into the Infoblox appliance through a session $session->add($mac_filter) or die("Add Mac Filter object failed: ".0/8". #Construct Custom Option object my $option1 = Infoblox::DHCP::Option->new( type => "1".5". end_address => "10. Infoblox::status_code() . enable_ddns => "true".0. ). #Create the Mac Filter object my $mac_filter = Infoblox::DHCP::Filter::MAC->new( "name" => "filter1".0. print "Network object added to Infoblox appliance successfully\n". NIOS 5.0. start_addr => "10. unless($mac_filter) { die("Construct Mac Filter object failed: ".7".10". #Construct DHCP Mac Filter rule object my $filter = Infoblox::DHCP::FilterRule::MAC->new( filter_name => "filter1". ":" . } print "DHCP Member object created successfully\n". permission => "grant" ). ":" . authority => "true". Infoblox::status_detail()).0. bootfile => "bootfile1. exclude => [$exclusion_range]. member => $memberdhcp.0.0. filters => [$filter]. $session->status_detail()).0. Infoblox::status_detail()). value => "255. $session->status_code() .0.1r4 Page 278 (Rev. ddns_generate_hostname => "true". unless($network) { die("Construct Network object failed: ".com". Infoblox::status_code() .com". ":" . network => "10. bootserver => "someserver.0.0.0. $session->status_detail()).1". print "Mac Filter object added to Infoblox appliance successfully\n". deny_all_clients => "true". disable => "true". deny_bootp => "true". "comment" => "5 minutes" ). #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ".0. comment => "add network".0/8". Infoblox::status_code() .Infoblox API Documentation die("Construct member failed: ". Infoblox::status_detail()). #Construct exclusion range object my $exclusion_range = Infoblox::DHCP::ExclusionRange->new( start_address => "10. comment => "add range".0". members => [ $memberdhcp ] ).

Infoblox::status_code() .1r4 Page 279 (Rev. Infoblox::status_detail()). number_of_addresses => "10". ":" . #Un-override bootfile $object->bootfile(undef). $session->status_code() . #Add the DHCP Range template object into the Infoblox appliance through a session $session->add($dhcp_range_template) or die("Add DHCP Range template object failed: ". $session->status_detail()). unless($dhcp_range_template) { die("Construct DHCP Range template object failed: ".0. print "DHCP Range object added to the network successfully\n".0/8". } print "DHCP Range template object created successfully\n". $session->status_code() . my $dhcp_range = Infoblox::DHCP::Range->new( start_addr => "10. } print "DHCP Range object created successfully\n". } print "Get DHCP Range object found at least 1 matching entry\n". network => "10.0.0.Infoblox API Documentation nextserver options pxe_lease_time recycle_leases => => => => "3. #Modify one of the attributes of the specified DHCP Range $object->comment ("modified comment"). "true". ":" .15". print "DHCP Range object added to the network successfully\n". ":" . #Create a DHCP Range object using a template my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template". my $object = $retrieved_objs[0]. ":" . $session->status_detail()). ). end_addr => "10. $session->status_code() . Infoblox::status_detail()). #Get and modify a DHCP Range #Get a DHCP Range through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range". Infoblox::status_code() . ":" . ).3".0. A) . ":" .11". unless ($object) { die("Get DHCP Range failed: ". NIOS 5. ":" . Infoblox::status_code() . template => "custom_range_template" ). } print "DHCP Range object created successfully\n".0. [$option1]. #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ". $session->status_detail()). #Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ". unless($dhcp_range) { die("Construct DHCP Range object failed: ".0.0. offset => "10".3. $session->status_detail()).0. unless($dhcp_range) { die("Construct DHCP Range object failed: ". $session->status_code() .3. "3600". ). start_addr => "10. Infoblox::status_detail()). print "DHCP Range template object added to the network successfully\n". #Un-override bootserver $object->bootserver(undef).1".

####PROGRAM ENDS#### AUTHOR Infoblox Inc. Infoblox::Session->add(). $session->status_code() . Infoblox::Session->search(). $session->status_code() . Infoblox::DHCP::FilterRule::MAC. network => "10. Infoblox::DHCP::FilterRule::RelayAgent. print "DHCP Range object removed successfully \n".*1". unless ($object) { die("Get DHCP Range failed: ". Infoblox::DHCP::Option.infoblox. Infoblox::DHCP::FilterRule::Option. $session->status_detail()).com/ SEE ALSO Infoblox::Session. #submit the Range Template object for removal $session->remove($dhcp_range_template) or die("Remove DHCP Range Tempate failed: ". http://www. my $object = $retrieved_objs[0]. Infoblox::Session->remove().0. ":" . #Apply the changes $session->modify($object) or die("Modify DHCP Range failed: ". unless ($object) { die("Search DHCP range failed: ". start_addr => "10. Infoblox::DHCP::Member.Infoblox API Documentation #Un-override nextserver $object->nextserver(undef). comment => ". $session->status_detail()). print "DHCP Range Templateobject removed successfully \n". } print "Search DHCP range object found at least 1 matching entry\n".0/. ":" . Infoblox::DHCP::FilterRule::NAC.0.*comment" ).0. print "DHCP Range object modified successfully \n". the Infoblox::DHCP::RangeTemplate manpage COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.1r4 Page 280 (Rev. } print "Get DHCP Range object found at least 1 matching entry\n". $session->status_detail()). $session->status_code() . $session->status_detail()).0. my $object = $retrieved_objs[0]. $session->status_code() . A) .10". ). #Remove a DHCP Range #Get a DHCP Range through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range". $session->status_code() . #submit the object for removal $session->remove($object) or die("Remove DHCP Range failed: ". Infoblox::Session->modify(). start_addr => ". #Search a DHCP Range # search for DHCP range object with start address having last octet as 1 my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Range".Infoblox::DHCP::ViewInfoblox::DHCP::ExclusionRange.". Infoblox::Session->get(). ":" . NIOS 5. $session->status_detail()).1".0. end_addr => "10.0. ":" . ":" .

$filename.DHCP RangeTemplate object. $num. The DHCP range object created from a DHCP range template will inherit most properties defined in range template object. $num. CONSTRUCTOR my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name number_of_addresses offset authority bootfile => => => => => $string. So. DESCRIPTION A DHCP range template works as a 'cookie cutter' and can be used to create real DHCP range object in a quick and consistent way.1r4 . most of the DHCP range template properties are the same as the DHCP range object properties. "true" | "false".Infoblox API Documentation Infoblox::DHCP::RangeTemplate . A) NIOS 5.DHCP RangeTemplate object. $ipv4addr $fqdn #Required #Required #Required #Optional / Default is undefined #Optional / Default is undefined undef #Optional / Default is undefined Page 281 (Rev. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::NetworkTemplate->range_templates( ) SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->search( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) METHODS authority( ) bootfile( ) bootserver( ) comment( ) ddns_domainname( ) ddns_generate_hostname( ) deny_all_clients( ) deny_bootp( ) enable_ddns( ) enable_known_clients_option( ) enable_unknown_clients_option( ) exclude( ) extensible_attributes( ) failover_assoc( ) filters( ) known_clients_option( ) lease_scavenge_time( ) member( ) name( ) nextserver( ) number_of_addresses( ) offset( ) options( ) override_ddns_domainname( ) override_lease_scavenge_time( ) override_update_dns_on_lease_renewal( ) pxe_lease_time( ) recycle_leases( ) unknown_clients_option( ) update_dns_on_lease_renewal( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::RangeTemplate .

#Optional / Default value is "false" pxe_lease_time => $num. See Infoblox::Session->add() for parameters and return values. #Optional / Default is undefined nextserver => $ipv4addr | $fqdn | undef. SESSION METHODS This section describes all the methods in an Infoblox::Session module that can be applied to a DHCP range template object. MODULE METHODS The following functions are available to be applied to a DHCP Range Template object.. #Optional / Default is "false" exclude => [$ExclusionRange1. #Optional / Default is undefined ddns_generate_hostname => "true" | "false".. A) . #Optional / Default is undefined unknown_clients_option => "Allow" | "Deny". . #Optional / Default value is "false" ). bootfile => "bootfile1. #Optional / Default is undefined recycle_leases => "true" | "false". #Optional / Default is -1 member => $Member. #Optional / Default is "false" deny_bootp => "true" | "false" | undef.. offset => "10". #Optional / Default is empty extensible_attributes => { $string => $string | $num. } #Optional / Default is undefined failover_assoc => $string. #Optional / Default is undefined enable_known_clients_option => "true" | "false". offset => "10". #Optional / Default is undefined options => [$Option1.].]. #Configure range template in network template object my $responce = $network_template->range_templates([$template]).1r4 Page 282 (Rev. $string => [ $string | $num. #Optional / Default is undefined ddns_domainname => $string | undef. number_of_addresses => "10". See Infoblox::DHCP::NetworkTemplate>range_templates() for parameters and return values... #Optional / Default is "false" enable_unknown_clients_option => "true" | "false". Infoblox::DHCP::NetworkTemplate->range_templates( ) Use this function to specify a range template at network template on the Infoblox appliance. #Optional / Default value is "false" override_lease_scavenge_time => "true" | "false". #Optional / Default is empty override_ddns_domainname => "true" | "false".. #Optional / Default is undefined enable_ddns => "true" | "false". #Optional / Default is undefined known_clients_option => "Allow" | "Deny".. #Optional / Default is undefined update_dns_on_lease_renewal => "true" | "false". #Optional / Default value is "false" override_update_dns_on_lease_renewal => "true" | "false".Infoblox API Documentation bootserver => | | .com". )... #Optional / Default is undefined filters => [$MAC. authority => "true".. ]. Example #Construct a range template object my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template". my $template = Infoblox::DHCP::Template->new( name => "custom_range_template".].$RelayAgent.$ExclusionRange2. ). Example #Construct an object my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template".$Option2. Infoblox::Session->add( ) Use this method to add a DHCP range template object to the Infoblox appliance. #Optional / Default is undefined deny_all_clients => "true" | "false".. comment => $string... NIOS 5. number_of_addresses => "10". #Optional / Default is undefined lease_scavenge_time => $number.$Option. .

"true". "3600". The name of the DHCP range template (regular expression). my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RangeTemplate". "true". extensible_attributes . comment .Infoblox API Documentation bootserver comment ddns_generate_hostname deny_all_clients deny_bootp enable_ddns exclude filters member nextserver options pxe_lease_time recycle_leases ). The comment of the DHCP range template (regular expression). NIOS 5. See Infoblox::Session->search() for parameters and return values. See Infoblox::Session->modify() for parameters and return values.Optional. Examples my @retrieved_objs = $session->search( object => "Infoblox::DHCP::RangeTemplate". [$exclusion_range_template]. # Submit for addition my $response = $session->add( $dhcp_range_template ). Infoblox::Session->modify( ) Use this method to modify a DHCP range template object in the Infoblox appliance. Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. => => => => => => => => => => => => => "someserver.3".Optional.*".3. The name of the DHCP range template. A hash reference containing extensible attributes. $dhcp_range_template->comment("this is a modified comment"). Key References Apply the following attributes to search for a specific DHCP Range Template object: name . Infoblox::Session->search( ) Use this method to retrieve all the matching objects from the Infoblox appliance.com". [$filter]. Key References Apply the following attributes to get a specific DHCP range template object: name .3. my @retrieved_objs = $session->search( object => "Infoblox::DHCP::RangeTemplate". extensible_attributes => { 'Site' => 'Santa Clara' } ). "true".Optional. ). [$option1]. Examples my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RangeTemplate". "true". A hash reference containing extensible attributes. Example # Use method to modify the comment.1r4 Page 283 (Rev. $memberdhcp. name => "custom_range_template" ). "add range". A) . "true". "3. See Infoblox::Session->get() for parameters and return values.Optional. extensible_attributes => { 'Site' => 'Santa Clara' } ).Optional. extensible_attributes . name => "custom_range_template" comment => ".

bootfile( ) Use this method to set or retrieve a bootfile name which is the name of the file the client must download. A) . Parameter The boot file name in string format with a maximum of 256 bytes. Include the specified parameter to set the attribute value. The default value is undefined. The default value is undefined. Include the specified parameter to set the attribute value. #Modify authority $dhcp_range_template->authority("false"). Infoblox::Session->remove( ) Use this method to remove a DHCP range template object from the Infoblox appliance. # Submit for removal my $response = $session->remove( $desired_dhcp_range_template ). NIOS 5. name => "custom_range_template" ). first use get() or search() to retrieve the specific DHCP range template object. Returns If you specified a parameter. the method returns true when the modification succeeds. and returns false when the operation fails. and then submit this object for removal. Example # Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RangeTemplate". METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP range template object. authority( ) Use this method to set or retrieve the authority flag of a DHCP range template. the method returns the attribute value. and returns false when the operation fails. Example #Get authority my $authority = $dhcp_range_template->authority(). If you did not specify a parameter. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. See Infoblox::Session->remove() for parameters and return values. my $desired_dhcp_range_template = $retrieved_objs[0]. the method returns the attribute value. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. #Modify bootfile $dhcp_range_template->bootfile("bootfile2. This option is overridden independently from Infoblox::DHCP::RangeTemplate->bootserver() and Infoblox::DHCP::RangeTemplate>nextserver(). To remove a specific object. Returns If you specified a parameter. Example #Get bootfile my $bootfile = $dhcp_range_template->bootfile().Infoblox API Documentation # Submit modification my $response = $session->modify( $dhcp_range_template ). Parameter Specify "true" to set the authority flag or "false" to deactivate/unset it. # Find the desired object from the retrieved list.com").1r4 Page 284 (Rev. #Un-override bootfile $dhcp_range_template->bootfile(undef).

will set override_ddns_domainname to "false". Omit the parameter to retrieve the attribute value. Example NIOS 5. #Un-override bootserver $dhcp_range_template->bootserver(undef). The FQDN consists of the host name followed by the domain name (example: abc. Omit the parameter to retrieve the attribute value. the last operation takes precedence. Parameter The dynamic DNS domain name in string format. and the sequence $object->override_ddns_domainname("false").Infoblox API Documentation bootserver( ) Use this method to set or retrieve a bootserver name which is the name of the server where the boot file is stored. ddns_domainname( ) Use this method to set or retrieve the ddns_domainname value of a DHCP Range template object. the method returns the attribute value. Example #Get bootserver my $bootserver = $dhcp_range_template->bootserver(). Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false". the method returns the attribute value. Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false". and returns false when the operation fails. comment( ) Use this method to set or retrieve a descriptive comment of a DHCP range template. If you did not specify a parameter. Returns If you specified a parameter. Parameter Desired comment in string format with a maximum of 256 bytes. Example #Get comment my $comment = $dhcp_range_template->comment(). the method returns the attribute value. If you did not specify a parameter. Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true". Returns If you specified a parameter. Thus the sequence $object->ddns_domainname("testdomain"). Parameter The boot server IP address or name in FQDN (Fully Qualified Domain Name) format.com). #Modify bootserver $dhcp_range_template->bootserver("anotherserver. $object>ddns_domainname("testdomain"). the method returns true when the modification succeeds. Include the specified parameter to set the attribute value.com"). the method returns true when the modification succeeds. #Modify comment $dhcp_range_template->comment("Modifying the DHCP range template comment"). the method returns true when the modification succeeds. The default value is undefined. Include the specified parameter to set the attribute value. A) . $object->override_ddns_domainname("false"). A boot server name can have a maximum of 256 bytes. This option is overridden independently from Infoblox::DHCP::RangeTemplate->bootfile() and Infoblox::DHCP::RangeTemplate>nextserver(). If you did not specify a parameter. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. will result in override_ddns_domainname="true". and returns false when the operation fails. Include the specified parameter to set the attribute value.1r4 Page 285 (Rev. Returns If you specified a parameter.

Enable this method to allow only the DHCP server to generate a hostname. ddns_generate_hostname( ) Use this method to set or retrieve the ddns_generate_hostname flag of a DHCP range template. Omit the parameter to retrieve the attribute value. deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP range template. Parameter Specify "true" to set the deny_all_clients flag or "false" to deactivate/unset it. The default value is undefined. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. Enable this method to deny all BOOTP requests for DHCP range created from this template. the method returns true when the modification succeeds. and returns false when the operation fails. #Modify deny_all_clients $dhcp_range_template->deny_all_clients("false"). the method returns the attribute value. and returns false when the operation fails. The default value is false which indicates that this attribute inherit the upper-level setting. Parameter Specify "true" to set the ddns_generate_hostname flag or "false" to deactivate/unset it. the method returns the attribute value. Omit the parameter to retrieve the attribute value. The default value for this field is false. Include the specified parameter to set the attribute value. deny_all_clients( ) Use this method to set or retrieve the deny_all_clients flag of a DHCP range template. #Modify ddns_domainname $dhcp_range_template->ddns_domainname("test_domain. If you did not specify a parameter. A) . If you did not specify a parameter. Example #Get deny_bootp my $deny_bootp = $dhcp_range_template->deny_bootp(). Include the specified parameter to set the attribute value.1r4 Page 286 (Rev. Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. Returns If you specified a parameter.com"). Enable this method to deny all lease requests for the DHCP range created from template.Infoblox API Documentation #Get ddns_domainname my $ddns_domainname = $dhcp_range_template->ddns_domainname(). and returns false when the operation fails. #Modify ddns_generate_hostname $dhcp_range_template->ddns_generate_hostname("false"). the method returns true when the modification succeeds. NIOS 5. the method returns true when the modification succeeds. Example #Get ddns_generate_hostname my $ddns_generate_hostname = $dhcp_range_template->ddns_generate_hostname(). Returns If you specified a parameter. If you did not specify a parameter. Example #Get deny_all_clients my $deny_all_clients = $dhcp_range_template->deny_all_clients(). Include the specified parameter to set the attribute value.

Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. and returns false when the operation fails. If you did not specify a parameter. #Modify enable_known_clients_option $dhcp_range->enable_known_clients_option("false"). Parameter Specify "true" to set the enable_unknown_clients_option flag or "false" to deactivate/unset it. If you did not specify a parameter. If you did not specify a parameter. You must set the enable_unknown_clients_option flag to true in order to use the unknown_clients_option attribute. A) . Parameter Specify "true" to set the enable_ddns flag or "false" to deactivate/unset it. enable_known_clients_option( ) Use this method to set or retrieve the enable_known_clients_option flag of a DHCP range. the method returns true when the modification succeeds. Parameter Specify "true" to set the enable_known_clients_option flag or "false" to deactivate/unset it. Omit the parameter to retrieve the attribute value. #Modify enable_unknown_clients_option $dhcp_range->enable_unknown_clients_option("false").Infoblox API Documentation #Modify deny_bootp $dhcp_range_template->deny_bootp("false"). Enable this method to allow dynamic DNS updates. Example #Get enable_ddns my $enable_ddns = $dhcp_range_template->enable_ddns(). and returns false when the operation fails. Include the specified parameter to set the attribute value. Returns If you specified a parameter. Example #Get enable_known_clients_option my $enable_known_clients_option = $dhcp_range->enable_known_clients_option(). enable_ddns( ) Use this method to set or retrieve the enable_ddns flag of a DHCP range template. Returns If you specified a parameter. the method returns the attribute value. and returns false when the operation fails. the method returns the attribute value. The default value is undefined. Returns If you specified a parameter. enable_unknown_clients_option( ) Use this method to set or retrieve the enable_unknown_clients_option flag of a DHCP range. The default value is "false". the method returns true when the modification succeeds. The default value is "false". the method returns the attribute value.1r4 Page 287 (Rev. Example #Get enable_unknown_clients_option my $enable_unknown_clients_option = $dhcp_range->enable_unknown_clients_option(). #Modify enable_ddns $dhcp_range_template->enable_ddns("false"). You must set the enable_known_clients_option flag to true in order to use the known_clients_option attribute. Include the specified parameter to set the attribute value. exclude( ) NIOS 5.

Parameter Specify the failover peer association name in string format. #Modify extensible attributes $dhcp_range_template->extensible_attributes({ 'Site' => 'Santa Clara'.1r4 Page 288 (Rev. A) . filters( ) Use this method to set or retrieve the filters of the DHCP range template. For email. the method returns the attribute value. Parameter Valid value is an array reference that contains defined Infoblox::DHCP::ExclusionRangeTemplate objects. 'Administrator' => [ 'Peter'. the method returns true when the modification succeeds. The default value is undefined. the method returns the attribute value. If you did not specify a parameter. failover_assoc( ) Use this method to set or retrieve the failover peer association name of the DHCP range template. NIOS 5. For an integer. Example #Get failover_assoc my $failover_assoc = $dhcp_range_template->failover_assoc(). #Modify failover_assoc $dhcp_range_template->failover_assoc("peer2"). and string types. URL. If you did not specify a parameter. the value is a string with a maximum of 64 characters. For a list. the method returns the attribute value. Returns If you specified a parameter. #Modify exclude $dhcp_range_template->exclude([$exl1]). and returns false when the operation fails. Filters are used to screen the address assignments if the addresses in the DHCP range needs to be assigned to specific hosts. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. #$exl1 is an Infoblox::DHCP::ExclusionRangeTemplate object extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP Range Template object. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values.Infoblox API Documentation Use this method to set or retrieve the exclusion range template in the DHCP range template. The default value is undefined. the value is a string with a maximum of 256 characters. the method returns true when the modification succeeds. If you did not specify a parameter. Returns If you specified a parameter. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. Example #Get exclude my $ref_exclude = $dhcp_range_template->exclude(). the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. For a date. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. the value is the number of seconds that have elapsed since January 1st. Include the specified parameter to set the attribute value. the value is an integer from -2147483648 through 2147483647. 1970 UTC. and returns false when the operation fails. 'Tom' ] }). Include the specified parameter to set the attribute value. Example #Get extensible attributes my $ref_extensible_attributes = $dhcp_range_template->extensible_attributes().

Parameter Specify "Allow" or "Deny" to set the known_clients_option flag value. If you did not specify a parameter. To disable lease scavenging. and returns false when the operation fails. The default value of this parameter is -1. Example #Get filters my $ref_filters = $dhcp_range_template->filters(). Returns If you specified a parameter. If you did not specify a parameter. the method returns the attribute value. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. #$filter1 is an Infoblox::DHCP::FilterRule::MAC. Include the specified parameter to set the attribute value. #Modify filters $dhcp_range_template->filters([$filter1]). the last operation takes precedence. and returns false when the operation fails. which means that lease scavenging is disabled. that free and backup leases remain in the database before they are automatically deleted. the method returns true when the modification succeeds. and returns false when the operation fails. known_clients_option( ) Use this method to set or retrieve the known_clients_option option of a DHCP range. Example #Get known_clients_option my $known_clients_option = $dhcp_range->known_clients_option(). and the sequence $object->override_lease_scavenge_time("false"). Infoblox::DHCP::FilterRule::RelayAgent. Omit the parameter to retrieve the attribute value. #Modify known_clients_option $dhcp_range->known_clients_option("Deny"). Include the specified parameter to set the attribute value. Thus the sequence $object->lease_scavenge_time(604800). lease_scavenge_time( ) Use this method to set or retrieve the lease_scavenge_time value of a DHCP Range Template object. If you did not specify a parameter. NIOS 5. the method returns the attribute value. The default value is undefined. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. Infoblox::DHCP::FilterRule::NAC. the method returns true when the modification succeeds. Infoblox::DHCP::FilterRule::MAC. A) . Example #Get lease_scavenge_time my $lease_scavenge = $dhcp_range_template->lease_scavenge_time().Infoblox API Documentation Include the specified parameter to set the attribute value. and Infoblox::DHCP::FilterRule::UserClass objects. in seconds. The default value is undefined. Infoblox::DHCP::FilterRule::RelayAgent. Parameter The valid value is an array reference that contains defined Infoblox::DHCP::FilterRule::MAC. will set override_lease_scavenge_time to "false". $object->override_lease_scavenge_time("false"). Parameter An integer that specifies the period of time. Setting the parameter to undefined causes the appliance to use the default from the upper level and automatically resets the override_lease_scavenge_time attribute to "false". Set this option to "Allow" or "Deny" to allow or prevent the allocation of an IP address from this pool to any client that has a host declaration. Returns If you specified a parameter. $object>lease_scavenge_time(604800). or Infoblox::DHCP::FilterRule::UserClass object. will result in override_lease_scavenge_time="true". Setting this method to a defined value implicitly sets the override_lease_scavenge_time method to "true". set the parameter to -1.1r4 Page 289 (Rev. The minimum positive value must be greater than 86400 seconds (1 day). the method returns the attribute value. Note that when lease_scavenge_time is set to a defined value and override_lease_scavenge_time is set to "false".

the method returns true when the modification succeeds. This option is overridden independently from Infoblox::DHCP::RangeTemplate->bootfile() and Infoblox::DHCP::RangeTemplate>bootserver().1r4 Page 290 (Rev. the method returns true when the modification succeeds. #Un-override nextserver NIOS 5. A next server name can have a maximum of 256 bytes. the method returns true when the modification succeeds. #$member is an Infoblox::DHCP::Member object name( ) Use this method to set or retrieve the description of the name of the DHCP range template. Parameter The valid value is a defined Infoblox::DHCP::Member or Infoblox::DHCP::MSServer object. Include the specified parameter to set the attribute value. member( ) Use this method to set or retrieve the member or Microsoft (r) server of the DHCP range template.4. If you did not specify a parameter.com). The FQDN consists of the host name followed by the domain name (example: abc. and returns false when the operation fails. Returns If you specified a parameter. The default value is undefined. and returns false when the operation fails. The member or Microsoft server that serves DHCP for this IP address range template. and returns false when the operation fails. Example #Get nextserver my $nextserver = $dhcp_range_template->nextserver(). the method returns the attribute value. Parameter Name of the fixed address in string format with a maximum of 64 bytes. Example #Get member my $ref_member = $dhcp_range_template->member().4. nextserver( ) Use this method to set or retrieve the nextserver IP address which is the boot file server where the boot file is stored. #Modify nextserver $dhcp_range_template->nextserver("4. #Modify member $dhcp_range_template->member($member1).4"). the method returns the attribute value. Returns If you specified a parameter. Example #Get name my $name = $dhcp_range_template->name(). The default value is undefined. Omit the parameter to retrieve the attribute value. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. Include the specified parameter to set the attribute value. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. The default value is undefined. Returns If you specified a parameter. #Modify name $dhcp_range_template->name("custom_range_template").Infoblox API Documentation #Modify lease_scavenge_time $dhcp_range_template->lease_scavenge_time(30 * 24 * 60 * 60). If you did not specify a parameter. Include the specified parameter to set the attribute value. If you did not specify a parameter. A) .

If you did not specify a parameter. the method returns the attribute value. and returns false when the operation fails. number_of_addresses( ) Use this method to set or retrieve the number of addresses in this DHCP range template Include the specified parameter to set the attribute value. A) . and returns false when the operation fails. Include the specified parameter to set the attribute value. Parameter Valid value is an array reference that contains defined Infoblox::DHCP::Option objects.10 and end address will be 10. For example. Example #Get offset my $offset = $dhcp_range_template->offset().100. Omit the parameter to retrieve the attribute value.0. Returns If you specified a parameter. the method returns true when the modification succeeds. and network is set to 10.0. the method returns the attribute value. The offset is calculated from the start address of network template to which the DHCP range template is assigned to.0. DHCP options describe network configuration settings and various services available on the network. Example #Get options my $ref_options = $dhcp_range_template->options(). #Modify number_of_addresses $dhcp_range_template->number_of_addresses("10"). options( ) Use this method to set or retrieve the options of the DHCP range template.0/8. Omit the parameter to retrieve the attribute value. Parameter The address offset of this DHCP range template. If you did not specify a parameter.0. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. Example #Get number_of_addresses my $number_of_addresses = $dhcp_range_template-> number_of_addresses().1r4 Page 291 (Rev.Infoblox API Documentation $dhcp_range_template->nextserver(undef). and returns false when the operation fails.0. the method returns true when the modification succeeds. Returns If you specified a parameter. Returns If you specified a parameter. If you did not specify a parameter. Parameter The number of addresses in this DHCP range template. The default value is empty.0. then start address of DHCP range created from this range template will be 10. offset( ) Use this method to set or retrieve the address offset of this DHCP range template. #Modify options $dhcp_range_template->options([$option12]). #Modify offset $dhcp_range_template->offset("10"). the method returns the attribute value. Include the specified parameter to set the attribute value. if offset is set to 10 and number_of_addresses is set to 100. #$option12 is an Infoblox::DHCP::Option object override_ddns_domainname( ) NIOS 5.

Set the parameter to "false" to inherit the setting for lease_scavenge_time from the upper level. Include the specified parameter to set the attribute value. If you did not specify a parameter. #Modifying override_ddns_domainname $dhcp_range_template->override_ddns_domainname("true"). the method returns the attribute value. instead of the grid default. It is also set implicitly when ddns_domainname is set to a defined value. override_update_dns_on_lease_renewal( ) The override_update_dns_on_lease_renewal attribute controls whether the update_dns_on_lease_renewal value in the DHCP range template is used. Set the parameter to "false" to inherit the grid-level setting for update_dns_on_lease_renewal. and returns false when the operation fails. and returns false when the operation fails. Example #Getting override_ddns_domainname my $override_ddns_domainname=$dhcp_range_template->override_ddns_domainname( ). instead of the grid default. The override_update_dns_on_lease_renewal attribute can be specified explicitly. Include the specified parameter to set the attribute value. NIOS 5. Omit the parameter to retrieve the attribute value. The default value of this parameter is "false". the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. and returns false when the operation fails. It is also set implicitly when update_dns_on_lease_renewal is set to a defined value. If you did not specify a parameter. It is also set implicitly when lease_scavenge_time is set to a defined value. Set the parameter to "false" to inherit the grid-level setting for ddns_domainname. The override_lease_scavenge_time attribute can be specified explicitly. Returns If you specified a parameter. override_lease_scavenge_time( ) The override_lease_scavenge_time attribute controls whether the lease_scavenge_time value in the DHCP range template is used. the method returns the attribute value. The default value of this parameter is "false". Omit the parameter to retrieve the attribute value. Parameter Set the parameter to "true" to override the grid-level setting for ddns_domainname. the method returns true when the modification succeeds.Infoblox API Documentation The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP range template is used. #Modifying override_lease_scavenge_time $dhcp_range_template->override_lease_scavenge_time("true"). the method returns true when the modification succeeds. Returns If you specified a parameter.1r4 Page 292 (Rev. A) . Parameter Set the parameter to "true" to override the upper-level setting for lease_scavenge_time. Example #Getting override_lease_scavenge_time my $override_lease_scavenge_time=$dhcp_range_template->override_lease_scavenge_time( ). The override_ddns_domainname attribute can be specified explicitly. Returns If you specified a parameter. instead of the upper-level default. The default value of this parameter is "false". Parameter Set the parameter to "true" to override the grid-level setting for update_dns_on_lease_renewal. Omit the parameter to retrieve the attribute value.

and returns false when the operation fails. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. #Modify pxe_lease_time $dhcp_range_template->pxe_lease_time("7200"). The Preboot Execution Environment lease time value is used by some hosts to boot remotely from a server. Parameter Specify "Allow" or "Deny" to set the unknown_clients_option flag value. the method returns the attribute value. and returns false when the operation fails. #Modifying override_update_dns_on_lease_renewal $dhcp_range_template->override_update_dns_on_lease_renewal("true"). Zero indicates that the record should not be cached. Returns If you specified a parameter. NIOS 5. the leases are irrecoverably deleted. Parameter Specify "true" to set the recycle_leases flag or "false" to deactivate/unset it. the leases are kept in recycle bin until one week after expiration. Include the specified parameter to set the attribute value. Returns If you specified a parameter. Parameter A 32-bit integer (range from 0 to 4294967295) represents the duration in seconds that the record is cached. Example #Get recycle_leases my $recycle_leases = $dhcp_range_template->recycle_leases(). When the flag is disabled. Returns If you specified a parameter. A) . and returns false when the operation fails. If the flag is enabled. the method returns the attribute value. Example #Getting override_update_dns_on_lease_renewal my $override_update_dns_on_lease_renewal=$dhcp_range_template>override_update_dns_on_lease_renewal( ). Omit the parameter to retrieve the attribute value. The default value is undefined. #Modify recycle_leases $dhcp_range_template->recycle_leases("false"). the method returns true when the modification succeeds. recycle_leases( ) Use this method to set or retrieve the recycle_leases flag of the DHCP range template. The default value is undefined. The default value is undefined. unknown_clients_option( ) Use this method to set or retrieve the unknown_clients_option option of a DHCP range. the method returns true when the modification succeeds. the method returns the attribute value. Example #Get pxe_lease_time my $pxe_lease_time = $dhcp_range_template->pxe_lease_time(). If you did not specify a parameter. Set this option to "Allow" or "Deny" to allow or prevent the allocation of an IP address from this pool to any client that has no host declaration. pxe_lease_time( ) Use this method to set or retrieve the PXE lease time value of the DHCP range template. the method returns true when the modification succeeds. the method returns the attribute value.1r4 Page 293 (Rev. If you did not specify a parameter. If you did not specify a parameter.Infoblox API Documentation If you did not specify a parameter.

the method returns the attribute value. my $session = Infoblox::Session->new( master => $host_ip. } print "DHCP Member object created successfully\n". and remove. Infoblox::status_detail()). #appliance user login password => "infoblox" #appliance password ). ":" . ":" . #appliance host ip username => "admin". will set override_update_dns_on_lease_renewal to "false".1r4 Page 294 (Rev. modify. unless($memberdhcp) { die("Construct member failed: ". Infoblox::status_code() . update_dns_on_lease_renewal( ) The update_dns_on_lease_renewal attribute controls whether the DHCP server updates DNS when a DHCP lease is renewed. Example #Get update_dns_on_lease_renewal my $update_dns_on_lease_renewal=$dhcp_range_template->update_dns_on_lease_renewal( ). Infoblox::status_detail()). #Create a session to the Infoblox appliance my $host_ip = "192. } print "Session created successfully\n". Also. NIOS 5. #Modify unknown_clients_option $dhcp_range->unknown_clients_option("Deny").localdomain". the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. Returns If you specified a parameter. the last operation takes precedence. Setting this method to a defined value implicitly sets the override_update_dns_on_lease_renewal method to "true". The default value of this parameter is "false". #Modify update_dns_on_lease_renewal $dhcp_range_template->update_dns_on_lease_renewal("true"). If you did not specify a parameter. ipv4addr => $host_ip ). $object->update_dns_on_lease_renewal("true").168. A) .1. and the sequence $object>override_update_dns_on_lease_renewal("false"). unless ($session) { die("Construct session failed: ". #Create a DHCP Member object my $memberdhcp = Infoblox::DHCP::Member->new( name => "infoblox. Infoblox::status_code() . Omit the parameter to retrieve the attribute value. Parameter Specify "true" to set the update_dns_on_lease_renewal flag or "false" to deactivate/unset it. Note that when update_dns_on_lease_renewal is set to a defined value and override_update_dns_on_lease_renewal is set to "false". #Preparation prior to a DHCP RangeTemplate object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. this sample includes error handling for the operations.2".Infoblox API Documentation Example #Get unknown_clients_option my $unknown_clients_option = $dhcp_range->unknown_clients_option(). $object>override_update_dns_on_lease_renewal("false"). use Infoblox. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP range template object such as add. will result in override_update_dns_on_lease_renewal="true". Thus the sequence $object->update_dns_on_lease_renewal("true"). Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_update_dns_on_lease_renewal attribute to "false". and returns false when the operation fails.

NIOS 5. pxe_lease_time => "3600". number_of_addresses => "10". Infoblox::status_code() . $session->status_code() .com". Infoblox::status_code() . $session->status_detail()).Infoblox API Documentation #Create the Mac Filter object my $mac_filter = Infoblox::DHCP::Filter::MAC->new( name => "filter1". number_of_addresses => "5". unless($filter){ die("Construct filter object failed: ". #Construct exclusion range template object my $exclusion_range_template = Infoblox::DHCP::ExclusionRangeTemplate->new( offset => "15". ":" .com".3". } print "Exclusion range template object created successfully\n". Infoblox::status_code() . ":" . offset => "10". } print "DHCP RangeTemplate object created successfully\n". comment => "add range". deny_all_clients => "true". Infoblox::status_code() . comment => "5 minutes" ). nextserver => "3. A) . comment => "Excluded range" ). $session->status_code() . #Add the DHCP RangeTemplate object into the Infoblox appliance through a session $session->add($dhcp_range_template) or die("Add DHCP RangeTemplate object failed: ". bootfile => "bootfile1. Infoblox::status_detail()). } print "Filter object created successfully\n". permission => "grant" ). member => $memberdhcp. #Construct DHCP Mac Filter rule object my $filter = Infoblox::DHCP::FilterRule::MAC->new( filter_name => "filter1". recycle_leases => "true". Infoblox::status_detail()).1r4 Page 295 (Rev. #Create a DHCP RangeTemplate object my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template". print "DHCP RangeTemplate object added to the network successfully\n". enable_ddns => "true". authority => "true". bootserver => "someserver. deny_bootp => "true". filters => [$filter]. Infoblox::status_detail()). #Add the Mac Filter object into the Infoblox appliance through a session $session->add($mac_filter) or die("Add Mac Filter object failed: ". ":" . ":" .3. } print "Mac Filter object created successfully\n". unless($exclusion_range_template){ die("Construct exclusion range template object failed: ". ":" . ":" . ). Infoblox::status_detail()). unless($dhcp_range_template) { die("Construct DHCP RangeTemplate object failed: ".3. print "Mac Filter object added to Infoblox appliance successfully\n". exclude => [$exclusion_range_template]. unless($mac_filter) { die("Construct Mac Filter object failed: ". ddns_generate_hostname => "true". $session->status_detail()).

).com/ SEE ALSO NIOS 5. $session->status_code() . name => "custom_range_template". ":" . my $object = $retrieved_objs[0]. ":" . ":" . ":" .infoblox. name => "custom_range_template". #Un-override bootfile $object->bootfile(undef). } print "Get DHCP RangeTemplate object found at least 1 matching entry\n". #Un-override bootserver $object->bootserver(undef). ":" . $session->status_detail()). ).1r4 Page 296 (Rev. unless ($object) { die("Search DHCP RangeTemplate failed: ". #Un-override nextserver $object->nextserver(undef). unless ($object) { die("Get DHCP RangeTemplate failed: ". #Remove a DHCP RangeTemplate #Get a DHCP RangeTemplate through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RangeTemplate". #Apply the changes $session->modify($object) or die("Modify DHCP Range Template failed: ". unless ($object) { die("Get DHCP Range Template failed: ". #submit the object for removal $session->remove($object) or die("Remove DHCP Range Template failed: ". $session->status_detail()). name => "custom_range_template". #Modify one of the attributes of the specified DHCP RangeTemplate $object->comment("modified comment"). $session->status_code() . ####PROGRAM ENDS#### AUTHOR Infoblox Inc. } print "Search DHCP RangeTemplate object found at least 1 matching entry\n". $session->status_detail()).Infoblox API Documentation #Search a DHCP RangeTemplate #Search a DHCP RangeTemplate through the session my @retrieved_objs = $session->search( object => "Infoblox::DHCP::RangeTemplate". $session->status_code() . ). print "DHCP Range Template object removed successfully \n". $session->status_detail()). $session->status_detail()). my $object = $retrieved_objs[0]. print "DHCP RangeTemplate object modified successfully \n". my $object = $retrieved_objs[0]. A) . #Get and modify a DHCP RangeTemplate #Get a DHCP RangeTemplate through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RangeTemplate". $session->status_code() . http://www. } print "Get DHCP RangeTemplate object found at least 1 matching entry\n". $session->status_code() .

NIOS 5. Infoblox::DHCP::ExclusionRangeTemplate. Infoblox::DHCP::Template. A) . Infoblox::DHCP::Option COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::DHCP::NetworkTemplate. Infoblox::DHCP::FilterRule::NAC. Infoblox::DHCP::FilterRule::UserClass. Infoblox::DHCP::FilterRule::RelayAgent.Infoblox API Documentation Infoblox::Session. Infoblox::DHCP::FilterRule::MAC. Infoblox::DHCP::Member.1r4 Page 297 (Rev.

CONSTRUCTOR NIOS 5. A) .Infoblox API Documentation Infoblox::DHCP::RoamingHost . NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS bootfile( ) bootserver( ) client_identifier_prepend_zero( ) comment( ) ddns_domainname( ) ddns_hostname( ) deny_bootp( ) dhcp_client_identifier( ) disable( ) discovered_name( ) discoverer( ) enable_ddns( ) extensible_attributes( ) first_discovered( ) ignore_dhcp_option_list_request( ) force_roaming_hostname( ) last_discovered( ) mac( ) match_client( ) netbios( ) network_component_description( ) network_component_ip( ) network_component_name( ) network_component_port_description( ) network_component_port_name( ) network_component_port_number( ) network_component_type( ) network_view( ) nextserver( ) options( ) os( ) override_ddns_domainname( ) port_duplex( ) port_link_status( ) port_speed( ) port_status( ) port_vlan_description( ) port_vlan_name( ) port_vlan_number( ) pxe_lease_time( ) name( ) template( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::RoamingHost .DHCP Roaming Host object.DHCP Roaming Host object. DESCRIPTION A Roaming Host is a specific host that a DHCP server always assigns when a lease request comes from a particular MAC address of the client.1r4 Page 298 (Rev.

#Optional / Default is "false" enable_ddns => "true" | "false". #Optional / Default is undefined ). SESSION METHODS This section describes all the methods in Infoblox::Session module that you can apply to a DHCP Roaming Host object. mac .3. $option3. $option2. "pxe_lease_time" => "3600". dhcp_client_identifier . #Optional / Default is undefined override_ddns_domainname => "true" | "false". #Optional / Default is empty ddns_domainname => $string. #Optional / Default is undefined ignore_dhcp_option_list_request => "true" | "false" | undef.com". $option6 ]. . #Optional / Default is "false" last_discovered => $string. Infoblox::Session->add( ) Use this method to add a DHCP Roaming Host object to the Infoblox appliance..domain. #Optional / Default is empty deny_bootp => "true" | "false". "deny_bootp" => "false".. #Submit for addition my $response = $session->add($roaming_host) $option4.com". "match_client" => "MAC".. The roaming host name. #Optional / Default is "MAC" network_view => $NetworkView.Optional. "ddns_domainname" => "ddns. }. #Optional / Default is empty match_client => "MAC" | "CLIENT_IDENTIFIER". $string => [ $string | $num. "comment" => "add roaming host using uid". #Optional / Default is empty template => $string. #Optional / Default is empty bootserver => $ipv4addr. "nextserver" => "3. "network_view" => $nview. #Required bootfile => $filename. #Optional / Default is empty client_identifier_prepend_zero => "true" | "false". "ddns_hostname" => "ddns. NIOS 5. "bootfile" => "bootfile".1r4 Page 299 (Rev. "disable" => "false". Example #Construct a DHCP Roaming Host object my $roaming_host = Infoblox::DHCP::RoamingHost->new( "name" => "JohnSmith". #Optional / Default is "false" dhcp_client_identifier => $string.. #Optional / Default is "default" network view nextserver => $ipv4addr. #Optional / Default is empty mac => $mac_addr. DHCP option 61 client identifier. Key References Apply the following attributes to get a specific DHCP Roaming Host object: name . ). #Optional / Default is "false" comment => $string. #Optional / Default is empty disable => "true" | "false".3.3".com". "bootserver" => "bootserver. "dhcp_client_identifier" => "foo". #Optional / Default value is "false" pxe_lease_time => $time. #Optional / Default is "false" force_roaming_hostname => "true" | "false".]. See Infoblox::Session->add() for parameters and return values. Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance.. #Optional / Default is empty options => [$option1.. #Optional / Default is "false" extensible_attributes => { $string => $string | $num. $option5. .Optional. See Infoblox::Session->get() for parameters and return values. "options" => [ $option1.domain. $option2. A) . ].Optional. "enable_ddns" => "false". #Optional / Default is empty ddns_hostname => $string.Infoblox API Documentation my $roaming_host = Infoblox::DHCP::RoamingHost -> new( name => $string. "client_identifier_prepend_zero" => "true".host. . MAC address of the roaming host.

Network view in which the roaming host is located. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RoamingHost". By default. Key References Apply the following attributes to search for a specific DHCP Roaming Host object: name . extensible_attributes . network_view => "default". mac => "11:11:11:11:11:11". #Find the desired object from the retrieved list.11". Examples # Search for all DHCP Roaming Host objects that are specified in the network "10. all network views are searched. See Infoblox::Session->search() for parameters and return values. By default. mac => "11:11:11:11:11. first use get() or search() to retrieve the specific DHCP Roaming Host. and then submit this object for removal.Optional. name => "JohnSmith".Optional. Example #Get DHCP Roaming Host object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RoamingHost". Infoblox::Session->modify( ) Use this method to modify a DHCP Roaming Host object in the Infoblox appliance. The roaming host name (regular expression). ). all network views are searched. network_view .Optional. mac . A hash reference containing extensible attributes. See Infoblox::Session->modify() for parameters and return values. my $desired_roaming_host = $retrieved_objs[0]. network_view => "default" ). Network view in which the roaming host is located. #Submit modification my $response = $session->modify( $roaming_host ).Optional. extensible_attributes . Infoblox::Session->search( ) Use this method to search for DHCP Roaming Host object and matching Host object with MAC address in the Infoblox appliance.Optional. MAC address of the roaming host (regular expression). #Submit for removal my $response = $session->remove( $desired_roaming_host ). ). my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RoamingHost".Optional.0. See Infoblox::Session->remove() for parameters and return values. A hash reference containing extensible attributes. Examples #Get DHCP Roaming Host object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RoamingHost". To remove a specific object. Infoblox::Session->remove( ) Use this method to remove a DHCP Roaming Host object from the Infoblox appliance. dhcp_client_identifier => "foo". extensible_attributes => { 'Site' => 'Santa Clara' }).Infoblox API Documentation network_view . my @retrieved_objs = $session->search( NIOS 5.1r4 Page 300 (Rev.0/8" in the "default" network view. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RoamingHost".0. Example #Use method to modify the pxe_lease_time $roaming_host->pxe_lease_time("1234"). A) . ).

will prepend a zero to the ASCII text. extensible_attributes => { 'Site' => 'Santa Clara' } ). Omit the parameter to retrieve the attribute value. rather than: option dhcp-client-identifier "foo". the method returns the attribute value. # Search for all DHCP Roaming Host objects with "Santa Clara" for the "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::RoamingHost". Returns NIOS 5. If you did not specify a parameter. and returns false when the operation fails. client_identifier_prepend_zero( ) Use this method to prepend "###BOT_TEXT###00" to the dhcp-client-identifier of a roaming host. Include the specified parameter to set the attribute value. it prefixes a 0 (zero) to the DHCP client identifier whenever option 61 is used to assign roaming hosts. So you may need to write: option dhcp-client-identifier "###BOT_TEXT###00foo". Example #Get bootfile my $bootfile = $roaming_host->bootfile(). bootfile( ) Use this method to set or retrieve the bootfile value of a DHCP Roaming Host object. the method returns true when the modification succeeds. Returns If you specified a parameter. mac => "11:11:11:11:11. METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a DHCP Roaming Host object. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. the method returns true when the modification succeeds. #Modify bootfile $roaming_host->bootfile("boot_file"). and returns false when the operation fails. Parameter The name of the server on which the boot file is stored.com"). Parameter When you set the client_identifier_prepend_zero parameter to "true". A) .Infoblox API Documentation object => "Infoblox::DHCP::RoamingHost". The following is an excerpt from "man dhcp-options": Please be aware that some DHCP clients. Include the specified parameter to set the attribute value. the method returns the attribute value. If you did not specify a parameter. #Modify bootserver $roaming_host->bootserver("bootserver2. network_view => "default" ). Example #Get bootserver my $bootserver = $roaming_host->bootserver(). when configured with client identifiers that are ASCII text.1r4 Page 301 (Rev. Parameter The name of the file the client must download. bootserver( ) Use this method to set or retrieve the bootserver of a DHCP Roaming Host object. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value.*".

Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true". Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. $object->override_ddns_domainname("false"). #Modify comment $roaming_host->comment("Modified DHCP Roaming Host object comment"). will set override_ddns_domainname to "false". Parameter Specify the DDNS domain name. Example #Get client_identifier_prepend_zero my $client_identifier_prepend_zero = $roaming_host->client_identifier_prepend_zero(). Example #Get comment my $comment = $roaming_host->comment(). $object>ddns_domainname("testdomain"). A) . Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false". and returns false when the operation fails.1r4 Page 302 (Rev. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. the method returns the attribute value. the last operation takes precedence. the method returns true when the modification succeeds and returns false when the operation fails. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. ddns_hostname( ) Use this method to set or retrieve the DDNS host name value of a DHCP Roaming Host object. Returns If you specified a parameter.Infoblox API Documentation If you specified a parameter. If you did not specify a parameter. #Modify the DDNS domain name $roaming_host->ddns_domainname("ddns. Thus the sequence $object->ddns_domainname("testdomain"). NIOS 5. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false". the method returns the attribute value.domain. Parameter Specify the DDNS host name. #Modify dhcp_client_identifier $roaming_host->client_identifier_prepend_zero("true"). Parameter Desired comment in string format with a maximum of 256 bytes. Returns If you specified a parameter. If you did not specify a parameter. ddns_domainname( ) Use this method to set or retrieve the DDNS domain name value of a DHCP Roaming Host object.com"). comment( ) Use this method to set or retrieve the descriptive comment of a DHCP Roaming Host object. will result in override_ddns_domainname="true". and returns false when the operation fails. If you did not specify a parameter. the method returns the attribute value. and returns false when the operation fails. the method returns true when the modification succeeds. Returns If you specified a parameter. Example #Get the DDNS domain name my $ddns_domainname = $roaming_host->ddns_domainname(). and the sequence $object->override_ddns_domainname("false").

Returns If you specified a parameter. the method returns true when the modification succeeds and returns false when the operation fails. the method returns the attribute value. A DHCP client identifier can be a string or a MAC address. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. dhcp_client_identifier( ) Use this method to set or retrieve the dhcp-client-identifier value of a DHCP Roaming Host object.ddns. Include the specified parameter to set the attribute value. Returns If you specified a parameter. If you did not specify a parameter. Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. The default value is "false". Set the "match_client" field to "CLIENT_IDENTIFIER" for roaming hosts to use the dhcp_client_identifier instead of the mac_address. Parameter Use the dhcp_client_identifier or uid to assign roaming hosts if the DHCP clients send option 61. A) . Example #Get the DDNS host name my $ddns_hostname = $roaming_host->ddns_hostname(). Returns If you specified a parameter.com"). #Modify dhcp_client_identifier $roaming_host->dhcp_client_identifier("foo"). Include the specified parameter to set the attribute value.domain. Omit the parameter to retrieve the attribute value.Infoblox API Documentation If you did not specify a parameter. disable( ) Use this method to set or retrieve the disable flag of a DHCP Roaming Host object. and returns false when the operation fails. the method returns true when the modification succeeds. Example #Get dhcp_client_identifier my $uid = $roaming_host->dhcp_client_identifier(). the method returns the attribute value. or $roaming_host->dhcp_client_identifier("1:11::11::11::11::11::12").1r4 Page 303 (Rev. the method returns true when the modification succeeds. #Modify deny_bootp $roaming_host->deny_bootp("true"). Include the specified parameter to set the attribute value. NIOS 5. the method returns the attribute value. and returns false when the operation fails. Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. Example #Get disable my $disable = $roaming_host->disable(). Omit the parameter to retrieve the attribute value. If you did not specify a parameter. Example #Get deny_bootp my $deny_bootp = $roaming_host->deny_bootp(). #Modify the DDNS host name $roaming_host->ddns_hostname("host. The default value is "false". deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP Roaming Host object. the method returns the attribute value.

For email. Omit the parameter to retrieve the attribute value. Parameter Specify "true" to set the enable_ddns flag or "false" to deactivate/unset it. Parameter none Returns The method returns the discovered name. the value is a string with a maximum of 64 characters. Parameter none Returns The method returns the discoverer value. #Modify enable_ddns $roaming_host->enable_ddns("true"). Example #Get discoverer my $discoverer = $roaming_host->discoverer(). the method returns true when the modification succeeds. URL. Returns NIOS 5. If you did not specify a parameter. and string types. The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. For a list. the value is a string with a maximum of 256 characters. 1970 UTC. Example #Get discovered_name my $discovered_name = $roaming_host->discovered_name(). The default value is "false". discoverer( ) Use this method to retrieve the discoverer of a DHCP Roaming Host object.Infoblox API Documentation #Modify disable $roaming_host->disable("true"). The default value is undefined. then the A and PTR records corresponding to the Roaming Host object will be placed on the DNS server. For an integer. the value is an integer from -2147483648 through 2147483647. enable_ddns( ) Use this method to set or retrieve the enable_ddns flag of a DHCP Roaming Host object. A) . Returns If you specified a parameter. the method returns the attribute value. discovered_name( ) Use this method to retrieve the discovered name of a DHCP Roaming Host object. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP Roaming Host object Include the specified parameter to set the attribute value. the value is the number of seconds that have elapsed since January 1st. If enable_ddns value is specified as "true".1r4 Page 304 (Rev. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Example #Get enable_ddns my $enable_ddns = $roaming_host->enable_ddns(). Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. For a date.

The default value is "false". and returns false when the operation fails. the method returns true when the modification succeeds. The default value is false which indicates that this attribute inherit the member level setting. and returns false when the operation fails. Example # Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $roaming_host->ignore_dhcp_option_list_request(). Parameter Specify "true" to set the force_roaming_hostname flag or "false" to deactivate/unset it. # Modify ignore_dhcp_option_list_request $roaming_host->ignore_dhcp_option_list_request("true"). Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. the method returns the attribute value. Example #Get force_roaming_hostname my $force_roaming_hostname = $roaming_host->force_roaming_hostname(). then the roaming host name will be used as the ddns_hostname. If you did not specify a parameter. first_discovered( ) Use this method to retrieve the date and time that the DHCP Roaming Host object was first discovered. 'Administrator' => [ 'Peter'. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. NIOS 5. the method returns the attribute value. If you did not specify a parameter. If this flag is set to false all the defined DHCP options will be returned to the client. Example #Get first_discovered my $first_discovered = $roaming_host->first_discovered(). # Un-override ignore_dhcp_option_list_request $roaming_host->ignore_dhcp_option_list_request(undef). Parameter none Returns The method returns the date and time that the DHCP Roaming Host object was first discovered. the method returns the attribute value. #Modify extensible attributes $roaming_host->extensible_attributes({ 'Site' => 'Santa Clara'. force_roaming_hostname( ) Use this method to set or retrieve the force_roaming_hostname flag of a DHCP Roaming Host object. Include the specified parameter to set the attribute value.. If the force_roaming_hostname value is "true". ignore_dhcp_option_list_request( ) Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP roaming host object. 'Tom' ] }). and returns false when the operation fails. Returns If you specified a parameter. A) .Infoblox API Documentation If you specified a parameter. Returns If you specified a parameter.1r4 Page 305 (Rev. Parameter Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate/unset it. Example #Get extensible attributes my $ref_extensible_attributes = $roaming_host->extensible_attributes(). If you did not specify a parameter. the method returns true when the modification succeeds.

The default value for this field is empty. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. A) . mac( ) Use this method to set or retrieve the MAC address value of a DHCP Roaming Host object. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. Format for the hexadecimal strings for MAC addresses and vendor prefixes with colons or dashes. netbios( ) Use this method to retrieve the name in the NetBIOS reply that responded to a NetBIOS query. If you did not specify a parameter. Parameter MAC Address of the DHCP roaming host object. Returns The method returns the attribute value. Example NIOS 5. Parameter N/A Returns The method returns the attribute value.1r4 Page 306 (Rev. Include the specified parameter to set the attribute value. Example #Get mac my $mac = $roaming_host->mac(). #Modify mac $roaming_host->mac("11::11::11::11::11::12"). the method returns the attribute value. If you did not specify a parameter. Parameter match_client "MAC": The fixed IP address is leased to the matching MAC address. Example #Get last_discovered my $last_discovered = $roaming_host->last_discovered().Infoblox API Documentation #Modify force_roaming_hostname $roaming_host->force_roaming_hostname("true"). and returns false when the operation fails. the method returns the attribute value. last_discovered( ) Use this method to retrieve the time this object was last seen by a discovery job. match_client "CLIENT_IDENTIFIER": The fixed IP address is leased to the matching DHCP client identifier Returns If you specified a parameter. Example #Get match_client my $match_client = $roaming_host->match_client(). Both of the following formats are acceptable: 11:11:11:11:11:11 and 11-11-11-11-11-11. match_client( ) Use this method to set or retrieve the match_client value of a DHCP Roaming Host object. #Modify match_client $roaming_host->match_client("CLIENT_IDENTIFIER"). and returns false when the operation fails. the method returns true when the modification succeeds. Returns If you specified a parameter.

1r4 Page 307 (Rev. Parameter none Returns The method returns the description of the port on the network device. network_component_description( ) Use this method to retrieve the description of the network device that is connected to the DHCP Roaming Host object. Example #Get network_component_ip my $network_component_ip = $roaming_host->network_component_ip(). Parameter none Returns The method returns the network device description. Example #Get network_component_port_description my $network_component_port_description = $roaming_host->network_component_port_description(). Example #Get network_component_description my $network_component_description = $roaming_host->network_component_description().Infoblox API Documentation #Get netbios my $netbios = $roaming_host->netbios(). Parameter none Returns The method returns the IP address of the network device. Example #Get network_component_name my $network_component_name = $roaming_host->network_component_name(). Parameter NIOS 5. network_component_name( ) Use this method to retrieve the name of the network device that is connected to the DHCP Roaming Host object. network_component_ip( ) Use this method to retrieve the IP address of the network device that is connected to the DHCP Roaming Host object. network_component_port_name( ) Use this method to retrieve the name of the network device port that is connected to the DHCP Roaming Host object. Parameter none Returns The method returns the network device name. A) . network_component_port_description( ) Use this method to retrieve the description of the network device port that is connected to the DHCP Roaming Host object.

Infoblox API Documentation none Returns The method returns the name of the port on the network device. the method returns true when the modification succeeds. nextserver( ) Use this method to set or retrieve the nextserver value of a DHCP Roaming Host object. The default network view value is the system-defined default network view object.1r4 Page 308 (Rev. Example #Get network_component_port_number my $network_component_port_number = $roaming_host->network_component_port_number(). Include the specified parameter to set the attribute value. Example #Get network_component_type my $network_component_type = $roaming_host->network_component_type(). network_component_port_number( ) Use this method to retrieve the number of the network device port that is connected to the DHCP Roaming Host object. and returns false when the operation fails. Example #Get network view my $nview = $roaming_host->network_view(). Returns If you specified a parameter. Parameter NIOS 5. Parameter none Returns The method returns the network device port number in the range 0-9999. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. #Modify network view. with an Infoblox::DHCP::View object $roaming_host->network_view($nview). If you did not specify a parameter. network_view( ) Use this method to set or retrieve the network view of the DHCP roaming host Include the specified parameter to set the attribute value. the method returns the attribute value. Parameter none Returns The method returns the network device type. which means the roaming host is in the default network view. Parameter Valid value is a defined Infoblox::DHCP::View object. A) . network_component_type( ) Use this method to retrieve the type of the network device that is connected to DHCP Roaming Host object. The default value is the "default" network view. Example #Get network_component_port_name my $network_component_port_name = $roaming_host->network_component_port_name().

the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. Example #Get options my $options = $roaming_host->options(). Returns If you specified a parameter. Returns The method returns the attribute value. $option2]). and returns false when the operation fails. Include the specified parameter to set the attribute value. override_ddns_domainname( ) The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP Roaming Host is used. the method returns the attribute value. It is also set implicitly when ddns_domainname is set to a defined value. instead of the grid default. os( ) Use this method to retrieve the operating system associated with this roaming host.1r4 Page 309 (Rev. Omit the parameter to retrieve the attribute value. Parameter Set the parameter to "true" to override the grid-level setting for ddns_domainname. Returns If you specified a parameter. Parameter Options describe network configuration settings and various services available on the network. A) . the method returns true when the modification succeeds. the method returns true when the modification succeeds. #Modify options $roaming_host->options([$option1. The override_ddns_domainname attribute can be specified explicitly. If you did not specify a parameter. Example NIOS 5. Example #Get os my $os = $roaming_host->os(). See Infoblox::DHCP::Option for parameters and methods available for this object. These options occur as variablelength fields at the end of DHCP messages. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Set the parameter to "false" to inherit the grid-level setting for ddns_domainname.4"). the method returns the attribute value. If you did not specify a parameter. and returns false when the operation fails. options( ) Use this method to set or retrieve the options of a DHCP Roaming Host object. the method returns the attribute value.3.3.Infoblox API Documentation IP address of the boot file server on which the boot file is stored. The default value of this parameter is "false". #Modify nextserver $roaming_host->nextserver("3. Returns If you specified a parameter. Example #Get nextserver my $nextserver = $roaming_host->nextserver(). and returns false when the operation fails.

Parameter none Returns The method returns the network device port speed. Parameter none Returns The method returns the network device port status. Parameter none Returns The method returns the port duplex setting. if any. #Modifying override_ddns_domainname $roaming_host->override_ddns_domainname("true"). are one of the following: NIOS 5. are one of the following: Full Half Example #Get port_duplex my $port_duplex = $roaming_host->port_duplex(). port_status( ) Use this method to retrieve the status of the network device port that is connected to the DHCP Roaming Host object. A) . port_duplex( ) Use this method to retrieve the duplex setting of the network device port that is connected to the DHCP Roaming Host object. are one of the following: 10 M 100 M 1G 10G 100G Unknown Example #Get port_speed my $port_speed = $roaming_host->port_speed(). Returned values. Returned values. if any. Parameter none Returns The method returns the network device port link status. Returned values.Infoblox API Documentation #Getting override_ddns_domainname my $override_ddns_domainname=$roaming_host->override_ddns_domainname( ). port_link_status( ) Use this method to retrieve the link status of the network device port that is connected to the DHCP Roaming Host object. Returned values. are one of the following: Connected Not Connected Unknown Example #Get port_link_status my $port_link_status = $roaming_host->port_link_status(). port_speed( ) Use this method to retrieve the speed of the network device port that is connected to the DHCP Roaming Host object.1r4 Page 310 (Rev. if any. if any.

Example #Get port_vlan_description my $port_vlan_description = $roaming_host->port_vlan_description(). Returns If you specified a parameter.1r4 Page 311 (Rev. the method returns true when the modification succeeds. A) . port_vlan_number( ) Use this method to retrieve the VLAN number of the network device port that is connected to the DHCP Roaming Host object. If you did not specify a parameter. the method returns the attribute value. pxe_lease_time( ) Use this method to set or retrieve the pxe_lease_time value of a DHCP Roaming Host object. port_vlan_name( ) Use this method to retrieve the VLAN name of the network device port that is connected to the DHCP Roaming Host object. Omit the parameter to retrieve the attribute value. and download the file it needs to boot. Example #Get port_vlan_name my $port_vlan_name = $roaming_host->port_vlan_name(). Parameter none Returns The method returns the network device port VLAN name. Parameter none Returns The method returns the VLAN description of the network device port. NIOS 5. Hours. Parameter Enter appropriate values in the Days. Parameter none Returns The method returns the port VLAN number in the range 0-9999. Example #Get port_vlan_number my $port_vlan_number = $roaming_host->port_vlan_number(). such as a TFTP server. and returns false when the operation fails. port_vlan_description( ) Use this method to retrieve the VLAN description of the network device port that is connected to the DHCP Roaming Host object.Infoblox API Documentation Up Down Unknown Example #Get port_status my $port_status = $roaming_host->port_status(). Mins and Secs fields. User can specify the duration of time it takes a host to connect to a boot server. Include the specified parameter to set the attribute value.

#appliance host ip username => "admin". #Modify pxe_lease_time $roaming_host->pxe_lease_time("369"). Template is the name of a DHCP Fixed Address template which will be used to create the DHCP Roaming Host. and returns false when the operation fails. template( ) Use this method to set the fixed address template name for a DHCP Roaming Host object. use Infoblox. modify. If you did not specify a parameter. and remove. the method returns true when the modification succeeds. #Submit for addition my $response = $session->add($roaming_host) SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. #Preparation prior to a DHCP Fixed Address object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. you must set the dynamic attribute to "true" and allow roaming hosts at the grid level by setting $griddhcp->enable_roaming_hosts("true"). A) . Include the specified parameter to set the attribute value. Example #Get roaming host name my $roaming_host_name = $roaming_host->name().168.1r4 Page 312 (Rev. the method returns the attribute value. Omit the parameter to retrieve the attribute value.1. and returns false when the operation fails. Example #Add RoamingHost with template my $roaming_host = Infoblox::DHCP::RoamingHost->new( "name" => "JohnSmith". NOTE: To enable using roaming hosts. Returns The method returns true when the modification succeeds. The template parameter can be used to only add a new DHCP Roaming Host and cannot be used during object modify or returned during object get. This sample also includes error handling for the operations. NIOS 5. "template" => "Template_Name". ). Parameter The valid name in string format. #Modify roaming host name $roaming_host->name("JimmyJaz"). name( ) Use this method to set or retrieve the roaming host name associated with the DHCP Roaming Host object. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. Parameter Desired roaming host name in string format with a maximum of 64 bytes. search.Infoblox API Documentation Example #Get pxe_lease_time my $pxe_lease_time = $roaming_host->pxe_lease_time(). Returns If you specified a parameter.2". #appliance user login password => "infoblox" #appliance password ).

} print "DHCP Roaming Host object created successfully\n".com". "enable_ddns" => "true". safe to add the roaming host\n". ). "value" => "50" ). Infoblox::status_code() . Infoblox::status_code() . A) . "pxe_lease_time" => "3600". "nextserver" => "3. "ipv4addrs" => ["10. #Adding DHCP options my $option1 = Infoblox::DHCP::Option->new( "name" => "lease-time".3".Infoblox API Documentation unless ($session) { die("Construct session failed: ". #Create a DHCP Roaming Host object #Create a DHCP Roaming Host object my $roaming_host = Infoblox::DHCP::RoamingHost->new( "name" => "JohnSmith".0. } print "Session created successfully\n". Infoblox::status_code() . ":" .1r4 Page 313 (Rev. my $save_grid_rh_status=$grid_dhcp->enable_roaming_hosts().3. } print "Get Grid DHCP object found at least 1 matching entry\n".1".0. name=>"Infoblox" ). $session->status_detail()). ). "comment" => "add roaming host". unless($session->modify($grid_dhcp)) { die("Modifying Grid DHCP object failed: "."10. unless($option1) { die("Construct option1 object failed: ". $grid_dhcp->enable_roaming_hosts("true"). unless($option2) { die("Construct option2 object failed: ". unless ($object) { print "roaming host does not exist on server. $session->status_detail()). ":" . Infoblox::status_code() .com". } print "option2 object created successfully\n". NIOS 5. #Verify if the DHCP Roaming Host exists in the Infoblox appliance my $object = $session->get(object => "Infoblox::DHCP::RoamingHost". ":" .0. Infoblox::status_detail()). $option2 ]. $session->status_code() . "mac" => "00:00:00:11:11:11". mac => "00:00:00:11:11:11").3. unless($roaming_host) { die("Construct roaming host failed: ". Infoblox::status_detail()). ":" . "bootserver" => "someserver.0. unless ($grid_dhcp) { die("Get Grid DHCP object failed: ". "bootfile" => "bootfile. #Modify Grid DHCP object to enable support of the Roaming Hosts my $grid_dhcp=$session->get( object => "Infoblox::Grid::DHCP". ":" . "options" => [ $option1 . $session->add($roaming_host) or die("Add roaming host failed: ". ":" . } print "Roaming Hosts enabled at Grid level successfuly\n".255"]. Infoblox::status_detail()). } print "option1 object created successfully\n". $session->status_code() . Infoblox::status_detail()). my $option2 = Infoblox::DHCP::Option->new( "type" => "routers".

my $object = $retrieved_objs[0]. unless ($object) { die("Get Roaming Host object failed: ". unless ($object) { die("Get Roaming Host object failed: ". print "Roaming Host object removed successfully \n". #Remove a Roaming Host object #Get Roaming Host object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RoamingHost". A) . #Modify one of the attributes of the obtained Roaming Host object $object->pxe_lease_time("1234"). $session->status_detail()). #Submit the object for removal $session->remove($object) or die("Remove Roaming Host object failed: ". my $object = $retrieved_objs[0].1r4 Page 314 (Rev. } print "Search Roaming Host object found at least 1 matching entry\n". } print "DHCP Roaming Host added successfully\n". unless ($object) { die("Search for Roaming Host object failed: ". #Get and modify a DHCP Roaming Host object #Get DHCP Roaming Host object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::RoamingHost". ":" . ":" . mac => "00:00:00:11:11. $session->status_code() . http://www. Infoblox::Session- NIOS 5. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. mac => "00:00:00:11:11:11". ":" . mac => "00:00:00:11:11:11". Infoblox::Session->remove().Infoblox API Documentation $session->status_code() . #Restore Grid DHCP $grid_dhcp->enable_roaming_hosts($save_grid_rh_status). #Apply the changes $session->modify($object) or die("Modify Roaming Host object failed: ". print "Roaming Host object modified successfully \n". Infoblox::Session->get(). } print "Get Roaming Host object found at least 1 matching entry\n". $session->status_detail()). ":" .com/ SEE ALSO Infoblox::Session->add(). $session->status_code() . Infoblox::Session->modify(). $session->status_detail()). ). $session->status_detail()). my $object = $retrieved_objs[0]. ":" .infoblox. $session->status_code() . $session->status_detail()). } print "Get Roaming Host object found at least 1 matching entry\n". ":" . ). #Search for a specific DHCP Roaming Host object #Search for all DHCP Roaming Host objects with a given mac address my @retrieved_objs = $session->search( object => "Infoblox::DHCP::RoamingHost". ). $session->status_code() . $session->status_code() .*". $session->status_detail()). print "Grid DHCP setting restored successfully\n" if($session->modify($grid_dhcp)).

NIOS 5. A) .1r4 Page 315 (Rev.Infoblox API Documentation >search(). Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.

. #Optional / Default is undefined comment => $string | undef.30. you must first create the subnetworks. networks => [ $Network1.. is undefined ddns_server_always_updates => "true" | "false".DHCP Shared Network object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS authority( ) bootfile( ) bootserver( ) comment( ) ddns_generate_hostname( ) ddns_server_always_updates( ) ddns_update_fixed_addresses( ) ddns_ttl( ) ddns_use_option81( ) deny_bootp( ) disable( ) enable_ddns( ) extensible_attributes( ) ignore_dhcp_option_list_request( ) lease_scavenge_time( ) name( ) networks( ) network_view( ) nextserver( ) options( ) override_ddns_ttl( ) override_lease_scavenge_time( ) override_update_dns_on_lease_renewal( ) pxe_lease_time( ) update_dns_on_lease_renewal( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::SharedNetwork .0 before designating them as a shared network. is undefined NIOS 5. is "true" ddns_update_fixed_addresses => "true" | "false" | undef.0 and 10. you must first create the networks 10. Before creating a shared network. is undefined bootfile => $filename | undef. CONSTRUCTOR my $sharednetwork = Infoblox::DHCP::SharedNetwork->new( name => $string. A) . is undefined bootserver => $ipv4addr | $fqdn | undef.1r4 #Required #Required #Optional / Default #Optional / Default #Optional / Default #Optional / Default #Optional / Default #Optional / Default Page 316 (Rev.DHCP Shared Network object DESCRIPTION You can create a shared network when two subnets share a particular network segment.Infoblox API Documentation Infoblox::DHCP::SharedNetwork . is undefined ddns_generate_hostname => "true" | "false" | undef.0.]. For example. authority => "true" | "false" | undef..32.$Network2.1.

=> "true" | "false". The network view in which the shared network is located. #Optional / Default is undefined ignore_dhcp_option_list_request => "true" | "false" | undef. Example my @result_array object name network_view = $session->get( => "Infoblox::DHCP::SharedNetwork" ..0. #Optional / Default #Optional / Default #Optional / Default #Optional / Default #Optional / Default extensible_attributes => { $string => $string | $num. => "true" | "false" | undef. => "myname".Required. network_view . #Optional / Default value is "false" override_update_dns_on_lease_renewal => "true" | "false". }..Infoblox API Documentation ddns_ttl is zero ddns_use_option81 is undefined deny_bootp is undefined disable is "false" enable_ddns is undefined => $num.$Option2. SESSION METHODS This section describes all the methods in Infoblox::Session module that you can apply to a DHCP shared network object. #Optional / Default value is "false" ). Infoblox::Session->add( ) Use this method to add a shared network object to the Infoblox appliance.Optional. #Optional / Default is "false" lease_scavenge_time => $number.]. ). Key References Apply the following attributes to get a specific DHCP shared network object: name . => "true" | "false" | undef.Optional. $string => [ $string | $num. #Construct an object shared network my $sharednetwork = Infoblox::DHCP::SharedNetwork->new( name => "myname". networks => [$network1]. #Optional / Default is undefined update_dns_on_lease_renewal => "true" | "false". .0. #Optional / Default is undefined options => [$Option1. Infoblox::Session->get( ) Use this method to retrieve all the matching shared network objects from the Infoblox appliance. .1r4 Page 317 (Rev.. By default. #Optional / Default is -1 network_view => $NetworkView. The name of the shared network in string format. extensible_attributes . See Infoblox::Session->add() for parameters and return values. => "true" | "false" | undef.. # Submit for adding sharednetwork my $response = $session->add( $sharednetwork ).. A hash reference containing extensible attributes. #Optional / Default value is "false" override_lease_scavenge_time => "true" | "false". ]. #Optional / Default is "default" network view nextserver => $ipv4addr | $fqdn | undef... #Optional / Default is empty list override_ddns_ttl => "true" | "false".0/8". => "default" NIOS 5. #Optional / Default value is "false" pxe_lease_time => $num | undef. ). all network views are searched. See Infoblox::Session->get() for parameters and return values. Example #Construct an object for network my $network1 = Infoblox::DHCP::Network->new( network => "20. A) .

$object->enable_ddns("true"). Infoblox::Session->remove( ) Use this method to remove a shared network object from the Infoblox appliance.Optional. Example # Get the object under the same name my @result_array = $session->get( object => "Infoblox::DHCP::SharedNetwork" . Infoblox::Session->modify( ) Use this method to modify a shared network object in the Infoblox appliance. network_view . The name of the shared network in string format (regular expression). # Submit for removal my $response = $session->remove( $desired_network ). first use get() or search() to retrieve the specific object. This setting overrides the member-level settings. See Infoblox::Session->remove() for parameters and return values. A hash reference containing extensible attributes. By default. To remove a specifc object. name => "my. my $desired_network = $result_array[0]. # find the desired object from retrieved list. name => "myname".Required. network_view => "default" ). See Infoblox::Session->modify() for parameters and return values. extensible_attributes .Optional. Example # search for all DHCP shared network objects in the "default" network view my @retrieved_objs = $session->search( object => "Infoblox::DHCP::SharedNetwork". METHODS This section describes all the methods that you can use to configure and retrieve the attribute values of DHCP a shared network object authority( ) Use this method to set or retrieve the authority flag of a shared network object. The network view in which the shared network is located. Parameter NIOS 5. # Submit modification my $response = $session->modify( $object ).1r4 Page 318 (Rev. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. Key References Apply the following attributes to search for a DHCP shared network object: name . and then submit this object for removal. all network views are searched. See Infoblox::Session->search() for parameters and return values.Infoblox API Documentation ). Example #Use method to modify enable_ddns method. extensible_attributes => { 'Site' => 'Santa Clara' } ).*". network_view => "default" ). A) . Infoblox::Session->search( ) Use this method to search for DHCP shared network object in the Infoblox appliance. # search all Shared Networks Templates with a given extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::SharedNetwork".

The default value is undefined. You can configure the DHCP server to support clients that use the boot file name option in their DHCPREQUEST messages. This option is overridden independently from Infoblox::DHCP::SharedNetwork->bootfile() and Infoblox::DHCP::SharedNetwork>nextserver(). the method returns the attribute value. # Modify bootserver $sharednetwork->bootserver("abc. The default value is undefined. the method returns true when the modification succeeds. which indicates that this attribute is inherited from the member. #Un-override bootserver $sharednetwork->bootserver(undef). Returns If you specified a parameter. NIOS 5. bootserver( ) Use this method to set or retrieve the bootserver attribute of a shared network object. Omit the parameter to retrieve the attribute value. The FQDN consists of the host name followed by the domain name (example: abc. The file name must be in string format and can have a maximum of 128 characters. This setting overrides the member-level settings. Returns If you specified a parameter. Include the specified parameter to set the attribute value. Example # Get authority my $authority = $sharednetwork->authority() # Modify authority $sharednetwork->authority("true"). and returns false when the operation fails. which indicates that this attribute is inherited from the member.1r4 Page 319 (Rev. A boot server name can have a maximum of 256 bytes. Parameter The name of the file that the client must download. If you did not specify a parameter. You can specify the name and/or IP address of the boot server that the host must access in order to boot. the method returns true when the modification succeeds. #Un-override bootfile $sharednetwork->bootfile(undef). The default value for this field is undefined. Example # Get bootfile my $bootfile = $sharednetwork->bootfile(). the method returns the attribute value. Include the specified parameter to set the attribute value. A) . and returns false when the operation fails. The default value is undefined.com"). Returns If you specified a parameter. # Modify bootfile $sharednetwork->bootfile("bootfile1"). If you did not specify a parameter. the method returns the attribute value.domain. bootfile( ) Use this method to set or retrieve a bootfile attribute of a shared network object. and returns false when the operation fails. Parameter The boot server IP address or name in FQDN (Fully Qualified Domain Name) format.Infoblox API Documentation Specify "true" to set the authority flag or "false" to deactivate/unset it. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. which indicates that this attribute is inherited from the member-level setting. The default value is undefined. This option is overridden independently from Infoblox::DHCP::SharedNetwork->bootserver() and Infoblox::DHCP::SharedNetwork>nextserver(). This setting overrides the member-level settings.com). Example # Get bootserver my $bootserver = $sharednetwork->bootserver(). the method returns true when the modification succeeds.

#Un-override $sharednetwork->ddns_generate_hostname(undef). the method returns the attribute value. the method returns true when the modification succeeds. and returns false when the operation fails. If you did not specify a parameter. The default value for this field is "true". and returns false when the operation fails. # Modify comment $sharednetwork->comment("add a shared network"). Include the specified parameter to set the attribute value. By default. the DHCP server does NIOS 5. This setting overrides the member-level settings. If you did not specify a parameter. Example # Get ddns_generate_hostname my $ddns_generate_hostname = $sharednetwork->ddns_generate_hostname() # Modify ddns_generate_hostname $sharednetwork->ddns_generate_hostname("true"). and returns false when the operation fails. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. ddns_generate_hostname( ) Use this method to set or retrieve the ddns_generate_hostname flag of a shared network object. Include the specified parameter to set the attribute value. Parameter Specify "true" to allow only the DHCP server to update DNS or "false" to deactivate/unset it. Returns If you specified a parameter. Omit the parameter to retrieve the attribute value. ddns_server_always_updates( ) Use this method to set or retrieve the ddns_server_always_updates flag of a shared network object. Returns If you specified a parameter. If you did not specify a parameter.1r4 Page 320 (Rev.regardless of the requests from the DHCP clients. the method returns the attribute value. which indicates that this attribute is inherited from the member-level setting. Enable this method to allow only the DHCP server to update DNS. Include the specified parameter to set the attribute value. ddns_update_fixed_addresses( ) Use this method to set or retrieve the ddns_update_fixed_addresses flag of a shared network object.Infoblox API Documentation comment( ) Use this method to set or retrieve a descriptive comment for a shared network object. Example # Get ddns_server_always_updates my $ddns_server_always_updates = $sharednetwork->ddns_server_always_updates() # Modify ddns_server_always_updates $sharednetwork->ddns_server_always_updates("true"). Enable this method to allow only the DHCP server to generate host name. Parameter Enter a descriptive comment for the network in string format with a maximum of 256 bytes. The default value for this field is undefined. Parameter Specify "true" to generate the host name or "false" to deactivate/unset it. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. A) . Returns If you specified a parameter. the method returns the attribute value. Example # Get comment my $comment = $sharednetwork->comment().

will result in override_ddns_ttl="true". the DHCP server never discards the records. #Un-override $sharednetwork->ddns_update_fixed_addresses(undef). A) . Omit the parameter to retrieve the attribute value. Note that when ddns_ttl is set to a defined value and override_dddns_ttl is set to "false". that the update is cached.Infoblox API Documentation not update DNS when it allocates a fixed address to a client. $object->ddns_ttl(12). This setting overrides the member-level settings. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. Example # Get ddns_update_fixed_addresses my $ddns_update_fixed_addresses= $sharednetwork->ddns_update_fixed_addresses() # Modify ddns_update_fixed_addresses $sharednetwork->ddns_update_fixed_addresses("true"). Zero indicates that the update should not be cached. the last operation takes precedence. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. ddns_ttl( ) Use this method to set or retrieve the DNS update Time to Live (TTL) value of a shared network object. The default value for this field is undefined. the method returns the attribute value. You can configure the DHCP server to update the A and PTR record of clients with fixed addresses. Parameter Specify "true" to update DNS when the device allocates a fixed address to a client or "false" to deactivate/unset it. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Example #Get DNS Update ttl my $dns_ttl = $sharednetwork->ddns_ttl(). and the sequence $object>override_ddns_ttl("false"). Setting this method to a defined value implicitly sets the override_ddns_ttl method to "true". ddns_use_option81( ) Use this method to set or retrieve the ddns_use_option81 flag of a shared network object. Example # Get ddns_use_option81 my $ddns_use_option81 = $sharednetwork->ddns_use_option81() NIOS 5. The default value for this field is undefined. and returns false when the operation fails. Include the specified parameter to set the attribute value. Set this flag to define the settings for option 81 at the network level. If you did not specify a parameter. This setting overrides the member-level settings. the method returns true when the modification succeeds. the method returns the attribute value. Returns If you specified a parameter. Parameter Specify "true" to configure support for option 81 or "false" to deactivate/unset it. and returns false when the operation fails. When you enable this feature and the DHCP server adds A and PTR records for a fixed address. Include the specified parameter to set the attribute value. If you did not specify a parameter. #Modify DNS Update ttl $sharednetwork->ddns_ttl(1200). The default value is zero. Returns If you specified a parameter. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_ttl attribute to "false". $object->override_ddns_ttl("false"). the method returns the attribute value.in seconds. will set override_ddns_ttl to "false".1r4 Page 321 (Rev. Thus the sequence $object->ddns_ttl(12). Returns If you specified a parameter. Parameter A 32-bit integer (range from 0 to 4294967295) that represents the duration. the method returns true when the modification succeeds.

which indicates that this attribute is inherited from the member-level setting. Returns If you specified a parameter. Example # Get disable my $disable = $sharednetwork->disable() # Modify disable $sharednetwork->disable("true"). If you did not specify a parameter. #Modify deny_bootp $sharednetwork->deny_bootp("true"). Include the specified parameter to set the attribute value. which indicates that this attribute is inherited from the member-level setting. enable_ddns( ) Use this method to set or retrieve the dynamic DNS updates flag of a DHCP shared network object. If you did not specify a parameter. the method returns the attribute value. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. deny_bootp( ) Use this method to set or retrieve the deny_bootp flag of a DHCP Shared Network object. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter.Infoblox API Documentation # Modify ddns_use_option81 $sharednetwork->ddns_use_option81("true"). # un-override ddns_use_option81 $sharednetwork->ddns_use_option81(undef). the method returns true when the modification succeeds. # Un-override enable_ddns $sharednetwork->enable_ddns(undef). the method returns the attribute value. the method returns the attribute value. disable( ) Use this method to set or retrieve the disable flag of a shared network object. Example # Get enable_ddns my $enable_ddns = $sharednetwork->enable_ddns() # Modify enable_ddns $sharednetwork->enable_ddns("true"). Include the specified parameter to set the attribute value. Parameter Specify "true" to set the dynamic DNS updates flag or "false" to deactivate/unset it. Parameter Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. NIOS 5. and returns false when the operation fails. Returns If you specified a parameter. The DHCP server can send DDNS updates to DNS servers in the same grid and to external DNS servers. the method returns true when the modification succeeds. Parameter Specify "true" to set the disable flag and disable the shared network or "false" to unset the flag and enable the shared network. A) . The default value is undefined. and returns false when the operation fails. The default value for this field is undefined. the method returns true when the modification succeeds. and returns false when the operation fails. This setting overrides the member-level settings. Example #Get deny_bootp my $deny_bootp = $sharednetwork->deny_bootp(). The default value for this field is "false".1r4 Page 322 (Rev.

For a date. will result in override_lease_scavenge_time="true". Returns If you specified a parameter. the value is a string with a maximum of 64 characters.Infoblox API Documentation extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a Shared Network object. Note that when lease_scavenge_time is set to a defined value and override_lease_scavenge_time is set to "false". Omit the parameter to retrieve the attribute value. the last operation takes precedence. Returns If you specified a parameter. # Un-override ignore_dhcp_option_list_request $sharednetwork->ignore_dhcp_option_list_request(undef). and the sequence $object->override_lease_scavenge_time("false"). For email. 'Administrator' => [ 'Peter'. To disable lease scavenging. The default value of this parameter is -1. the method returns the attribute value. Include the specified parameter to set the attribute value. The default value is false which indicates that this attribute inherit the member level setting. the method returns true when the modification succeeds. and string types. Example # Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $sharednetwork->ignore_dhcp_option_list_request(). and returns false when the operation fails. the method returns the attribute value. Omit the parameter to retrieve the attribute value. The minimum positive value must be greater than 86400 seconds (1 day). Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. Parameter An integer that specifies the period of time. Include the specified parameter to set the attribute value. Setting this method to a defined value implicitly sets the override_lease_scavenge_time method to "true". will set override_lease_scavenge_time to "false". the value is the number of seconds that have elapsed since January 1st. Include the specified parameter to set the attribute value. This setting overrides the member level settings. and returns false when the operation fails. Setting the parameter to undefined causes the appliance to use the default from the upper level and automatically resets the override_lease_scavenge_time attribute to "false". 1970 UTC. in seconds. If this flag is set to true all the defined DHCP options will be returned to the client. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. $object->override_lease_scavenge_time("false"). # Modify ignore_dhcp_option_list_request $sharednetwork->ignore_dhcp_option_list_request("true").. 'Tom' ] }). A) . URL. lease_scavenge_time( ) Use this method to set or retrieve the lease_scavenge_time value of a Shared Network object. #Modify extensible attributes $shared_network->extensible_attributes({ 'Site' => 'Santa Clara'. If you did not specify a parameter. which means that lease scavenging is disabled. If you did not specify a parameter. set the parameter to -1. For a list. Returns NIOS 5. For an integer. that free and backup leases remain in the database before they are automatically deleted. Parameter Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate/unset it. Example #Get extensible attributes my $ref_extensible_attributes = $shared_network->extensible_attributes(). ignore_dhcp_option_list_request( ) Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP shared network object. the value is an integer from -2147483648 through 2147483647. $object>lease_scavenge_time(604800). Thus the sequence $object->lease_scavenge_time(604800). The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database.1r4 Page 323 (Rev. The default value is undefined. the value is a string with a maximum of 256 characters.

which means the DHCP shared network is in the default network view.Infoblox API Documentation If you specified a parameter. Omit the parameter to retrieve the attribute value. networks( ) Use this method to retrieve the DHCP networks attribute of a shared network object. $network2]). and returns false when the operation fails. A name can have a maximum of 32 characters. the method returns true when the modification succeeds. the method returns the attribute value.0. network_view( ) Use this method to set or retrieve the network view of the DHCP shared network.0/8". A) . Returns If you specified a parameter. Returns If you specified a parameter.0. #Modify lease_scavenge_time $sharednetwork->lease_scavenge_time(30 * 24 * 60 * 60). If you did not specify a parameter. NIOS 5.0. If you did not specify a parameter. and returns false when the operation fails. my $network2 = Infoblox::DHCP::Network->new( "network" => "30. Parameter The valid value is an array reference that contains Infoblox::DHCP::Network objects.0. Parameter Valid value is a defined Infoblox::DHCP::View object. Example my $network1 = Infoblox::DHCP::Network->new( "network" => "20. Include the specified parameter to set the attribute value. #Get networks my $sharednetwork = $sharednetwork->networks(). name( ) Use this method to retrieve the name of a shared network object. the method returns the attribute value. The default value is the "default" network view.1r4 Page 324 (Rev. the method returns true when the modification succeeds. the method returns the attribute value. the method returns true when the modification succeeds. #Modify networks my $sharednetwork = $sharednetwork->networks([$network1. If you did not specify a parameter. ). the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. Example #Get name my $sharednetwork = $sharednetwork->name(). and returns false when the operation fails. ). and returns false when the operation fails.0/8". Parameter The name of the shared network in string format. Include the specified parameter to set the attribute value. The default network view value is the system-defined default network view object. Returns If you specified a parameter. Example #Get lease_scavenge_time my $lease_scavenge = $sharednetwork->lease_scavenge_time(). Include the specified parameter to set the attribute value.

com"). #Un-override nextserver $sharednetwork->nextserver(undef). A) . and returns false when the operation fails.com). override_ddns_ttl( ) The override_ddns_ttl attribute controls whether the ddns_ttl value in the DHCP shared network object is used. This setting overrides the member-level setting. The FQDN consists of the host name followed by the domain name (example: abc. value => 50 ). The default value is undefined.1r4 Page 325 (Rev. Parameter The valid value is an array reference that contains Infoblox::DHCP::Option objects. #Modify options my $option1 = Infoblox::DHCP::Option->new( name => "lease-time". $sharednetwork->options([$option1]). nextserver( ) Use this method to set or retrieve the nextserver attribute of a shared network object. Example # Get nextserver my $nextserver = $sharednetwork->nextserver(). Omit the parameter to retrieve the attribute value. with an Infoblox::DHCP::View object $sharednetwork->network_view($nview). Include the specified parameter to set the attribute value. Parameter The next server IP address or name in FQDN (Fully Qualified Domain Name) format. # Modify nextserver $sharednetwork->nextserver("blue. the method returns true when the modification succeeds. the method returns the attribute value. Example #Get network view my $nview = $sharednetwork->network_view(). The override_ddns_ttl attribute can be specified explicitly. the method returns the attribute value. NIOS 5. You can specify the name and/or IP address of the next server that the host needs to access in order to boot. the method returns true when the modification succeeds. The default value is undefined which indicates that this attribute is inherited from the member-level setting. #Modify network view. options( ) Use this method to set or retrieve the options value of a member DHCP server. Returns If you specified a parameter. If you did not specify a parameter. and returns false when the operation fails. the method returns the attribute value. A next server name can have a maximum of 256 bytes. Example #Get options my $options = $sharednetwork->options().Infoblox API Documentation If you did not specify a parameter. This option is overridden independently from Infoblox::DHCP::SharedNetwork->bootfile() and Infoblox::DHCP::SharedNetwork>bootserver(). Returns If you specified a parameter. This setting overrides the member-level settings.domain. DHCP options provide network configuration settings and various services available on the network for DHCP. It is also set implicitly when ddns_ttl is set to a defined value. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. instead of the grid default.

NIOS 5. and returns false when the operation fails. Parameter Set the parameter to "true" to override the grid-level setting for update_dns_on_lease_renewal. If you did not specify a parameter. override_update_dns_on_lease_renewal( ) The override_update_dns_on_lease_renewal attribute controls whether the update_dns_on_lease_renewal value in the DHCP shared network object is used. the method returns the attribute value. #Modifying override_lease_scavenge_time $sharednetwork->override_lease_scavenge_time("true"). Set the parameter to "false" to inherit the setting for lease_scavenge_time from the upper level. Omit the parameter to retrieve the attribute value. It is also set implicitly when update_dns_on_lease_renewal is set to a defined value. Include the specified parameter to set the attribute value. #Modifying override_ddns_ttl $sharednetwork->override_ddns_ttl("true"). The default value of this parameter is "false". instead of the grid default. Example #Getting override_lease_scavenge_time my $override_lease_scavenge_time=$sharednetwork->override_lease_scavenge_time( ). Example #Getting override_ddns_ttl my $override_ddns_ttl=$sharednetwork->override_ddns_ttl( ). Set the parameter to "false" to inherit the grid-level setting for ddns_ttl. the method returns the attribute value. the method returns true when the modification succeeds. Set the parameter to "false" to inherit the grid-level setting for update_dns_on_lease_renewal. The override_lease_scavenge_time attribute can be specified explicitly. Include the specified parameter to set the attribute value. It is also set implicitly when lease_scavenge_time is set to a defined value. Parameter Set the parameter to "true" to override the upper-level setting for lease_scavenge_time. Parameter Set the parameter to "true" to override the grid-level setting for ddns_ttl. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. override_lease_scavenge_time( ) The override_lease_scavenge_time attribute controls whether the lease_scavenge_time value in the shared network is used. If you did not specify a parameter. Returns If you specified a parameter. the method returns true when the modification succeeds. The default value of this parameter is "false". The override_update_dns_on_lease_renewal attribute can be specified explicitly. A) .Infoblox API Documentation Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. If you did not specify a parameter. the method returns true when the modification succeeds. instead of the upper-level default. Returns If you specified a parameter. Example #Getting override_update_dns_on_lease_renewal my $override_update_dns_on_lease_renewal=$sharednetwork->override_update_dns_on_lease_renewal( ). Returns If you specified a parameter.1r4 Page 326 (Rev. and returns false when the operation fails. the method returns the attribute value. The default value of this parameter is "false".

so IP addresses are not leased longer than necessary. pxe_lease_time( ) Use this method to set or retrieve the PXE lease time value of a shared network object. such as add. Include the specified parameter to set the attribute value. Setting this method to a defined value implicitly sets the override_update_dns_on_lease_renewal method to "true". This sample also includes error handling for the operations. #Preparation prior to a DHCP shared network object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. Zero indicates that the update is not cached. #Un-override PXE Lease Time $sharednetwork->pxe_lease_time(undef). SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object. the method returns true when the modification succeeds. Parameter Specify "true" to set the update_dns_on_lease_renewal flag or "false" to deactivate/unset it. $object->update_dns_on_lease_renewal("true"). the last operation takes precedence. search. A) . and returns false when the operation fails. which indicates that this attribute is inherited from the member-level setting. update_dns_on_lease_renewal( ) The update_dns_on_lease_renewal attribute controls whether the DHCP server updates DNS when a DHCP lease is renewed. NIOS 5.1r4 Page 327 (Rev. Parameter A 32-bit integer (range from 0 to 4294967295) that represents the duration. and the sequence $object>override_update_dns_on_lease_renewal("false"). To better manage your IP resources. the method returns the attribute value. Include the specified parameter to set the attribute value. and remove. Thus the sequence $object->update_dns_on_lease_renewal("true"). You can configure the DHCP server to allocate an IP address with a shorter lease time to hosts that send PXE boot requests. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. will set override_update_dns_on_lease_renewal to "false". $object>override_update_dns_on_lease_renewal("false"). The default value is undefined. This setting overrides the member-level settings. #Modify PXE Lease Time $sharednetwork->pxe_lease_time(1100). #Modify update_dns_on_lease_renewal $sharednetwork->update_dns_on_lease_renewal("true"). Example #Get update_dns_on_lease_renewal my $update_dns_on_lease_renewal=$sharednetwork->update_dns_on_lease_renewal( ). will result in override_update_dns_on_lease_renewal="true". The default value of this parameter is "false". Example #Get PXE Lease Time my $pxe_lease_time = $sharednetwork->pxe_lease_time(). set a different lease time for PXE boot requests. If you did not specify a parameter. Omit the parameter to retrieve the attribute value. in seconds. Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_update_dns_on_lease_renewal attribute to "false". and returns false when the operation fails. Note that when update_dns_on_lease_renewal is set to a defined value and override_update_dns_on_lease_renewal is set to "false". If you did not specify a parameter. modify. Some hosts use PXE (Preboot Execution Environment) to boot remotely from a server. that the update is cached. the method returns the attribute value. the method returns true when the modification succeeds. The default value is undefined Returns If you specified a parameter.Infoblox API Documentation #Modifying override_update_dns_on_lease_renewal $sharednetwork->override_update_dns_on_lease_renewal("true").

com".0. my $response = $session->add($network1) or die("Add ###BOT_TEXT###quot;10. #Search for a specific shared network object #Search the network my @retrieved_objs = $session->search( object => "Infoblox::DHCP::SharedNetwork". "authority" => "true".2". ":" .com". $session->status_code() . A) . "bootfile" => "bootfile. Infoblox::status_code() . "comment" => "add shared network". password => "infoblox" ).0.0. ). "ddns_update_fixed_addresses" => "true". $session->status_code() . ":" . $session->status_detail()). #Create a DHCP network object my $network1 = Infoblox::DHCP::Network->new( "network" => "10.168.3. #Get and modify a shared network attribute #GetShared Network through the session my @retrieved_objs = $session->get( NIOS 5.*" ). "disable" => "false".0/8###BOT_TEXT###quot;Network failed: ". ). $session->status_detail()). "bootserver" => "someserver.0. "networks" => [ $network1 .1r4 Page 328 (Rev.0/8###BOT_TEXT###quot;. "nextserver" => "3. #Create a DHCP shared network object my $sharednetwork1 = Infoblox::DHCP::SharedNetwork->new( "name" => "myname". "pxe_lease_time" => "3600".0###BOT_TEXT###quot;Network failed: ". "ddns_generate_hostname" => "true". my $response = $session->add($network2) or die("Add ###BOT_TEXT###quot;11.0/8". print "Network ###BOT_TEXT###quot;11. $network2 ]. Infoblox::status_detail()). ":" .0/8". ":" . $session->status_detail()). $session->status_detail()). print "Network ###BOT_TEXT###quot;10. "name" => "my. } print "Search Shared Network found at least 1 matching entry\n".3".0.1. unless ($session) { die("Construct session failed: ".3. ).Infoblox API Documentation use Infoblox. my $network2 = Infoblox::DHCP::Network->new( "network" => "11. username => "admin".added successfully\n". "enable_ddns" => "true". $session->status_code() .0. my $object = $retrieved_objs[0].0. "ddns_server_always_updates" => "true". ":" . unless ($object) { die("Search Shared Network failed: ".0. "ddns_use_option81" => "true". print "Shared Network added successfully\n". } print "Session created successfully\n".0. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192.0/8###BOT_TEXT###quot;added successfully\n". $session->status_code() . my $response = $session->add( $sharednetwork1 ) or die("Add Shared Network failed: ".0.0.0.

$session->status_code() . #Un-override bootserver $object->bootserver(undef). ":" . ":" . #Remove a shared network object #Get Network object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::SharedNetwork" .infoblox.0###BOT_TEXT###quot;Network failed: ".0.0. #Modify attributes of the specified Network $object->disable("true"). ":" .0.0/8###BOT_TEXT###quot;Network failed: ". #Submit the network object for removal my $response = $session->remove($network1) or die("Remove ###BOT_TEXT###quot;10.com/ NIOS 5. ":" . $session->status_detail()).0/8###BOT_TEXT###quot;remove successfully\ ####PROGRAM ENDS#### AUTHOR Infoblox Inc. my $object = $retrieved_objs[0].0. } print "Get Shared Network found at least 1 matching entry\n". if ( !$res) { print "Modify Shared Network attribute failed: ".0. $session->status_detail()). ":" . #Submit the shared network object for removal $session->remove($object) or die("Remove Shared Network failed: ". print "Network ###BOT_TEXT###quot;10. } print "Get Shared Network object found at least 1 matching entry\n". "name" => "myname" ). print "Network ###BOT_TEXT###quot;11.0/8###BOT_TEXT###quot;remove successfully\n".0. A) . $session->status_code() .$session->status_code() . $session>status_detail(). print "Shared Network removed successfully \n". name => "myname" ). $session->status_detail()). unless ($object) { die("Get Shared Network object failed: ". ":" . #Apply the changes my $res = $session->modify($object) . $session->status_code() . $session->status_code() . $session->status_code() . http://www.1r4 Page 329 (Rev.0. $session->status_detail()).0. #Un-override nextserver $object->nextserver(undef).Infoblox API Documentation object =>"Infoblox::DHCP::SharedNetwork" . #Submit the network object for removal my $response = $session->remove($network2) or die("Remove ###BOT_TEXT###quot;11. $session->status_detail()). my $object = $retrieved_objs[0]. unless ($object) { die("Get Shared Network object failed: ". } else { print "Shared Network object modified successfully \n". } #Un-override bootfile $object->bootfile(undef).

Infoblox::DHCP::View.Infoblox API Documentation SEE ALSO Infoblox::Session. Infoblox::Session->search(). NIOS 5. Infoblox::Session->modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.1r4 Page 330 (Rev. Infoblox::DHCP::Network. Infoblox::Session->remove(). Infoblox::Session->add(). Infoblox::Session->get(). A) . Infoblox::DHCP::Option.

then all possible subnetworks will be added otherwise only NIOS 5.Infoblox API Documentation Infoblox::DHCP::SplitNetwork . add_all_subnetworks( ) Use this method to set the add_all_subnetworks flag. METHODS This section describes all the methods that can be used to configure and retrieve the attribute value of a split network object. comment => "add network". prefix => $num. Using Infoblox split network feature.0. the parent network can be split into multiple smaller networks without configuring each of the newly-created networks. A) .1r4 Page 331 (Rev. ). DESCRIPTION Once a network is created for DHCP. If this flag is set. CONSTRUCTOR my $split_network = Infoblox::DHCP::SplitNetwork->new( network => $Network|$IPv6Network. Infoblox::Session->add( ) Use this method to add an object to the Infoblox appliance. #Submit for addition my $response = $session->add( $split_network ). prefix => 12. auto_create_reversezone => "true" | "false". NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) METHODS add_all_subnetworks( ) auto_create_reversezone( ) network( ) prefix( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::SplitNetwork . A larger netmask defines a larger number of network addresses and a smaller number of host addresses.Split network object. #Required #Required #Optional / Default is "false" #Optional / Default is "false" SESSION METHODS This section describes all the methods in the Infoblox::Session module that can be applied to a split network object.0/8". add_all_subnetworks => "true". ). smaller subnetworks can be configured with larger netmasks.0. Example #Construct an object my $network = Infoblox::DHCP::Network->new( network => "10.Split network object. my $split_network = Infoblox::DHCP::SplitNetwork->new ( network => $network. See Infoblox::Session->add() for parameters and return values. add_all_subnetworks => "true" | "false". ).

$split_network->network($network). Parameter The valid values are Infoblox::DHCP::Network or Infoblox::DHCP::IPv6Network objects. #Specify ipv6 network my $network = Infoblox::DHCP::IPv6Network->new( network => "10::/48". the method returns true when the modification succeeds. Returns If you specified a parameter. Example #Set add_all_subnetworks $split_network->add_all_subnetworks("true"). Include the specific parameter to set the attribute value. Parameter Specify "true" to set add_all_subnetworks flag or "false" to deactivate/unset it. comment => "add network". Example #Set auto_create_reversezone $split_network->auto_create_reversezone("true"). and returns false when the operation fails. Parameter Specify "true" to set auto_create_reversezone flag or "false" to deactivate/unset it. Parameter Number with the subnet mask value. and returns false when the operation fails. This value must be 1 greater than the subnet mask of the network to be split.0. comment => "add network". Example #Specify network my $network = Infoblox::DHCP::Network->new( network => "10. When set. The NIOS 5. Include the specified parameter to set the attribute value. ). prefix( ) Use this method to specify the appropriate subnet mask for each subnet created after splitting the network. auto_create_reversezone( ) Use this method to set the auto_create_reversezone flag. the method returns true when the modification succeeds.1r4 Page 332 (Rev. this flag will automatically create reverse-mapping zones for the subnets. the method returns true when the modification succeeds. Include the specified parameter to set the attribute value. The default value is "false".Infoblox API Documentation networks with fixed addresses will be added. and returns false when the operation fails. network( ) Use this method to specify the network to be split. The default value is "false". ). A) . Returns If you specified a parameter. Include the specified parameter to set the attribute value. $split_network->network($network).0.0/8". Returns If you specified a parameter.

":" .168. ). Infoblox::status_code(). A) . password => "infoblox" ).0. $session->status_code(). Example #Specify prefix $split_network->prefix(16).1.0/8". Returns If you specified a parameter. #Split the network my $split_network = Infoblox::DHCP::SplitNetwork->new ( network => $network.1r4 Page 333 (Rev. ":" .0.0. username => "admin".\n".2". use Infoblox.Infoblox::status_detail()).\n". #Preparation prior to splitting a network use strict.Infoblox API Documentation maximum value is 31 for IPv4 network or 127 for IPv6 network. ":" . } print"Split network object created successfully. ":" . SAMPLE CODE The following sample code demonstrates the split network operation. unless($network){ die("Construct network object fail: ". Infoblox::status_detail()). Also this sample code includes error handling for the operations. ). $session->add($network) or die("Add network failed: ". } print"Network object created successfully. NIOS 5. Infoblox::status_code(). unless($split_network){ die("Construct split network object fail: ". safe to add the network. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. prefix => 16.\n".\n".Infoblox::status_detail()).$session->status_detail()). auto_create_reversezone => "true". Infoblox::status_code() . the method returns true when the modification succeeds. network => "20. comment => "add network".0/8" ). add_all_subnetworks => "true".\n". unless ($session) { die("Construct session failed: ". } print"Network added successfully. #Verify if the network exists my $object = $session->get( object => "Infoblox::DHCP::Network". and returns false when the operation fails. unless($object){ print"Network does not exist on server. #Create network prior to splitting the network my $network = Infoblox::DHCP::Network->new( network => "20.0. } print "Session created successfully. #Split the network $session->add( $split_network ) or die("Split network fail:".

1r4 Page 334 (Rev. NIOS 5.Infoblox::DHCP::Network COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.infoblox. ":" . print"Splited network successfully. http://www.$session->status_detail()).\n". A) .Infoblox API Documentation $session->status_code().Infoblox::Session->add(). ####PROGRAM ENDS#### AUTHOR Infoblox Inc.com/ SEE ALSO Infoblox::Session.

Infoblox::DHCP::Range. Infoblox::DHCP::SharedNetwork. statistics_object => $network). Example # API can return more than 1 answer for DHCP::Statistics # for each member of the network my @network_stats = $session->get( object => "Infoblox::DHCP::Statistics". available_hosts( ) Use this method to retrieve the number of available IP addresses in the given network. A) . Infoblox::Session->get( ) Use this method to retrieve the existing objects from an Infoblox appliance.Required.1r4 Page 335 (Rev. See Infoblox::Session->get() for parameters and return values. METHODS This section describes all the methods that can be used to retrieve the attribute values of a DHCP statistics object. Parameter none Returns NIOS 5.Infoblox API Documentation Infoblox::DHCP::Statistics . and Infoblox::DHCP::MSSuperscope. Key Reference Apply the following attributes to get the DHCP statistics: statistics_object . An object returned via Infoblox::Session->get() or Infoblox::Session>search(). NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->get( ) METHODS available_hosts( ) dynamic_hosts( ) dhcp_utilization_status( ) static_hosts( ) usage( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Statistics . Supported objects are Infoblox::DHCP::Network.Manages DHCP statistics.Manages DHCP statistics. DESCRIPTION The DHCP statistics object is used to view the DHCP statistics of the network in an Infoblox appliance. CONSTRUCTOR The Infoblox::DHCP::Statistics object is automatically generated upon the successful creation of the Infoblox::DHCP::Network object. It does not require manual construction. SESSION METHODS This section describes all the methods in an Infoblox::Session that can be applied to a DHCP statistics object.

A) . Example #Get usage my $usage = $network_stats->usage(). Example #Get available_hosts my $available_hosts = $network_stats->available_hosts(). Example #Get member my $status = $network_stats->dhcp_utilization_status(). dhcp_utilization_status( ) Use this method to retrieve the DHCP utilization status. NIOS 5.1r4 Page 336 (Rev. The returned value is one of "FULL". Example #Get dynamic_hosts my $dynamic_hosts = $network_stats->dynamic_hosts(). Parameter none Returns The method returns the attribute value. Example #Get static_hosts my $static_hosts = $network_stats->static_hosts(). "LOW" or "NORMAL". Also. usage( ) Parameter none Returns The method returns the attribute value. SAMPLE CODE The following sample code demonstrates the get session method on a DHCP statistics object. static_hosts( ) Use this method to retrieve the number of hosts with fixed addresses. "HIGH". this sample code also includes error handling for the operations. Parameter none Returns The method returns the attribute value. dynamic_hosts( ) Use this method to retrieve number of hosts which are assigned dynamic IP address. Parameter none Returns The method returns the attribute value.Infoblox API Documentation The method returns the attribute value.

0. Infoblox::status_code() .168. unless($network) { die("Construct Network object failed: ". unless($network_view) { die("Construct Network View object failed: ". start_addr => "1.2". Infoblox::status_code() .localdomain".0. $session->status_code() . Infoblox::status_detail()).0/8".0. Infoblox::status_detail()). member => $member. password => "infoblox" ). $session->status_code() . ).Infoblox API Documentation #PROGRAM STARTS: Include all the modules that will be used use strict. } print "Network View object created successfully\n". Infoblox::status_detail()). Infoblox::status_detail()). Infoblox::status_detail()). Infoblox::status_code() . ":" .0". unless ($session) { die("Construct session failed: ".0. #Add the Network View object into the Infoblox appliance through a session $session->add($network_view) or die("Add Network View object failed: ". #Create the Network object with this member my $network = Infoblox::DHCP::Network->new( network => "1. Infoblox::status_code() .1. #Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ". ":" . ":" . $session->status_detail()). } print "Session created successfully\n". } print "Member object created successfully\n". ). network_view => $network_view.0. ":" . #Create a Network View object my $network_view = Infoblox::DHCP::View->new( name => "my_network_view". use Infoblox. ":" . ":" . ).1. A) .0/255.1r4 Page 337 (Rev.0.0.1". Infoblox::status_code() . ). members => [ $member ].0. print "Network added successfully\n". username => "admin". ":" .0. } print "Network object created successfully\n".168. NIOS 5. print "Network View added successfully\n". $session->status_detail()). ipv4addr => "192. unless($dhcp_range) { die("Construct DHCP Range failed: ". end_addr => "1. unless($member) { die("Construct member failed: ".10". #Create the DHCP Range object with this member my $dhcp_range = Infoblox::DHCP::Range->new( network => "1.2".0. #Preparation prior to getting DHCP statistics #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. network_view => $network_view. my $member = Infoblox::DHCP::Member->new( name => "infoblox. } print "DHCP range object created successfully\n".

":" .0. #Get the DHCP statistics my @result_array = $session->get( object => "Infoblox::DHCP::Network". unless ($network_view) { die("Get Network View failed: ". ). # Retrieve and remove the Network View object my $network_view = $session->get( object => "Infoblox::DHCP::View". my $network = $result_array[0]. network => "1. $session->status_detail()).Infoblox::DHCP::View. $session->status_code() . "mac" => "22:22:22:22:22:22". Infoblox::status_code() . http://www. print "DHCP Fixed address added successfully\n". $session->status_code() .0. } @result_array = $session->get( object => "Infoblox::DHCP::Statistics".0/8". $session->status_code() .0. } print "DHCP Fixed address object created successfully\n". ":" .infoblox. $session->status_detail()). #Clean up # Remove the Network Statistics object that was just retrieved $session->remove($network_stats).Infoblox::DHCP::FixedAddr. $session->status_detail()). unless ($network) { die("Get Network failed: ". $session->status_code() .Infoblox::Session>add().0. "network_view" => $network_view. ####PROGRAM ENDS#### AUTHOR Infoblox Inc.0. unless($fixed_address) { die("Construct DHCP Fixed address failed: ". ). print "DHCP range added successfully\n". "ipv4addr" => "1. statistics_object => $network. #Create the Fixed Address object my $fixed_address = Infoblox::DHCP::FixedAddr->new( "network" => "1. ":" . $session->status_detail()). $session->status_detail()). unless ($network_stats) { die("Get Network statistics failed: ". A) . ":" .0/8".1r4 Page 338 (Rev.2". ).Infoblox::DHCP::Range.com/ SEE ALSO Infoblox::Session. $session->status_code() . Infoblox::DHCP::Network. ":" . } print "Get Network Statistics successful\n". name => "my_network_view". Infoblox::status_detail()). $session->add($fixed_address) or die("Add DHCP Fixed address object failed: ".Infoblox API Documentation $session->add($dhcp_range) or die("Add DHCP range object failed: ".Infoblox::Session->get() NIOS 5. my $network_stats = $result_array[0].0. ":" . } $session->remove($network_view). network_view => "my_network_view").

NIOS 5.1r4 Page 339 (Rev. A) .Infoblox API Documentation COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.

# Configure DHCP Template on the DHCP Network template object $network_template->range_templates([$template]).DHCP Template object. # this won't be used if specified in Infoblox::DHCP::Template number_of_addresses => "10". #Construct a DHCP Template object my $template = Infoblox::DHCP::Template->new( offset => "10".DHCP Template object. # this won't be used if specified in Infoblox::DHCP::Template ). CONSTRUCTOR my $template = Infoblox::DHCP::Template->new( name => $string. offset => "20".1r4 Page 340 (Rev. A) . Infoblox::DHCP::NetworkTemplate->range_templates( ) Use this function to specify range templates for the DHCP network template object. #Required count => $num. Infoblox::DHCP::FixedAddrTemplate->number_of_addresses() with Infoblox::DHCP::NetworkTemplate. #Optional ). DESCRIPTION The DHCP associates Infoblox::DHCP::RangeTemplate->offset(). Example #Construct and add a DHCP Range Template object my $range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template". # this will be used instead if specified count => "5". MODULE METHODS The following functions are available to be applied to a DHCP template object. # this will be used instead if specified name => "custom_range_template" ). NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::NetworkTemplate->range_templates( ) Infoblox::DHCP::NetworkTemplate->fixed_address_templates( ) METHODS name( ) count( ) offset( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::Template . #Optional offset => $num.Infoblox API Documentation Infoblox::DHCP::Template . Infoblox::DHCP::RangeTemplate->number_of_addresses() and Infoblox::DHCP::FixedAddrTemplate->offset(). $session->add($range_template). See Infoblox::DHCP::NetworkTemplate>range_templates() for parameters and return values. When optional fields offset/count are set in this object which is passed to Infoblox::DHCP::NetworkTemplate->fixed_address_templates() or Infoblox::DHCP::NetworkTemplate->range_templates() they are used instead of offset/number_of_addresses values in Infoblox::DHCP::RangeTemplate and Infoblox::DHCP::FixedAddrTemplate when creating Infoblox::DHCP::Network based on a template. NIOS 5.

count( ) Use this method to set or retrieve the number of addresses of the DHCP range or fixed address template. #Construct a DHCP Template object my $template = Infoblox::DHCP::Template->new( offset => "10". the method returns the attribute value. If you did not specify a parameter. name( ) Use this method to set or retrieve name of Infoblox::DHCP::RangeTemplate or Infoblox::DHCP::FixedAddrTemplate object assigned to this template object. Omit the parameter to retrieve the attribute value. # Configure DHCP Template on the DHCP Network template object $network_template->fixed_address_templates([$template]).1r4 Page 341 (Rev. If you did not specify a parameter. Example #Get name my $name = $template->name(). This value will be used instead of Infoblox::DHCP::RangeTemplate->number_of_addresses() or Infoblox::DHCP::FixedAddrTemplate->number_of_addresses() if specified. the method returns true when the modification succeeds. the method returns true when the modification succeeds. # this won't be used if specified in Infoblox::DHCP::Template ). Returns If you specified a parameter. # this won't be used if specified in Infoblox::DHCP::Template number_of_addresses => "10". Parameter The number of addresses in this template.Infoblox API Documentation Infoblox::DHCP::NetworkTemplate->fixed_address_templates( ) Use this function to specify fixed address templates for the DHCP network template object. #Modify name $template->name("custom_range_or_fixed_address_template_name"). Include the specified parameter to set the attribute value. Example #Construct and add a DHCP Fixed Address Template object my $fixed_address_template = Infoblox::DHCP::FixedAddrTemplate->new( name => "custom_fixed_address_template". Example #Get count my $count = $template->count(). Include the specified parameter to set the attribute value. Returns If you specified a parameter. NIOS 5. $session->add($fixed_address_template). # this will be used instead if specified count => "5". A) . See Infoblox::DHCP::NetworkTemplate>fixed_address_templates() for parameters and return values. and returns false when the operation fails. the method returns the attribute value. METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP range template object. Parameter The name of range template or fixed address template object. # this will be used instead if specified name => "custom_fixed_address_template" ). Omit the parameter to retrieve the attribute value. and returns false when the operation fails. offset => "20".

number_of_addresses => "10". A) . number_of_addresses => "10". the method returns the attribute value. unless ($session) { die("Construct session failed: ". #Preparation prior to a DHCP Range object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. If you did not specify a parameter. offset => "10".2".Infoblox API Documentation #Modify count $template->count("10"). ":" . } print "Session created successfully\n". ). } print "DHCP Range template object created successfully\n". ":" . $session->status_detail()). Infoblox::status_detail()). Include the specified parameter to set the attribute value. Parameter The address offset of this template. $session->status_code() . offset( ) Use this method to set or retrieve the address offset of the DHCP range or fixed address template. unless($dhcp_range_template) { die("Construct DHCP Range template object failed: ". print "DHCP Range template object added to Infoblox appliance successfully\n". username => "admin". Infoblox::status_code() . SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a DHCP template object such as add. Omit the parameter to retrieve the attribute value. modify. This value will be used instead of Infoblox::DHCP::RangeTemplate->offset() or Infoblox::DHCP::FixedAddrTemplate->offset() if specified. #Modify offset $template->offset("10").1. use Infoblox. ). and remove. Infoblox::status_detail()). password => "infoblox" ). #Create the DHCP Range template object my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template".1r4 Page 342 (Rev. and returns false when the operation fails. #Create the Fixed Address template object my $dhcp_fixed_address_template = Infoblox::DHCP::FixedAddrTemplate->new( name => "custom_fixed_address_template". #Add the DHCP Range template object into the Infoblox appliance through a session $session->add($dhcp_range_template) or die("Add DHCP Range template object failed: ". Returns If you specified a parameter. NIOS 5. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. the method returns true when the modification succeeds.168. offset => "10". Infoblox::status_code() . ":" . this sample includes error handling for the operations. Example #Get offset my $offset = $template->offset(). Also.

0. $session->status_detail()). #Add the DHCP Fixed Address Template object into the Infoblox appliance through a session $session->add($dhcp_fixed_address_template) or die("Add DHCP Fixed Address template object failed: ". ":" . Infoblox::status_code() . unless($tmpl1) { die("Construct DHCP template object failed: ". fixed_address_templates => [ $tmpl2 ]. unless($network_template) { die("Construct DHCP Network template object failed: ". ). #Add DHCP template to DHCP Network Template and insert it my $network_template = Infoblox::DHCP::NetworkTemplate->new( name => "network_template". http://www. } print "DHCP Fixed Address template object created successfully\n". ":" . A) . unless($tmpl2) { die("Construct DHCP template object failed: ". # this will be used instead if specified count => "3". Infoblox::status_code() .0". #Add the DHCP Network template object into the Infoblox appliance through a session $session->add($network_template) or die("Add Network template object failed: ". ":" . netmask => "255.infoblox. #Construct a DHCP Template objects my $tmpl2 = Infoblox::DHCP::Template->new( offset => "20".0. Infoblox::status_detail()). #Create DHCP template objects #Construct a DHCP Template object my $tmpl1 = Infoblox::DHCP::Template->new( offset => "10". Infoblox::DHCP::NetworkTemplate. # this will be used instead if specified count => "5". $session->status_code() . $session->status_detail()). Infoblox::DHCP::Network COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.1r4 Page 343 (Rev. } print "DHCP template object created successfully\n". range_templates => [ $tmpl1 ]. # this will be used instead if specified name => "custom_fixed_address_template" ). NIOS 5. Infoblox::DHCP::RangeTemplate. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. Infoblox::status_detail()). ":" . ":" . print "DHCP Network template object added to Infoblox appliance successfully\n". Infoblox::status_code() .com/ SEE ALSO Infoblox::Session. } print "DHCP template object created successfully\n". Infoblox::status_code() .Infoblox API Documentation unless($dhcp_fixed_address_template) { die("Construct DHCP Fixed Address template object failed: ". Infoblox::status_detail()). ":" . Infoblox::DHCP::FixedAddrTemplate. $session->status_code() . Infoblox::status_detail()). print "DHCP Fixed Address template object added to Infoblox appliance successfully\n". # this will be used instead if specified name => "custom_range_template" ). } print "DHCP Network template object created successfully\n".

1r4 Page 344 (Rev.Infoblox API Documentation NIOS 5. A) .

. You can manage the networks in one network view independently of the other network views...Infoblox API Documentation Infoblox::DHCP::View . Infoblox::Session->add( ) Use this method to add a network view object to the Infoblox appliance. ).. These address spaces could be overlapping or non-overlapping.#Optional / List of remote zone assignments internal_ddns_primaries => [ $ForwardZone1. CONSTRUCTOR my $network = Infoblox::DHCP::View->new( name => $string. the objects are automatically associated with the system-defined default network view. with its own networks and shared networks. }.1r4 Page 345 (Rev.#Optional / List of forward mapping zones in grid ).. #Required comment => $string. #Optional / Default is empty extensible_attributes => { $string => $string|$num..]. # Submit for adding network view my $response = $session->add( $network_view ).].DHCP Network View object DESCRIPTION Network view provides the ability to manage multiple views of IP address spaces from NIOS. Example #Construct an object my $network_view = Infoblox::DHCP::View->new( name => "netview".].. See Infoblox::Session->add() for parameters and return values. A network view is a single routing domain.. NIOS 5. ..$Nameserver2.. $string => [ $string|$num.$ForwardZone2. . #Optional / Default is undefined external_ddns_primaries => [ $Nameserver1. A) . SESSION METHODS This section describes all the methods in an Infoblox::Session module that can apply to a DHCP Network View object.DHCP Network View object NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS name( ) comment( ) extensible_attributes( ) external_ddns_primaries( ) internal_ddns_zones( ) internal_updates_view( ) associated_dns_views( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DHCP::View . When the network view is not specified during a write operation.

Example my ). Example # Get the object under the same name my @result_array = $session->get( object => "Infoblox::DHCP::View" . and then submit this object for removal. # Submit for removal my $response = $session->remove( $desired_network_view ).Optional. name => "netview" ). Example #Use method to modify comment method. extensible_attributes . Key References Apply the following attributes to search for a DHCP Network View object: name . # search for DHCP views with the extensible attribute 'Site' my @retrieved_objs = $session->search( NIOS 5. name => "^netview\$" ). # Submit modification my $response = $session->modify( $object ). See Infoblox::Session->remove() for parameters and return values. A hash reference containing extensible attributes. extensible_attributes . A name in string format.Required. See Infoblox::Session->get() for parameters and return values. Key References Apply the following attributes to get a specific DHCP Network View object: name . @result_array = $session->get( object => "Infoblox::DHCP::View" . See Infoblox::Session->search() for parameters and return values. Example # search for DHCP Network View object with name 'netview' my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Network". Infoblox::Session->modify( ) Use this method to modify a network object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values. Infoblox::Session->search( ) Use this method to search for a DHCP Network View object in the Infoblox appliance. $object->comment("My modified comment").Required. A hash reference containing extensible attributes. extensible_attributes => { 'Site' => 'Santa Clara' }). name => "netview" # get all DHCP view objects with a given extensible attribute my @retrieved_objs = $session->get( object => "Infoblox::DHCP::View".Optional. my $desired_network_view = $result_array[0]. first use get() or search() to retrieve the specific object. Infoblox::Session->remove( ) Use this method to remove an object from the Infoblox appliance. To remove a specifc object. A) . A name in string format (regular expression).Infoblox API Documentation Infoblox::Session->get( ) Use this method to retrieve all the matching network view objects from the Infoblox appliance. # find the desired object from the retrieved list.1r4 Page 346 (Rev.

A) . the method returns the attribute value. Include the specified parameter to set the attribute value. the value is a string with a maximum of 256 characters. Parameter The name of the network view is in string format with a maximum of 256 bytes. the method returns true when the modification succeeds. Example # Get name my $name = $network_view->name() # Modify name $network_view->name("netview_renamed"). If you did not specify a parameter. 1970 UTC. Returns If you specified a parameter. Returns If you specified a parameter. If you did not specify a parameter. the method returns the attribute value. Omit the parameter to retrieve the attribute value. The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. # Modify comment $network_view->comment("add a network view"). Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. URL. Omit the parameter to retrieve the attribute value. The default value is undefined. the value is a string with a maximum of 64 characters. the value is the number of seconds that have elapsed since January 1st. If you did not specify a parameter. NIOS 5.1r4 Page 347 (Rev. For a date. Include the specified parameter to set the attribute value. and returns false when the operation fails. For email. and returns false when the operation fails. comment( ) Use this method to set or retrieve a descriptive comment of a DHCP Network View object. extensible_attributes => { 'Site' => 'Santa Clara' }). Example # Get comment my $comment = $network_view->comment(). METHODS This section describes all the methods that can be used to configure and retrieve the attribute values of a DHCP Network View object name( ) Use this method to set or retrieve the name of a DHCP Network View object. and string types. the method returns true when the modification succeeds. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DHCP view object.Infoblox API Documentation object => "Infoblox::DHCP::View". Omit the parameter to retrieve the attribute value. Example #Get extensible attributes my $ref_extensible_attributes = $firstview->extensible_attributes(). Include the specified parameter to set the attribute value. the method returns the attribute value. and returns false when the operation fails. Returns If you specified a parameter. the value is an integer from -2147483648 through 2147483647. the method returns true when the modification succeeds. For an integer. For a list. Parameter Enter a descriptive comment for the network view in string format with a maximum of 256 bytes.

22". secondaries => [$nameserver2].com". 'Administrator' => [ 'Peter'. Include the specified parameter to set the attribute value.arpa".com". internal_ddns_zones( ) Use this method to set or retrieve forward mapping zones which are being served in the grid. NIOS 5. If you did not specify a parameter.del. ). my $zone1 = Infoblox::DNS::Zone->new( name => "test1. Example # Get internal_ddns_zones my $internal_ddns_zones = $network_view->internal_ddns_zones().del. Parameter A valid value is an array reference that contains Infoblox::DNS::Nameserver object(s). the method returns the attribute value. the method returns the attribute value. 'Tom' ] }). This specifies the external zone that is updated dynamically.11. # Modify internal_ddns_zones my $nameserver1 = Infoblox::DNS::Nameserver->new( name => "ns1. A) . # Clear external_ddns_primaries list $network_view->external_ddns_primaries([]).Infoblox API Documentation #Modify extensible attributes $firstview->extensible_attributes({ 'Site' => 'Santa Clara'. my $nameserver2 = Infoblox::DNS::Nameserver->new( ddns_zone => "3.in-addr. external_ddns_primaries( ) Use this method to set or retrieve the network view-level external_ddns_primaries value. $network_view->external_ddns_primaries([$nameserver1. # Modify external_ddns_primaries my $nameserver1 = Infoblox::DNS::Nameserver->new( ddns_zone => "ns1. ipv4addr => "22.11".1r4 Page 348 (Rev.11. Omit the parameter to retrieve the attribute value.com". Example # Get external_ddns_primaries my $external_ddns_primaries = $network_view->external_ddns_primaries(). the method returns true when the modification succeeds. primary => [$nameserver1]. Parameter A valid value is an array reference that contains Infoblox::DNS::Zone object(s).11. All other types of zones will generate an error. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. and returns false when the operation fails. the method returns true when the modification succeeds. ipv4addr => "11. my $nameserver2 = Infoblox::DNS::Nameserver->new( name => "test".com". ). ).1.11. Returns If you specified a parameter. ipv4addr => "11. Only an authoritative zone can be assigned to this list. ). ipv6addr => "2006::b671". my $zone2 = Infoblox::DNS::Zone->new( name => "test2.2. ). Include the specified parameter to set the attribute value. The DHCP server can send dynamic updates to a specified external name server. Returns If you specified a parameter. $nameserver2]).22. If you did not specify a parameter.11".22.

This list is read-only and cannot be set. #Create a DHCP Network View object my $network_view = Infoblox::DHCP::View->new( NIOS 5. the method returns true when the modification succeeds. A) . $network_view->internal_updates_view($otherview).Infoblox API Documentation ). search.1. Example # Get internal_updates_view my $internal_updates_view = $network_view->internal_updates_view(). the method returns the attribute value. and returns false when the operation fails. associated_dns_views( ) Use this method to retrieve the list of DNS views associated with this network view. Infoblox::status_code() . When you enable the appliance to send updates to grid members. $zone2]).1r4 Page 349 (Rev. #Preparation prior to a DHCP Network View insertion #PROGRAM STARTS: Include all the modules that will be used use strict. you must specify which DNS view receives the updates. and remove. Infoblox::status_detail()). internal_updates_view( ) Use this method to specify or retrieve the internal updates DNS view value of a network view. ). unless ($session) { die("Construct session failed: ". $network_view->internal_ddns_zones([$zone1. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. If you did not specify a parameter. Include the specified parameter to set the attribute value. # Modify internal_updates_view my $otherview = Infoblox::DNS::View->new( name => "other".2". # Clear internal_ddns_zones list $network_view->internal_ddns_zones([]). modify. username => "admin". Parameter A valid value is an Infoblox::DNS::View object for internal dynamic updates. Example # Get associated_dns_views my $associated_dns_views = $network_view->associated_dns_views() SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object such as add. This sample also includes error handling for the operations.168. Parameter None Returns Returns an array reference that contains Infoblox::DNS:View object(s). Returns If you specified a parameter. password => "infoblox" ). use Infoblox. Omit the parameter to retrieve the attribute value. } print "Session created successfully\n". ":" .

} print "Search Network found at least 1 matching entry\n". print "Network View object modified successfully \n". $session->status_code() . #Modify one of the attributes of the specified Network View attribute $object->comment("updated comment"). ). $session->status_detail()).1r4 Page 350 (Rev.Infoblox API Documentation name ). ":" . ####PROGRAM ENDS#### AUTHOR Infoblox Inc. ). unless ($object) { die("Get Network View object failed: ". A) . => "netview". ":" . ":" . ":" . $session->status_detail()). ). my $response = $session->add($network_view) or die("Add Network View failed: ". #Submit the object for removal $session->remove($object) or die("Remove Network View failed: ". my $object = $retrieved_objs[0]. name => "netview". #Apply the changes $session->modify($object) or die("Modify Network View attribute failed: ". $session->status_code() . $session->status_code() . ":" . } print "Get Network View found at least 1 matching entry\n". $session->status_code() . $session->status_detail()).infoblox. #Get and modify a Network View attribute #Get Network View through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::View" . print "Network View removed successfully \n". my $object = $retrieved_objs[0]. name => "netview". http://www. $session->status_detail()). } print "Get Network View object found at least 1 matching entry\n". $session->status_detail()). unless ($object) { die("Search Network View failed: ". $session->status_code() . #Remove a Network View Object #Get Network View object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::View" . $session->status_code() . print "Network View added successfully\n". my $object = $retrieved_objs[0]. ":" .com/ NIOS 5. name => '^netview$'. B<#Search for a specific Network View> #Search the network view my @retrieved_objs = $session->search( object => "Infoblox::DHCP::View". $session->status_detail()). unless ($object) { die("Get Network View object failed: ".

1r4 Page 351 (Rev. Infoblox::DNS::Zone. Infoblox::Session->add(). Infoblox::Session->get(). Infoblox::DNS::View.Infoblox API Documentation SEE ALSO Infoblox::Session. Infoblox::DNS::Nameserver. NIOS 5. A) . Infoblox::DHCP::Network. Infoblox::Session>modify() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::Session->search(). Infoblox::Session->remove().

com'. name => 'domain. Example # search for all record objects that match "domain. Example #Get comment NIOS 5. A zone name in FQDN format.com" in the default DNS view my @retrieved_objs = $session->search( object => "Infoblox::DNS::AllRecords". DESCRIPTION By searching on this object. Key References Apply the following attributes to search for a DNS AllRecords object: zone . By default.1r4 Page 352 (Rev. view .Required. all the record objects associated with a specific zone can be retrieved SESSION METHODS This section describes all the methods in Infoblox::Session module that you can apply to a DNS AllRecords object. Infoblox::Session->search( ) Use this method to search for record objects in the Infoblox appliance.Optional.Infoblox API Documentation Infoblox::DNS::AllRecords . All methods are readonly and cannot be set. METHODS This section describes all the methods that you can use to retrieve the attribute values of an AllRecords object. A) . the default DNS views is searched. The DNS view in which the records are located.A synthetic object used to return all record object types belonging to a zone. ). See Infoblox::Session->search() for parameters and return values.A synthetic object used to return all record object types belonging to a zone. Returns The method returns the attribute value. comment( ) Use this method to retrieve the descriptive comment of the record associated with the AllRecords object. NAME DESCRIPTION SESSION METHODS Infoblox::Session->search( ) METHODS comment( ) disable( ) name( ) record( ) ttl( ) type( ) view( ) zone( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::AllRecords .

Returns The method returns the attribute value.) Returns The method returns the attribute value. A) . record( ) Use this method to retrieve the record object associated with the AllRecords object. disable( ) Use this method to retrieve the disable flag of of the record associated with the AllRecords object (if present). Returns The method returns the attribute value. See Infoblox::Session->fill_partial_object() for more information on how it can be converted to a 'full' API object.Infoblox API Documentation my $comment = $allrecord->comment().. type( ) Use this method to retrieve the type of the record associated with the AllRecords object.. the member value will be undefined. view( ) Use this method to retrieve the DNS view name of the record associated with the AllRecords object. 'MX record'. This object is considered a 'partial' object. Example #Get record my $record = $allrecord->record(). This is a descriptive string that identifies the record to which this AllRecords object refers. Example #Get ttl my $ttl = $allrecord->ttl(). (For example. 'A record'. If the AllRecords object refers to a record not currently supported in the Perl API. Returns The method returns the attribute value. Returns The method returns the attribute value. ttl( ) Use this method to retrieve the TTL value of of the record associated with the AllRecords object (if present). Note that this value could differ from the value of the associated record's name field. Example #Get disable my $disable = $allrecord->disable(). NIOS 5. Example #Get name my $name = $allrecord->name(). name( ) Use this method to retrieve the name of of the record associated with the AllRecords object. . Example #Get type my $type = $allrecord->type().1r4 Page 353 (Rev.

infoblox.. object => "Infoblox::DNS::AllRecords". ).. } ####Code Fragment Ends#### inside the while() cycle and afterwards call #Code sample fragment Starts: @full_record_objects=$session->fill_partial_object(\@temp). http://www.com'. only a limited number will be returned at a time. AUTHOR Infoblox Inc. some criteria . #Code sample fragment Starts: $cursor=$session->new_cursor( fetch_size => 100.) { push @temp. zone => 'domain. please consider using the paging support via Infoblox::Cursor.. SAMPLE CODE In cases where a large number of matching records exist on the appliance. Example #Get zone my $zone = $allrecord->zone(). you can add the following code #Code sample fragment Starts: if( .com/ SEE ALSO Infoblox::Session.1r4 Page 354 (Rev. If all of the matching records are required.Infoblox API Documentation Returns The method returns the attribute value. Returns The method returns the attribute value. $current_record->record(). ####Code Fragment Ends#### to fill the wanted objects. NIOS 5. zone( ) Use this method to retrieve the zone name of the record associated with the AllRecords object. while ($current_record = $cursor->fetch()) { # $current_record will contain a matching AllRecords object } # All matching AllRecords will be returned # when the cycle ends. Example #Get view my $view = $allrecord->view().. view => 'default'. A) . Infoblox::Session->search()/> COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. If you want full record objects for some of the above.

A) .1r4 Page 355 (Rev.Infoblox API Documentation NIOS 5.

Infoblox::Session->add( ) Use this method to add a BulkHost record object to the Infoblox appliance. Before adding a BulkHost. DESCRIPTION If you need to add a large number of hosts. comment => $string. prefix => $string. See Infoblox::Session->add() for parameters and return values. Note that you must specify only one view for the attribute "views".Infoblox API Documentation Infoblox::DNS::BulkHost .Create a group of hosts. so this name should not be used for CNAMEs and host aliases because doing so causes conflicts. zone => $fqdn. The Infoblox appliance uses the name space bulk-xx-xx-xx-xx for BulkHosts.1r4 Page 356 (Rev. This group of hosts is referred to as a BulkHost. NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS comment( ) disable( ) end_addr( ) name_template( ) prefix( ) reverse( ) start_addr( ) ttl( ) use_name_template( ) views( ) zone( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::BulkHost . views => [$View1] ). A) . CONSTRUCTOR my $bulkhost = Infoblox::DNS::BulkHost->new( end_addr => $ipv4addr. #Required #Required #Required #Required #Optional / Default is empty #Optional / Default "false" #Optional / Default is undefined #Optional / Default "false" #Optional / Default is undefined #Optional / Default is "false" #Optional / Default is "default" view SESSION METHODS This section describes all the methods in Infoblox::Session module that you can apply to a DNS BulkHost record object. ttl => $num | undef.Create a group of hosts. name_template => $string | undef. reverse => "true" | "false". make sure that no CNAMEs or host aliases uses this name. Example NIOS 5. you can have the Infoblox appliance add them as a group and automatically assign host names based on a range of IP addresses and name format applied to it. use_name_template => "true" | "false". start_addr => $ipv4addr. disable => "true" | "false".

End address of the bulk host. name_template . A) . The bulk host name template in string format. Time to Live (TTL) value in integer format. Infoblox::Session->modify( ) Use this method to modify a BulkHost record object in the Infoblox appliance. zone => "domain. and then submit this object for removal.com". Example #Get BulkHost object through the session my @retrieved_objs = $session->get( object => "Infoblox::DNS::BulkHost". Disable flag of a DNS BulkHost record in boolean format.Optional. view => "default". reverse . The default is all DNS views. first use get() or search() to retrieve the specific BulkHost record object. NIOS 5. prefix => "prefix".Optional. use_name_template => "true".com".Optional.Optional. comment .0.0. Start address of the bulk host.Optional. start_addr .0.Optional. See Infoblox::Session->remove() for parameters and return values. use_name_template => "true". end_addr . reverse => "true" ). Infoblox::Session->remove( ) Use this method to remove a BulkHost record object from the Infoblox appliance. disable => "false".Optional.5".Optional. See Infoblox::Session->get() for parameters and return values. use_name_template . ttl => 3600. Key References Apply the following attributes to get a specific DNS BulkHost object: zone . Use name template flag of a DNS BulkHost record in boolean format.0. Example #Get BulkHost object through the session my @retrieved_objs = $session->get( object => "Infoblox::DNS::BulkHost". Prefix of the bulk host. start_addr => "1. disable . Example #Use method to modify the prefix.Optional.1r4 Page 357 (Rev. comment => "add bulk host".Optional.1".0. prefix => "prefix". #Submit for addition my $response = $session->add($bulk_host) Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. name_template => "Three Octets". A comment in string format. prefix . To remove a specific object.6".Infoblox API Documentation #Construct an object my $bulk_host = Infoblox::DNS::BulkHost->new( zone => "domain.0. reverse => "true".Optional. view . end_addr => "1. Reverse flag of a DNS BulkHost record in boolean format. end_addr => "1. name_template => "Three Octets" ). ttl . See Infoblox::Session->modify() for parameters and return values. zone => "domain. $bulk_host->prefix("test").com".0.2". The DNS view in which the bulk host record is located.0. start_addr => "1. A zone name in string format. #Submit modification my $response = $session->modify( $bulk_host ).

Just leave this field unspecified. #Submit for removal my $response = $session->remove( $desired_bulk ). NIOS 5. Include the specified parameter to set the attribute value. Infoblox::Session->search( ) Use this method to search for Bulk Host objects in the Infoblox appliance.0. METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a BulkHost object. use_name_template . Optional.*" if you want to obtain BulkHost records with all name_templates. name_template . Include the specified parameter to set the attribute value. The bulk host name template in string format. Prefix of the bulk host (regular expression).Infoblox API Documentation prefix => "test".0.1". This is B<not> a regular expression. Use name template flag of a DNS BulkHost record in boolean format.Optional. A) .Optional. If you did not specify a parameter. Disable flag of a DNS BulkHost record in boolean format. The default value for this field is false. Start address of the bulk host. See Infoblox::Session->search() for parameters and return values. Optional. the method returns true when the modification succeeds. my $desired_bulk = $retrieved_objs[0].0. Example #Get comment my $comment = $bulkhost->comment(). Zone name in FQDN format (regular expression). Omit the parameter to retrieve the attribute value. Optional. Optional. prefix => "prefix.Optional.5" ). disable . end_addr => "1. The DNS BulkHost record is enabled. start_addr => "1. Optional. so do not specify this value to ".*" ). The DNS view in which the bulk host record is located (regular expression). Returns If you specified a parameter. comment( ) Use this method to set or retrieve the descriptive comment. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Parameter Desired comment in string format with a maximum of 256 bytes. Key References Apply the following attributes to search for a specific Bulk Host object: zone prefix start_addr end_addr comment view The default is Optional.0. Time to Live (TTL) value in integer format. ttl . A comment in string format (regular expression). #Modify comment $bulkhost->comment("Modifying the BulkHost comment"). reverse . #Find the desired object from the retrieved list. disable( ) Use this method to set or retrieve the disable flag of a DNS BulkHost record. the method returns the attribute value. Example # search for all Bulk Host objects that start with "prefix" my @retrieved_objs = $session->search( object => "Infoblox::DNS::BulkHost". all DNS views.Optional.Optional. End address of the bulk host.1r4 Page 358 (Rev. Reverse flag of a DNS BulkHost record in boolean format.

the appliance displays an error message indicating the number of characters that you must remove to NIOS 5. prefix( ) Use this method to set or retrieve the prefix for the BulkHost. The sum of the bulk host prefix length and suffix length must not exceed 63 characters. Parameter The name of a bulk host name format. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. the method returns the attribute value. Parameter Desired text with the prefix for the BulkHost. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. name_template( ) Use this method to set or retrieve the bulk host name template. Include the specified parameter to set the attribute value. the method returns the attribute value. Example #Get end_addr my $end_addr = $bulkhost->end_addr(). the method returns the attribute value. Omit the parameter to retrieve the attribute value. Example #Get name_template my $name_template = $bulkhost->name_template(). If it does. #Modify disable $bulkhost->disable("true"). #Modify end_addr $bulkhost->end_addr("1.6"). If you did not specify a parameter. Specify a bulk host name format value to override the name format at the grid level. Returns If you specified a parameter.168. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. end_addr( ) Use this method to set or retrieve the last IP address in the address range of the BulkHost. If you did not specify a parameter. Include the specified parameter to set the attribute value. The default value is undefined which indicates the grid level default bulk host name format is used. and returns false when the operation fails. and returns false when the operation fails.0. Parameter An IP address is a 32-bit number in dotted decimal notation. and returns false when the operation fails. If you did not specify a parameter. Returns If you specified a parameter. The prefix is the name (or a series of characters) inserted at the beginning of each host name. A) .1r4 Page 359 (Rev.0. the method returns true when the modification succeeds.1.Infoblox API Documentation Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. Example #Get disable my $disable = $bulkhost->disable().2). #Modify name_template $bulkhost->name_template("Three Octets"). Include the specified parameter to set the attribute value.

0.1. the method returns the attribute value. If the flag is enabled. NIOS 5. Zero indicates that the record should not be cached. the method returns the attribute value. and returns false when the operation fails. #Modify reverse $bulkhost->reverse("true"). the method returns true when the modification succeeds. If you did not specify a parameter. Parameter Specify "true" to set the flag or "false" to deactivate/unset it. If you did not specify a parameter. start_addr( ) Use this method to set or retrieve the first IP address in the address range of the BulkHost.1r4 Page 360 (Rev. Parameter An IP address is a 32-bit number in dotted decimal notation. If you did not specify a parameter. and returns false when the operation fails. Returns If you specified a parameter. The default value is undefined which indicates that the record inherits the TTL value of the zone. the method returns true when the modification succeeds. ttl( ) Use this method to set or retrieve the Time to Live (TTL) value. the method returns the attribute value. Include the specified parameter to set the attribute value. Returns If you specified a parameter.Infoblox API Documentation make a valid prefix. reverse( ) Use this method to set or retrieve the reverse flag of the BulkHost record. Example #Get start_addr my $start_addr = $bulkhost->start_addr().2"). It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.168.2). Example #Get reverse my $reverse = $bulkhost->reverse(). Example #Get prefix my $prefix = $bulkhost->prefix(). #Modify prefix $bulkhost->prefix("test"). Returns If you specified a parameter. and returns false when the operation fails. reverse mapping address(es) are added automatically if a reverse mapping zone exists.0. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. #Modify start_addr $bulkhost->start_addr("1. Specify a TTL value to override the TTL value at the zone level. Parameter A 32-bit integer (range from 0 to 4294967295) that represents the duration in seconds that the record is cached. A) . Include the specified parameter to set the attribute value.

If you did not specify a parameter. the method returns true when the modification succeeds. Parameter A zone name in FQDN (Fully Qualified Domain Name) format. the method returns true when the modification succeeds. the method returns true when the modification succeeds. This setting overrides the grid level bulk host name format. Returns If you specified a parameter. and returns false when the operation fails. the method returns the attribute value. NIOS 5. The FQDN consists of the host_name followed by the domain name (example: abc. Example #Get ttl my $ttl = $bulkhost->ttl(). If you did not specify a parameter. The default value is the "default" view. #Modify use_name_template $bulkhost->use_name_template("true"). and returns false when the operation fails. Include the specified parameter to set the attribute value. and returns false when the operation fails. Example #Get use_name_template my $use_name_template = $bulkhost->use_name_template(). Note that the array size must be 1. Example #Get views my $views = $bulkhost->views(). If you did not specify a parameter. the method returns the attribute value. use_name_template( ) Use this method to set or retrieve the use_name_template flag value.1r4 Page 361 (Rev. Omit the parameter to retrieve the attribute value.com). zone( ) Use this method to set or retrieve the zone name. Include the specified parameter to set the attribute value. the method returns the attribute value. A host_name can have a maximum of 256 characters. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. the method returns the attribute value. Parameter Array reference of defined Infoblox::DNS::View objects. #Modify views $bulkhost->views([$view1]). A) . #Modify ttl $bulkhost->ttl(3600). Include the specified parameter to set the attribute value. Parameter Specify "true" to set the flag or "false" to deactivate/unset it. views( ) Use this method to set or retrieve the view of a BulkHost. Returns If you specified a parameter. If you did not specify a parameter. and returns false when the operation fails.Infoblox API Documentation Returns If you specified a parameter. the method returns true when the modification succeeds. which means the BulkHost object is located under the default view. Returns If you specified a parameter.

name => "domain. ":" . Infoblox::status_code() . Infoblox::status_code() . comment => "add bulk host". reverse => "true" ).0. #Modify zone $bulkhost->zone("test.1. $session->status_detail()). Infoblox::status_detail()). use Infoblox. Infoblox::status_detail()). start_addr => "1. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192.2". unless ($session) { die("Construct session failed: ". #Add the BulkHost object to Infoblox Appliance through a session $session->add($bulk_host) or die("Add BulkHost object failed: ". ). ":" . This sample also includes error handling for the operations. end_addr => "1. #Preparation prior to a Bulk Host object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. #appliance user login password => "infoblox" #appliance password ).com".168. use_name_template => "true". unless($bulk_host) { die("Construct BulkHost failed: ". #appliance host ip username => "admin". safe to add the zone\n".0. } print "BulkHost object created successfully\n".0. #Create a BulkHost object my $bulk_host = Infoblox::DNS::BulkHost->new( zone => "domain. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object. Infoblox::status_code() . } print "Session created successfully\n". #Create the zone prior to a BulkHost insertion my $zone = Infoblox::DNS::Zone->new( name => "domain. name_template => "Three Octets".1r4 Page 362 (Rev. ":" . email => "admin\@domain. prefix => "prefix". modify. } print "Zone object created successfully\n".1".0. comment => "add a zone domain. unless ($zone) { die("Construct zone failed: ".com".Infoblox API Documentation Example #Get zone my $zone = $bulkhost->zone().5". such as add. and remove. $session->status_code() . } print "Zone added successfully\n".com". Infoblox::status_detail()). unless ($object) { print "Zone does not exist on server.com").com". #Verify if the zone exists my $object = $session->get(object => "Infoblox::DNS::Zone". $session status code $session status detail NIOS 5.com"). ":" . search. $session->add($zone) or die("Add zone failed: ". A) .

} print "Search Bulk Host object found at least 1 matching entry\n". ":" .com" ).1r4 Page 363 (Rev. #Search for a specific DNS BulkHost record ()). } print "Search Bulk Host object found at least 1 matching entry\n". ).5". ).1".0. $session->status_code() . $session->status_code() . unless ($object) { die("Search Bulk Host object failed: ". unless ($object) { die("Search Bulk Host object failed: ". zone => "domain. ":" . A) . -> print "Bulk Host object added to server successfully\n". $session->status_detail()). ":" . my $object = $retrieved_objs[0]. start_addr => "1. unless ($object) { die("Search Bulk Host object failed: ".0.com" my @retrieved_objs = $session->search( object => "Infoblox::DNS::BulkHost". unless ($object) { die("Get BulkHost object failed: ". zone => "domain. $session->status_detail()). #Apply the changes $session->modify($object) or die("Modify BulkHost object failed: ". #Search for all BulkHost objects with specific end_addr my @retrieved_objs = $session->search( object => "Infoblox::DNS::BulkHost". ":" . $session->status_code() .0. } print "Search Bulk Host object found at least 1 matching entry\n". my $object = $retrieved_objs[0]. #Get and modify a BulkHost object #Get BulkHost object through the session my @retrieved_objs = $session->get( object => "Infoblox::DNS::BulkHost". #Modify one of the attributes of the specified BulkHost object $object->prefix("test").com".Infoblox API Documentation -> () . #Search for all BulkHost objects in the zone "domain.0. ":" . $session->status_detail()). $session->status_detail()). #Search for all BulkHost objects with specific start_addr my @retrieved_objs = $session->search( object => "Infoblox::DNS::BulkHost". prefix => "prefix. #Search for all BulkHost objects that start with prefix as "prefix" my @retrieved_objs = $session->search( object => "Infoblox::DNS::BulkHost". $session->status_detail()). } print "Get BulkHost object found at least 1 matching entry\n". unless ($object) { die("Search Bulk Host object failed: ". end_addr => "1. } print "Search Bulk Host object found at least 1 matching entry\n".*" ). my $object = $retrieved_objs[0]. $session->status_code() . my $object = $retrieved_objs[0]. ). my $object = $retrieved_objs[0]. ":" . NIOS 5. $session->status_code() .

$session->status_code() .5" ). http://www.com". NIOS 5.Infoblox API Documentation $session->status_code() . } print "Get BulkHost object found at least 1 matching entry\n". Infoblox::Session->get(). prefix => "test". start_addr => "1. ":" .0. $session->status_detail()). #Remove a BulkHost object #Get BulkHost object through the session my @retrieved_objs = $session->get( object => "Infoblox::DNS::BulkHost".Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. $session->status_code() . my $object = $retrieved_objs[0].0. Infoblox::DNS::Zone.com/ SEE ALSO Infoblox::DNS::View. $session->status_detail()).infoblox. Infoblox::Session->search(). end_addr => "1. ":" .1r4 Page 364 (Rev. #Submit the object for removal $session->remove($object) or die("Remove BulkHost object failed: ". Infoblox::Session->remove(). ":" . Infoblox::Session->add(). unless ($object) { die("Get BulkHost object failed: ". A) . print "BulkHost object modified successfully \n".1".0. print "BulkHost object removed successfully \n". Infoblox::Session->modify(). zone => "domain.0. $session->status_detail()).

#Required fqdn => $string. my $dnssec_key = Infoblox::DNS::DnssecTrustedKey->new( algorithm => "RSAMD5". fqdn => "example. RFC 4034. Infoblox::Grid::Member::DNS->dnssec_trusted_keys( ) Use this function to specify a list of DNSSEC keys for a grid member object. In order to be secure. key => "Zx1jVJl7C58GT/sc7Q3ucA==". MODULE METHODS This section describes all the functions that you can apply to a DnssecTrustedKey object. Example ## Construct the trusted key object my $dnssec_key = Infoblox::DNS::DnssecTrustedKey->new( algorithm => "RSAMD5". DNSSEC is based on DNS specifications RFC 4033. the DNS server can perform validation.1r4 Page 365 (Rev. CONSTRUCTOR my $dnssec_trusted_key=Infoblox::DNS::DnssecTrustedKey( algorithm => "RSAMD5"|"DSA"|"RSASHA1"|"NSEC3DSA"|"NSEC3RSASHA1"|"RSASHA256"|"RSASHA512"|"NSEC3RSASHA256"|"NSEC3RSASHA512"|1|3|5|6| . this validation relies on a set of trust anchors. and RFC 4035.Infoblox API Documentation Infoblox::DNS::DnssecTrustedKey .com". NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::Grid::DNS->dnssec_trusted_keys( ) Infoblox::Grid::Member::DNS->dnssec_trusted_keys( ) Infoblox::DNS::View->dnssec_trusted_keys( ) METHODS algorithm( ) fqdn( ) key( ) secure_entry_point() SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::DnssecTrustedKey . #Required secure_entry_point => "true"|"false" #Optional / Default is "true" ). fqdn => "example. DESCRIPTION For recursively derived signed data. which provide authentication protocol enhancements to secure DNS transactions. These trust anchors and their associated trusted keys can be specified via the Infoblox::DNS::DnssecTrustedKey objects. secure_entry_point => "false" ). Example ## Construct the trusted key object. key => "Zx1jVJl7C58GT/sc7Q3ucA==". When trying to implement this example replace with the actual public key of the signed zone. # Configure dnssec_trusted_keys on the grid DNS object NIOS 5. # Configure dnssec_trusted_keys on the grid DNS object my $response = $Grid_DNS->dnssec_trusted_keys([$dnssec_key]).com". A) . Infoblox::Grid::DNS->dnssec_trusted_keys( ) Use this function to specify a list of DNSSEC keys for a grid object. secure_entry_point => "false" ). #Required key => $string.DNSSEC trusted key object.DNSSEC trusted key object.

The following table shows the correlation between the integers and mnemonics for the algorithms supported by the appliance: Value 1 3 5 6 7 Algorithm Mnemonic RSA/MD5 RSAMD5 DSA DSA RSA/SHA-1 RSASHA1 NSEC3DSA NSEC3DSA NSEC3RSA/SHA-1 NSEC3RSASHA1 For algorithms not listed above. Omit the parameter to retrieve the attribute value.example. and returns false when the operation fails. Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value. This can be either an integer or mnemonic. Omit the parameter to retrieve the attribute value.Infoblox API Documentation my $response = $Grid_Member_DNS->dnssec_trusted_keys([$dnssec_key]). secure_entry_point => "false" ). fqdn( ) Use this method to set or retrieve the FQDN of the zone to which the key belongs. fqdn => "example. If you did not specify a parameter. # Modifying algorithm $dnssec_key->algorithm("DSA"). key => "Zx1jVJl7C58GT/sc7Q3ucA==". and returns false when the operation fails. the method returns true when the modification succeeds. the method returns the attribute value. Returns If you specified a parameter. METHODS algorithm( ) Use this method to set or retrieve a DNSSEC encryption algorithm. the method returns true when the modification succeeds. Parameter The public-key encryption algorithm.1r4 Page 366 (Rev. Infoblox::DNS::View->dnssec_trusted_keys( ) Use this function to specify a list of DNSSEC keys for a DNS View object. # Configure dnssec_trusted_keys on the grid DNS object my $response = $DNS_View->dnssec_trusted_keys([$dnssec_key]). the method returns the attribute value.com"). only the mnemonic representation is supported. A) . in DNS label order. If you did not specify a parameter.com". Include the specified parameter to set the attribute value. Example # Getting fqdn my $zone = $dnssec_key->fqdn(). Parameter FQDN of the zone to which the trusted_key pertains. key( ) Use this method to add or retrieve the DNSSEC public key for the zone. NIOS 5. # Modifying algorithm $dnssec_key->fqdn("zone. Returns If you specified a parameter. Parameter Base-64 encoding of the key. Example ## Construct the trusted key object my $dnssec_key = Infoblox::DNS::DnssecTrustedKey->new( algorithm => "RSAMD5". Include the specified parameter to set the attribute value. Example # Getting algorithm my $algorithm = $dnssec_key->algorithm().

":" . } print "Session created successfully\n". #Create a DnssecTrustedKey object my $dnssec_key = Infoblox::DNS::DnssecTrustedKey->new( key => "ZX1jVJl7C58GT/sc7Q3ucA==". ##Preparation prior to a DnssecTrustedKey object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. ":" . If you did not specify a parameter. } print "DnssecTrustedKey object created successfully\n". If you did not specify a parameter. #Get the member DNS object and add a DnssecTrustedKey object to it my @result_array = $session->get( object => "Infoblox::Grid::Member::DNS".localdomain" ). Omit the parameter to retrieve the attribute value. Infoblox::status_detail()). and returns false when the operation fails. unless ($session) { die("Construct session failed: ". name => "infoblox. use Infoblox. password => "infoblox" ). unless (scalar(@result_array) == 0) { my $memberdns = $result_array[0]. # Modifying key $dnssec_key->key("AQPdWbrGbVv1eDhNgRhpJMPonJfA3reyEo82ekwRnjbX7+uBxB11BqL7LAB7/C+eb0vCtI53FwMhkkNkTmA6bI8B"). SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object.1. Example # Getting key my $key = $dnssec_key->key(). Include the specified parameter to set the attribute value. and returns false when the operation fails. Infoblox::status_detail()). such as add and modify.com". the method returns true when the modification succeeds. A) . This sample also includes error handling for the operations.168. Parameter Set to "true" to enable the secure entry point.1r4 Page 367 (Rev.2". secure_entry_point() Use this method to set or retrieve the secure entry point value for the field. unless($dnssec_key) { die("Construct DnssecTrustedKey failed: ". #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. Infoblox::status_code() . Returns If you specified a parameter. if ($memberdns) { NIOS 5. Infoblox::status_code() . Example # Getting secure_entry_point my $sep = $dnssec_key->secure_entry_point().example. the method returns the attribute value. algorithm => "RSASHA1" ). # Modifying secure_entry_point $dnssec_key->secure_entry_point("false"). the method returns the attribute value. set to "false" to disable it. the method returns true when the modification succeeds.Infoblox API Documentation Returns If you specified a parameter. Default value of this parameter is "true". username => "admin". fqdn => "myzone.

NIOS 5. #Modify existing DnssecTrustedKey object #Modifying the value of the specified object. ":" . print "DnssecTrustedKey added to Member DNS object successfully\n". ":" . $memberdns->transfer_keys([$dnssec_key]) or die("modify member failed: ". $session->status_code() . ":" . print "Member DNS object with DnssecTrustedKey updated to Infoblox device successfully\n". $session->status_code() .com/ SEE ALSO Infoblox::Grid::Member::DNS. print "Member DNS object with DnssecTrustedKey fqdn updated to Infoblox device successfully\n". ":" .infoblox. } ####PROGRAM ENDS#### AUTHOR Infoblox Inc. $session->status_detail()). $memberdns->dnssec_trusted_keys([$dnssec_key]) or die("modify member failed: ".1r4 Page 368 (Rev. #Update member DNS object through the Infoblox session.Infoblox API Documentation #Apply changes to the Member object. $session->status_detail()). $session->modify($memberdns) or die("modify session failed: ". } } else { print "No member found with the specified name. Infoblox::Grid::DNS COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. $session->modify($memberdns) or die("modify session failed: ". print "Modify DnssecTrustedKey fqdn value\n". http://www. #Update member DNS object through the Infoblox session. A) . #Apply changes to the member object.". Infoblox::DNS::View. Infoblox::status_detail()). print "DnssecTrustedKey fqdn updated to Member DNS object successfully\n". $dnssec_key->fqdn("another. Infoblox::status_code() .com"). Infoblox::status_detail()).example. Infoblox::status_code() .

attach_empty_recursive_view( ) Use this method to set or retrieve the attach_empty_recursive_view flag of glue record object. Example # Retrieve the list of GlueRecordAddr objects from Member DNS object.Infoblox API Documentation Infoblox::DNS::GlueRecordAddr . Include the specified parameter to set the attribute value. MODULE METHODS This section describes all the functions that you can apply to a GlueRecordAddr object.Infoblox DNS Glue Record Object. #Save modification to Member DNS object. See Infoblox::Grid::Member::DNS>glue_record_addresses() for parameters and return values. #select the desired GlueRecordAddr for the view my $Grid_Member_DNS = $retrieved_objs[0]. my $ref_all_glue_record_addr = $Grid_Member_DNS->glue_record_addresses().1r4 Page 369 (Rev.localdomain" ). If the attach_empty_recursive_view flag is set to "true". It does not require manual construction. $glue_record_addr->glue_record_address("NAT"). Infoblox::Grid::Member::DNS->glue_record_addresses( ) Use this function to specify a glue record address for a view at the grid member level. # Modify Glue Record Address for the view to use NAT address. Parameter NIOS 5. my $response = $Grid_Member_DNS->glue_record_addresses($ref_all_glue_record_addr). then empty view with recursion enabled will be written into the conf file. my @retrieved_objs = $session->get( object => "Infoblox::Grid::Member::DNS". CONSTRUCTOR The Infoblox::DNS::GlueRecordAddr object is automatically generated upon the successful creation of the Infoblox::DNS::View object. DESCRIPTION The GlueRecordAddr allows you to specify which interface address the appliance uses to generate the glue record for each view. Omit the parameter to retrieve the attribute value.Infoblox DNS Glue Record Object. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::Grid::Member::DNS->glue_record_addresses( ) METHODS attach_empty_recursive_view( ) glue_record_address( ) view( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::GlueRecordAddr . name => "infoblox. A) . my $glue_record_addr = @$ref_all_glue_record_addr[0]. METHODS This section describes all the methods that you can use to configure and retrieve the attribute values of a GlueRecordAddr object.

This sample also includes error handling for the operations. glue_record_address( ) Use this method to set or retrieve the address the appliance uses to generate the glue record.Infoblox API Documentation Specify "true" to set the attach_empty_recursive_view flag or "false" to deactivate/unset it. If you did not specify a parameter.2". the method returns the attribute value. view( ) Use this method to retrieve the view of this Glue Record object Parameter None. my $glue_record_address = $glue_record_addr->glue_record_address(). Parameter String which specifies the interface address to use.1. Returns If you specified a parameter. } NIOS 5. Valid values are "interface". Example #Get view my $glue_record_view = $glue_record_addr->view(). SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object. #Preparation prior to a DNS GlueRecordAddr object modification #PROGRAM STARTS: Include all the modules that will be used use strict. or specify an IPv4 address. Omit the parameter to retrieve the attribute value. password => "infoblox" ). the method returns true when the modification succeeds. such as get and modify. A) . #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. username => "admin". unless ($session) { die("Construct session failed: ". my $attach_empty_recursive_view = $glue_record_addr->attach_empty_recursive_view(). Returns The method returns the attribute value. Infoblox::status_detail()). ":" . Infoblox::status_code() . #Modify glue record address. #Modify attach_empty_recursive_view. Include the specified parameter to set the attribute value. "NAT". the method returns the attribute value. the method returns true when the modification succeeds. $glue_record_addr->glue_record_address("NAT"). Returns If you specified a parameter.168.1r4 Page 370 (Rev. $glue_record_addr->attach_empty_recursive_view("true"). and returns false when the operation fails. Example #Get glue record address. Example #Get attach_empty_recursive_view. and returns false when the operation fails. If you did not specify a parameter. use Infoblox.

} print "Glue Record Address found on Grid Member DNS object\n".Infoblox::Grid::Member::DNS->glue_record_addresses() COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. unless ($Grid_Member_DNS) { die("Retrieve Grid Member DNS object failed: ". #submit changes to Infoblox appliance $session->modify($Grid_Member_DNS) or die("Modify Member DNS object on Infoblox appliance failed: ". Infoblox::status_detail()). name => "infoblox. my $response = $Grid_Member_DNS->glue_record_addresses($ref_all_glue_record_addr). ":" . ":" . unless ($glue_record_addr) { die("Glue Record Address not found on Grid Member DNS object: ". ":" . http://www. $session->status_code() . $session->status_code() .localdomain" ). my $Grid_Member_DNS = $retrieved_objs[0].Infoblox API Documentation print "Session created successfully\n". $session->status_detail()). print "Grid Member DNS modified on Infoblox appliance successfully\n". # Retrieve the list of GlueRecordAddr objects from Member DNS object. Infoblox::status_detail()). #Modify the Glue Record address my $ref_all_glue_record_addr = $Grid_Member_DNS->glue_record_addresses(). # Save modification to Member DNS object. NIOS 5. # Modify Glue Record Address for the view to use a custom defined address.infoblox. my @retrieved_objs = $session->get( object => "Infoblox::Grid::Member::DNS". $session->status_detail()). Infoblox::status_code() .1r4 Page 371 (Rev.com/ SEE ALSO Infoblox::Session->get(). Infoblox::status_detail()). } print "Grid Member DNS object retrieve successfully\n". unless($response) { die("Modify glue record on Member DNS failed: ". } print "Glue Record Address updated to Grid Member DNS object successfully\n". Infoblox::status_code() . print "Glue Record Address modified successfully\n". ####PROGRAM ENDS#### AUTHOR Infoblox Inc. ":" . $glue_record_addr->glue_record_address("interface") or die("modify glue record failed: ". ":" . A) . Infoblox::status_code() . Infoblox::Session->modify(). # Select the desired GlueRecordAddr for the view my $glue_record_addr = @$ref_all_glue_record_addr[0].

$fqdn.Infoblox API Documentation Infoblox::DNS::Host . CONSTRUCTOR my $host = Infoblox::DNS::Host->new( ipv4addrs => [$ipv4addr. Note that you must specify only one view for the attribute "views"... $ipv6addr. #Optional / Default "true" disable => "true" | "false". NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS aliases( ) comment( ) configure_for_dns( ) disable( ) extensible_attributes( ) ipv4addrs( ) ipv6addrs( ) name( ) network_view( ) ttl( ) views( ) zone( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::Host . #Optional / Default is undefined views => [$View] #Optional / Default is "default" view ). $FixedAddr. A host can also define aliases and DHCP fixed address nodes. #Optional / Default is empty network_view => $NetworkView.. #Required name => $fqdn.. See Infoblox::Session->add() for parameters and return values.].].DNS Host record object... . ]. This alleviates having to specify an A record and a PTR record separately for the same node. #Optional / Default is undefined configure_for_dns => "true" | "false". $string => [ $string | $num... $ipv4addr. #Optional / Default is "default" network view ttl => $num | undef. DESCRIPTION A host record defines attributes for a node. . Example NIOS 5.1r4 Page 372 (Rev. The zone must be created first before adding a host record for the zone. .].. . Infoblox::Session->add( ) Use this method to add a host record object to the Infoblox appliance. #Optional / Default "false" extensible_attributes => { $string => $string | $num. #Required aliases => [$fqdn. .. SESSION METHODS This section describes all the methods in the Infoblox::Session module that you can apply to a DNS host record object. A) . such as the name-to-address and address-to-name mapping. #Optional / Default is empty comment => $string.DNS Host record object. } #Optional / Default is undefined ipv6addrs => [$ipv6addr.

view . zone => "test.Optional. See Infoblox::Session->remove() for parameters and return values.test. The DNS view in which the host record is located.Optional.4"]. A zone name in FQDN format.Infoblox API Documentation #Construct an object my $host = Infoblox::DNS::Host->new( name => "host1. A hash reference containing extensible attributes. alias .test.Optional. Infoblox::Session->remove( ) Use this method to remove a host record object from the Infoblox appliance.foo. A comment in string format (regular expression) mac . view => "default" ). views => [$view1]. ). all network views are searched. ipv4addrs => ["4. # Submit modification my $response = $session->modify( $host ). zone .Optional.Optional.com".foo. and then submit this object for removal. the appliance searches the 'default' view only. An IPv6 address in string format (regular expression). "default". network_view => "default". comment => "add a host host1. "two.com". comment . Key References Apply the following attributes to get a specific DNS host object: name . Examples my @retrieved_objs = $session->get( object => name => network_view => view => "Infoblox::DNS::Host". Example # Use method to modify the comment. ipv6addr . A host name in string format. disable => "true". Infoblox::Session->modify( ) Use this method to modify a host record object in the Infoblox appliance.Optional. # get all DNS host objects in zone "test. See Infoblox::Session->get() for parameters and return values. "host1.Optional. An alias of the host in string format (regular expression). "default" ). all DNS views are searched.com"]. A MAC address present in any FixedAddr object in the ipv4addrs member. By default.Optional.Optional. my @retrieved_objs = $session->get( object => "Infoblox::DNS::Host". first use get() or search() to retrieve the specific host record object.com". extensible_attributes => { 'Site' => 'Santa Clara' }). extensible_attributes . Example NIOS 5. newtork_view => $nview.4. But if you omit this attribute and specify a zone. # Submit for addition my $response = $session->add( $host ).com" of default view my @retrieved_objs = $session->get( object => "Infoblox::DNS::Host".test. aliases => ["one. network_view . See Infoblox::Session->modify() for parameters and return values.4. ipv6addrs => ["2001::1:2:3:4"]. A) . The network view in which the host record is located. Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. ipv4addr . To remove a specific object. $host->comment("this is a modified comment"). By default.com". ttl => 3600.1r4 Page 373 (Rev.Optional. An IP address in string format (regular expression).com".

extensible_attributes .Optional.Optional.Optional. aliases( ) Use this method to set or retrieve the aliases of the host. An IPv6 address in string format (regular expression). mac .Optional.*\. Include the specified parameter to set the attribute value. and returns false when the operation fails. view .Infoblox API Documentation # Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DNS::Host". the method returns the attribute value. to search for a DNS host record object: name . # Submit for removal my $response = $session->remove( $desired_host ). See Infoblox::Session->search() for parameters and return values. A) . comment => ".Optional.com". ipv4addr . the appliance searches the 'default' view only. zone => "test. If you did not specify a parameter. The default value is undefined. An IP address in string format (regular expression). the method returns true when the modification succeeds.Optional. view => "default". network_view => "default". By default.*modified comment" ). A host name in string format (regular expression). comment . Returns If you specified a parameter. An alias of the host in string format (regular expression). my $desired_host = $retrieved_objs[0]. A MAC address present in any FixedAddr object in the ipv4addrs member (regular expression). By default. all DNS views are searched. Examples # search for all DNS host objects that match ".Optional. view => "default" ). Parameter Array reference with the aliases for the host. Example #Getting aliases NIOS 5. The DNS view in which the host record is located. The aliases of the host should be in Fully Qualified Domain Name (FQDN) format. The network view in which the host record is located. Key References Apply the following attributes.com'. # search for all DNS host objects in zone "test.Optional.test\. Omit the parameter to retrieve the attribute value.com".com" of default view my @retrieved_objs = $session->search( object => "Infoblox::DNS::Host".Optional. view => "default" ). A hash reference containing extensible attributes. name => "host1.com" in the default DNS view my @retrieved_objs = $session->search( object => "Infoblox::DNS::Host". all network views are searched. zone .test.1r4 Page 374 (Rev. A zone name in FQDN format. ipv6addr . alias .test. A comment in string format (regular expression).Optional. Infoblox::Session->search( ) Use this method to search for DNS host record objects in the Infoblox appliance. network_view . # Find the desired object from the retrieved list. extensible_attributes => { 'Site' => 'Santa Clara' }). METHODS This section describes all the methods that you can use to configure and retrieve the attribute values of a host record. # search for DNS host objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DNS::Host". But if you omit this attribute and specify a zone. name => '.

Example #Get disable my $disable = $host->disable(). #Modify configure_for_dns $host->configure_for_dns("false"). comment( ) Use this method to set or retrieve a descriptive comment. The host can be disabled instead of removed. and returns false when the operation fails. Example #Get configure_for_dns my $configure_for_dns = $host->configure_for_dns(). Include the specified parameter to set the attribute value. When the changes to the physical appliance are complete. The default value is undefined.1r4 Page 375 (Rev. Include the specified parameter to set the attribute value. NIOS 5. The default value is "true". Omit the parameter to retrieve the attribute value. the method returns the attribute value. Returns If you specified a parameter. If you did not specify a parameter. Parameter Specify "true" to set the configure_for_dns flag or "false" to deactivate/unset it.Infoblox API Documentation my $ref_aliases = $host->aliases().foo. Example #Get comment my $comment = $host->comment(). Include the specified parameter to set the attribute value. If you did not specify a parameter. If you did not specify a parameter. The default value is "false". #Modifying aliases $host->aliases(["one1. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value.com". "two2. and returns false when the operation fails. the method returns the attribute value.com"]). the method returns the attribute value. A) . Returns If you specified a parameter. Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. the host can be simply re-enabled. #Modify comment $host->comment("Modifying the DNS host comment"). disable( ) Use this method to set or retrieve the disable flag of a DNS host. The default value for this field is false. Returns If you specified a parameter. configure_for_dns( ) Use this method to set or retrieve the configure_for_dns flag of a DNS host. The default value for this field is true. Omit the parameter to retrieve the attribute value. Parameter Desired comment in string format with a maximum of 256 bytes. When configure_for_dns is false the host will not have parent zone information. You can avoid removing and re-adding a host when a network appliance is repaired or relocated. the method returns true when the modification succeeds. the method returns true when the modification succeeds.foo. and returns false when the operation fails.

"2. An IPv6 address is a string consisting of eight groups of four hexadecimal digits. Parameter Valid value is an array reference that contains defined Infoblox::DHCP::FixedAddr objects or IPv4 addresses. the method returns true when the modification succeeds. and returns false when the operation fails. For a date. Omit the parameter to retrieve the attribute value. the method returns the attribute value.2. 'Tom' ] }). i. such as omitting the leading zeros of each group and replacing one or any number of consecutive groups of 0 value with two colons(::).2"]). The names must be the names of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. If [] is set and the Host object is submitted for addition. The default value is undefined. the value is an integer from -2147483648 through 2147483647. Include the specified parameter to set the attribute value.Infoblox API Documentation #Modify disable $host->disable("false"). #$fixedaddr is an Infoblox::DHCP::FixedAddr object ipv6addrs( ) Use this method to set or retrieve the IPv6 addresses of the host. #Modify extensible attributes $host->extensible_attributes({ 'Site' => 'Santa Clara'. An IPv4 address is a 32-bit number in dotted decimal notation. Various shortcuts exist to shorten the string representation of an IPv6 address. and string types. Returns NIOS 5.e. #Modify ipv4addrs $host->ipv4addrs([$fixedaddr. URL. and returns false when the operation fails. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. The previous example can be written as 2001:db8:85a3::8a2e:370:7334. simply do not pass the ipv6addrs attribute to the constructor. 1970 UTC. For a list. the method returns the attribute value. ipv4addrs( ) Use this method to set or retrieve the IPv4 addresses of the host. setting this method to [] is not supported. the value is the number of seconds that have elapsed since January 1st.2). If the Infoblox::DNS::Host object does not have associated IPv6 addresses. Parameter Valid value is an array reference that contains IPv6 addresses in string format. where each group is separated by a colon (:) (example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334). the value is a string with a maximum of 256 characters.2. For an integer. Omit the parameter to retrieve the attribute value. extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DNS Host object. When creating an Infoblox::DNS::Host object. Include the specified parameter to set the attribute value. If you did not specify a parameter.1r4 Page 376 (Rev. A) . Returns If you specified a parameter. Example #Gett ipv4addrs my $ref_ipv4addr = $host->ipv4addrs(). the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. the value is a string with a maximum of 64 characters. If you did not specify a parameter. Include the specified parameter to set the attribute value. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. For email.1. Example #Get extensible attributes my $ref_extensible_attributes = host->extensible_attributes(). the following error will be reported: "A host record requires at least one IP address." Setting the method to [] is supported for modify requests. 'Administrator' => [ 'Peter'. Returns If you specified a parameter. 168.

and returns false when the operation fails. network_view( ) Use this method to set or retrieve the network view of the DNS host. A) .com"). Parameter Valid value is a defined Infoblox::DHCP::View object. with an Infoblox::DHCP::View object $host->network_view($nview). #Modify name $host-> name("host2. Omit the parameter to retrieve the attribute value. "2002::1:2:3:4"]). If you did not specify a parameter. Returns If you specified a parameter.com). Omit the parameter to retrieve the attribute value. Parameter A 32-bit integer (range from 0 to 4294967295) that represents the duration in seconds that the record is cached.1r4 Page 377 (Rev.Infoblox API Documentation If you specified a parameter. Returns If you specified a parameter. Include the specified parameter to set the attribute value.test. Example #Gett ipv6addrs my $ref_ipv6addr = $host->ipv6addrs(). the method returns true when the modification succeeds. The default value is the "default" network view. and returns false when the operation fails. The default value is undefined which indicates that the record inherits the TTL value of the zone. Returns If you specified a parameter. Include the specified parameter to set the attribute value. ttl( ) Use this method to set or retrieve the Time to Live (TTL) value. Include the specified parameter to set the attribute value. the method returns the attribute value. and returns false when the operation fails. The default network view value is the system-defined default network view object. Parameter Host name in FQDN (Fully Qualified Domain Name) format. If you did not specify a parameter. Zero indicates that the record should not be cached. the method returns true when the modification succeeds. name( ) Use this method to set or retrieve the host name. Omit the parameter to retrieve the attribute value. the method returns the attribute value. Specify a TTL value to override the TTL value at the zone level. The FQDN consists of the host name followed by the domain name (example: abc. which means the DNS host is in the default network view. A host name can have a maximum of 256 bytes. the method returns true when the modification succeeds. Example #Get network view my $nview = $host->network_view(). #Modify network view. and returns false when the operation fails. If you did not specify a parameter. Example #Get name my $name = $host->name(). the method returns the attribute value. #Modify ipv6addrs $host->ipv6addrs(["2001::1". the method returns true when the modification succeeds. NIOS 5. The default value is undefined.

Parameter None Returns Returns the attribute value. Example #Get ttl my $ttl = $host->ttl(). #Modify ttl $host->ttl(1800). views( ) Use this method to set or retrieve the view of the DNS host. use Infoblox.1r4 Page 378 (Rev. #Preparation prior to a DNS host record insertion #PROGRAM STARTS: Include all the modules that will be used use strict. Parameter Array reference of defined Infoblox::DNS::View objects. Note that the array size must be 1. which means the DNS host is located under the default view. Infoblox::status_code() . search. Example #Get views my $ref_views = $host->views(). Example # Get zone my $zone = $host->zone(). #Create a session to the Infoblox Appliance my $session = Infoblox::Session->new( master => "192. ":" . A) . The default view value is "default". NIOS 5. zone( ) Use this method to retrieve the zone name of a DNS host object. the method returns the attribute value. This sample also includes error handling for the operations.2". unless ($session) { die("Construct session failed: ". This method is read-only and cannot be set. #Modify views. list of Infoblox::DNS::View objects $host->views([$view1]). Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. #appliance user login password => "infoblox" #appliance password ). Returns If you specified a parameter.168. the method returns the attribute value. The default value is the "default" view. If you did not specify a parameter. #Un-override ttl $host->ttl(undef). SAMPLE CODE The following sample code demonstrates the different functions that can be applied to a Host record object. #appliance host ip username => "admin".1. Infoblox::status_detail()). modify. such as add.Infoblox API Documentation If you did not specify a parameter. Include the specified parameter to set the attribute value. and returns false when the operation fails. and remove.

4. ":" . "two. disable => "true".foo. Infoblox::status_code() . ":" . my $object = $retrieved_objs[0].*". $session->add($zone) or die("Add zone failed: ".com' ).Infoblox API Documentation } #Create the zone prior to an host insertion my $zone = Infoblox::DNS::Zone->new(name => "test. $session->status_detail()). $session->status_detail()). unless ($host) { die("Construct DNS host record failed: ".com my @retrieved_objs = $session->search( object => "Infoblox::DNS::Host". ). name => 'host1\.4"]. #Add the DNS host record object to Infoblox appliance through a session $session->add($host) or die("Add host record failed: ". ). A) . Infoblox::status_detail()).com"].test. aliases => ["one.com". $session->status_code() . #Search for a specific DNS host record #Search host record host1.com". ":" . $session->status_code() . #Search all host records that start with "host1" in the zone NIOS 5.com"). $session->status_code() . Infoblox::status_code() .1r4 Page 379 (Rev. name => "test. } print "Zone added successfully\n". #Create a DNS host record #Construct a DNS host object my $host = Infoblox::DNS::Host->new( name => "host1. #Verify if the zone exists my $object = $session->get(object => "Infoblox::DNS::Zone".com". ":" . comment => "add a host host1. } print "Search DNS host object found at least 1 matching entry\n". ipv4addrs => ["4. ":" . unless ($zone) { die("Construct zone failed: ". ":" . Infoblox::status_detail()).test.test\. comment => "add.com"). safe to add the zone\n". unless ($object) { die("Search host record failed: ".test. } print "Zone object created successfully\n". $session->status_detail()). my $object = $retrieved_objs[0]. $session->status_detail()).4. print "DNS host object added to server successfully\n". unless ($object) { print "Zone does not exist on server.foo. ttl => 3600. unless ($object) { die("Search host record failed: ". $session->status_code() . #Search all host records that start with "add" in the comment my @retrieved_objs = $session->search( object => "Infoblox::DNS::Host". ipv6addrs => ["2001::4:4:4:4"]. } print "DNS host object created successfully\n". } print "Search DNS host object using regexp in comment field found at least 1 matching entry\n".

Infoblox API Documentation my @retrieved_objs = $session->search( object => "Infoblox::DNS::Host".com" ). Infoblox::Session->search(). ":" . ":" .1r4 Page 380 (Rev. NIOS 5.infoblox. ":" . $session->status_code() . #Submit the object for removal $session->remove($object) or die("Remove host record failed: ". name => "host1. } print "Get DNS host object successfull\n". my $object = $retrieved_objs[0].Infoblox::Session->add(). http://www. $session->status_code() . my $object = $retrieved_objs[0]. name => "host1. } #Modify one of the attributes of the specified host record $object->comment("This is the modified comment").test. ). Infoblox::Session->remove().test. #Get host record through the session my @retrieved_objs = $session->get( object => "Infoblox::DNS::Host". name => 'host1. $session->status_code() . my $object = $retrieved_objs[0].com'. Infoblox::DHCP::FixedAddr. Infoblox::Session->get(). Infoblox::Session COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. } print "Search DNS host object using regexp in name field found at least 1 matching entry\n". $session->status_detail()). #Remove a DNS host record. print "DNS host object removed successfully \n". print "DNS host object modified successfully \n". #Get and modify a DNS host record #Get host record through the session my @retrieved_objs = $session->get( object => "Infoblox::DNS::Host". unless ($object) { die("Search host record failed: ". $session->status_detail()).com/ SEE ALSO Infoblox::DNS::View. Infoblox::Session->modify(). unless ($object) { die("Get host record failed: ". $session->status_detail()). ":" . Infoblox::DNS::Zone.com" ). ":" . $session->status_detail()). $session->status_code() . Infoblox::DHCP::View. ####PROGRAM ENDS#### AUTHOR Infoblox Inc. unless ($object) { die("Get host record failed: ".*\. #Applying the changes $session->modify($object) or die("Modify host record failed: ". $session->status_code() . A) . $session->status_detail()).

#Optional / Default is "false" name => $fqdn. lead => "false". A) . See Infoblox::DNS::Zone->primary() for parameters and return values. #Create the Zone object with this member NIOS 5.1r4 Page 381 (Rev. Example my $member1 = Infoblox::DNS::Member->new( name => "localhost. unless($member1) { die("Construct member failed: ". #Optional / Default is hostname of the matching ipv4addr stealth => "true" | "false" #Optional / Default is "false" ). distributed. stealth => "false". Infoblox::status_detail()). ipv4addr => "192. A grid member inherits its settings from the grid. MODULE METHODS The following functions are available to apply to an DNS Member object. #Required if $ipv6addr is not present ipv6addr => $ipv6addr. Infoblox::DNS::Zone->primary( ) Use this function to specify primary member to a zone. grid_replicate => "false" ). ":" .168. #Optional / Default is "false" lead => "true" | "false". A member is a single Infoblox appliance or an HA pair that provides DNS services seamlessly across an entire network.Infoblox API Documentation Infoblox::DNS::Member .2".DNS Member object NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DNS::Zone->primary( ) Infoblox::DNS::Zone->secondary( ) Infoblox::Grid::DNS::Nsgroup->primary( ) Infoblox::Grid::DNS::Nsgroup->secondary( ) METHODS grid_replicate( ) ipv4addr( ) ipv6addr( ) lead( ) name( ) stealth( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::Member . builtin database.localdomain".DNS Member object DESCRIPTION A grid member is part of a grid which is a group of two or more Infoblox appliances that share sections of a common. CONSTRUCTOR my $member = Infoblox::DNS::Member->new( ipv4addr => $ipv4addr.1. #Required if $ipv4addr is not present grid_replicate => "true" | "false". } print "Member object created successfully\n". Infoblox::status_code() .

} print "DNS member object added to the zone successfully\n". secondaries => [ $member2 ] .com".2". my $member2 = Infoblox::DNS::Member->new( name => "localhost1.2". primary => $member1. lead => "false". lead => "false". Infoblox::status_detail()). Infoblox::status_detail()). session->status_code() . Infoblox::Grid::DNS::Nsgroup->primary( ) Use this function to specify primary member to a NS group. ":" .Infoblox API Documentation my $firstzone = Infoblox::DNS::Zone->new( name => "infoblox. ":" . unless($member2) { die("Construct member failed: ". A) . lead => "false". ":" . Infoblox::DNS::Zone->secondary( ) Use this function to specify secondary member to a zone. Infoblox::status_code() . See Infoblox::DNS::Zone->secondary() for parameters and return values. #Create the Zone object with this member my $firstzone = Infoblox::DNS::Zone->new( name => "infoblox. stealth => "false". session->status_detail()). ":" . my $response = $session->add($firstzone) unless($response) { die("Add zone failed: ". } print "DNS member object added to the zone successfully\n". stealth => "false". grid_replicate => "false" ). grid_replicate => "false" ). grid_replicate => "false" ). session->status_detail()).localdomain". ). unless($member1) { die("Construct member failed: ". my $response = $session->add($firstzone) unless($response) { die("Add zone failed: ".1.168. ipv4addr => "192. } print "Member object created successfully\n". ipv4addr => "192. Infoblox::status_code() . } print "Member object created successfully\n".localdomain". primary => $member1. session->status_code() .1.168.168. ).com". Example my $member1 = Infoblox::DNS::Member->new( name => "localhost. stealth => "false". NIOS 5. ipv4addr => "192. Example my $member1 = Infoblox::DNS::Member->new( name => "localhost.localdomain". See Infoblox::Grid::DNS::Nsgroup->primary() for parameters and return values.1r4 Page 382 (Rev.1.3".

Infoblox::Grid::DNS::Nsgroup->new ( => "ns_group1". my $nsgroup1 = Infoblox::Grid::DNS::Nsgroup->new ( name => "ns_group1". stealth => "false". Infoblox::status_detail()). If you did not specify a parameter. Infoblox::status_code() . ":" . which indicates whether grid members that are primary and secondary servers use database replication or zone transfers for zone updates. grid_replicate( ) Use this method to set or retrieve the grid_replicate flag. Infoblox::status_code() .1.168. ipv4addr => "192. } print "Member object created successfully\n".2". Infoblox::status_code() . Omit the parameter to retrieve the attribute value. Infoblox::status_detail()). See Infoblox::Grid::DNS::Nsgroup->secondary() for parameters and return values. unless($member2) { die("Construct member failed: ". my $member2 = Infoblox::DNS::Member->new( name => "localhost1. the method returns the attribute value. unless($member1) { die("Construct member failed: ".Infoblox API Documentation unless($member1) { die("Construct member failed: ". primary => $member1 ). ipv4addr => "192. my $nsgroup1 = name primary secondaries ).localdomain".168. } print "Member object created successfully\n". ":" . ":" . A) . => $member1 => [ $member2 ]. } print "Member object created successfully\n". grid_replicate => "false" ). stealth => "false". grid_replicate => "false" ). Example my $member1 = Infoblox::DNS::Member->new( name => "localhost. Include the specified parameter to set the attribute value. Infoblox::Grid::DNS::Nsgroup->secondary( ) Use this function to specify secondary member to a NS group. Infoblox::status_detail()).localdomain".1.3". Example NIOS 5. the method returns true when the modification succeeds. lead => "false".1r4 Page 383 (Rev. lead => "false". Returns If you specified a parameter. and returns false when the operation fails. Parameter Specify "true" to use ID grid replication or "false" to use DNS zone transfers. METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a DNS Member object.

1. lead( ) Use this method to set or retrieve the "lead" flag. the method returns the attribute value. NIOS 5. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. #Modify lead $member->lead("true"). Example #Get ipv4Addr my $ipv4Addr = $member->ipv4Addr(). Returns If you specified a parameter. you can designate one member as a lead secondary. Returns If you specified a parameter. When a primary server is external to a grid whose members are secondary servers. Include the specified parameter to set the attribute value. A) . Example #Get lead my $lead = $member->lead().Infoblox API Documentation #Get grid replicate my $grid_replicate = $member->grid_replicate(). ipv6addr( ) Use this method to set or retrieve the IPv6 address if available. Parameter IPv4 address (32 bits) of the member. which distributes the zone data to the other secondary servers in the grid using zone transfers (not the ID grid data replication mechanism). Returns If you specified a parameter. #Modify ipv4Addr $member->ipv4Addr("192.3"). If you did not specify a parameter. ipv4addr( ) Use this method to set or retrieve the IPv4 address of the member. the method returns true when the modification succeeds. # Modifying ipv6addr $member->ipv6addr("12ab::345"). Required only when ipv4 is not specified. The primary server sends zone transfers to the lead secondary. If you did not specify a parameter. If you did not specify a parameter. It consists of eight groups of four hexadecimal digits separated by colons (example: 12ab:0000:0000:0123:4567:89ab:0000:cdef). Parameter An IPv6 address is a 128-bit number in colon hexadecimal notation. #Modify grid replicate $member->grid_replicate("true").1r4 Page 384 (Rev. Omit the parameter to retrieve the attribute value. Include the specified parameter to set the attribute value. and returns false when the operation fails.168. Include the specified parameter to set the attribute value. Parameter Specify "true" to set lead flag or "false" to deactivate/unset it. the method returns true when the modification succeeds. the method returns the attribute value. and returns false when the operation fails. the method returns the attribute value. Example # Getting ipv6addr my $ipv6addr = $member->ipv6addr(). the method returns true when the modification succeeds.

Infoblox API Documentation name( ) Use this method to set or retrieve the name of the member. Returns If you specified a parameter. its NS record is hidden from DNS queries. SAMPLE CODE The following sample code demonstrates the different functions that can be applied to an object. #Create a DNS Member object NIOS 5.168.com ). ":" . the method returns the attribute value.infoblox.1r4 Page 385 (Rev. Infoblox::status_code() . #appliance user login password => "infoblox" #appliance password ). Omit the parameter to retrieve the attribute value. it does not respond to queries from resolvers and other name servers. #Preparation prior to a DNS Member object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. such as add. This sample also includes error handling for the operations.com"). unless ($session) { die("Construct session failed: ". Include the specified parameter to set the attribute value.domain. #Modify name $member->name("dns. the method returns true when the modification succeeds.1. If you did not specify a parameter. #Modify stealth $member->stealth("true"). } print "Session created successfully\n". #appliance host ip username => "admin". Include the specified parameter to set the attribute value.localdomain". Example #Get name my $name = $member->name(). modify. #Create a session to the Infoblox appliance my $host_ip = "192. use Infoblox. search. A) .2". When a member is in stealth mode. the method returns true when the modification succeeds. Returns If you specified a parameter. Example #Get stealth my $stealth = $member->stealth(). A host name can have a maximum of 256 characters. and returns false when the operation fails. my $host_name = "infoblox. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Parameter Specify "true" to set the stealth flag or "false" to deactivate/unset it. my $session = Infoblox::Session->new( master => $host_ip. The FQDN consists of the host name followed by the domain name (example: host. If you did not specify a parameter. which indicates whether this member is in stealth mode. Parameter A name in FQDN (Fully Qualified Domain Name) format. and remove. stealth( ) Use this method to set or retrieve the "stealth" flag. and returns false when the operation fails. Infoblox::status_detail()).

views => [$default_view]. ). } ####PROGRAM ENDS#### AUTHOR Infoblox Inc. A) . $session->status_code() . ":" . #Create the Zone object with this member my $firstzone = Infoblox::DNS::Zone->new( name => "infoblox. $session->status_code() . print "DNS member object added to the zone successfully\n".Infoblox::Session->search(). stealth => "false". unless($firstzone) { die("Construct Zone object failed: ". comment => "add a zone infoblox.Infoblox::Session COPYRIGHT NIOS 5. unless (scalar(@result) == 0) { $firstzone = $result[0]. #update zone $firstzone->primary($member1). ":" . lead => "false". } print "Member object created successfully\n". #update session $session->modify($firstzone) or die("Modify zone object failed: ". email => "admin\@infoblox. #Modify a DNS member my @result = $session->search(object => "Infoblox::DNS::Zone". Infoblox::status_detail()). primary => $member1. Infoblox::status_code() . name => "infoblox.com". Infoblox::status_detail()). $session->status_detail()).com").com/ SEE ALSO Infoblox::DNS::TSIGKey. ":" . $session->status_detail()).com". } } else { print "No zone found with the specified name".com". Infoblox::Session->add(). Infoblox::status_code() . print "DNS member object updated and added to the zone successfully\n".Infoblox API Documentation my $member1 = Infoblox::DNS::Member->new( name => $host_name. ipv4addr => $host_ip.1r4 Page 386 (Rev. ":" .infoblox. grid_replicate => "false" ). http://www. my $default_view = Infoblox::DNS::View->new(name => "default"). if ($firstzone) { #modify grid replicate value of member $member1->grid_replicate("true"). } print "Zone object created successfully\n". #Add the Zone object into the Infoblox appliance through a session $session->add($firstzone) or die("Add Zone object failed: ".Infoblox::Session->modify(). unless($member1) { die("Construct member failed: ".

Infoblox API Documentation Copyright (c) 1999-2010 Infoblox Inc. A) .1r4 Page 387 (Rev. NIOS 5.

See Infoblox::DNS::Zone->primary() for parameters and return values. primary => [$msserver1].0. Infoblox::DNS::Zone->primary( ) Use any of these functions to assign a Microsoft DNS server as the primary server of a zone. my $response = $session->add($firstzone) unless $response NIOS 5. unless($msserver1) { die("Construct msserver failed: ". #Required ipv4addr => $string.Microsoft DNS Server object NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DNS::Zone->primary( ) Infoblox::DNS::Zone->secondaries( ) Infoblox::DNS::Zone->stub_members( ) Infoblox::Grid::DNS::Nsgroup->primary( ) Infoblox::Grid::DNS::Nsgroup->secondaries( ) METHODS address( ) ipv4addr( ) name( ) stealth( ) AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::MSServer . #Optional ). #Create the Zone object with this Microsoft DNS server my $firstzone = Infoblox::DNS::Zone->new( name => "infoblox. Example my $msserver1 = Infoblox::DNS::MSServer->new( address => "10. ipv4addr => "10.Microsoft (r) DNS Server object DESCRIPTION A Microsoft DNS Server object is a Windows-based server that is running the DNS service and is synchronized with an Infoblox grid. MODULE METHODS The following functions can be applied to a Microsoft DNS Server object. } print "Msserver object created successfully\n".Infoblox API Documentation Infoblox::DNS::MSServer .1r4 Page 388 (Rev.0. ). A) .0. Infoblox::status_code() .com". Infoblox::status_detail()).1". name => "hostname. ":" . ).1". #Required stealth => "true" | "false". #Required name => $string.0. As such.com". CONSTRUCTOR my $msserver = Infoblox::DNS::MSServer->new( address => $string. the Microsoft DNS server shares its DNS data with the Infoblox DNS servers in a grid.

Infoblox::status_code() .com".com". } print "Msserver object created successfully\n". session->status_detail()). See Infoblox::DNS::Zone->stub_members() for parameters and return values. } print "DNS MS Server object added to the zone successfully\n". ). Example my $msserver1 = Infoblox::DNS::MSServer->new( address => "10. unless($msserver1) { die("Construct msserver failed: ". name => "hostname. } print "Msserver object created successfully\n".Infoblox API Documentation ( ) { die("Add zone failed: ".0. See Infoblox::DNS::Zone->secondaries() for parameters and return values. ":" . session->status_code() . #Create the Zone object with this member my $firstzone = Infoblox::DNS::Zone->new( name => "infoblox. ":" . ). stub_members => [ $msserver2 ] . secondaries => [ $msserver2 ] . Infoblox::Grid::DNS::Nsgroup->primary( ) NIOS 5. session->status_code() . ipv4addr => "10. Infoblox::status_detail()).0. ipv4addr => "10. Infoblox::DNS::Zone->stub_members( ) Use this function to assign a Microsoft DNS server to a stub zone. ). } print "DNS MS server member object added to the zone successfully\n". unless($msserver1) { die("Construct msserver failed: ". Infoblox::status_detail()). session->status_detail()).0.1r4 Page 389 (Rev.0.com". session->status_code() . my $response = $session->add($firstzone) unless($response) { die("Add zone failed: ". ":" .1". Example my $msserver1 = Infoblox::DNS::MSServer->new( address => "10. A) .1".1". primary => $member1.0. Infoblox::DNS::Zone->secondaries( ) Use this function to specify an Microsoft DNS server as the secondary server to a zone. ":" . #Create the Zone object with this member my $firstzone = Infoblox::DNS::Zone->new( name => "infoblox. name => "hostname.0. ). my $response = $session->add($firstzone) unless($response) { die("Add zone failed: ". ":" . } print "DNS MS server member object added to the zone successfully\n".com".1".0. session->status_detail()).0. Infoblox::status_code() .

1". the method returns true when the modification succeeds.3").1". => $member1 => [ $msserver1 ]. my $nsgroup1 = Infoblox::Grid::DNS::Nsgroup->new ( name => "ns_group1". Example #Get address my $address = $member->address(). Infoblox::status_code() . primary => [$msserver1] ). Returns If you specified a parameter.com".0.0. unless($member1) { die("Construct member failed: ". See Infoblox::Grid::DNS::Nsgroup>primary() for parameters and return values. and returns false when the operation fails.0. ipv4addr( ) NIOS 5. Omit the parameter to retrieve the attribute value. Example my $msserver1 = Infoblox::DNS::MSServer->new( address => "10. name => "hostname. If you did not specify a parameter. my $nsgroup1 = name primary secondaries ).1.0. ":" . ":" .com".Infoblox API Documentation Use this function to add a Microsoft DNS server as the primary server of a Name Server (NS) group. ipv4addr => "10. ). #Modify address $member->address("192. address( ) Use this method to set or retrieve the IPv4 address or FQDN of the member.1r4 Page 390 (Rev.1". Example my $msserver1 = Infoblox::DNS::MSServer->new( address => "10. METHODS This section describes all the methods that you can use to set and retrieve the attribute values of a DNS Member object.0. Infoblox::Grid::DNS::Nsgroup->secondaries( ) Use this function to add secondary servers to an NS group. } print "MS server object created successfully\n". name => "hostname. Infoblox::Grid::DNS::Nsgroup->new ( => "ns_group1". Infoblox::status_code() . } print "MS Server object created successfully\n". ).0. Parameter IPv4 address (32 bits) or FQDN of the member.0.1".168. Infoblox::status_detail()). Include the specified parameter to set the attribute value. See Infoblox::Grid::DNS::Nsgroup->secondaries() for parameters and return values. unless($member1) { die("Construct member failed: ". ipv4addr => "10.0. the method returns the attribute value. A) . Infoblox::status_detail()).

1. Example #Get ipv4addr my $ipv4addr = $member->ipv4addr(). the method returns true when the modification succeeds. Parameter The member's FQDN. name( ) Use this method to set or retrieve the member FQDN that is used when setting this Microsoft DNS server as a name server. Returns If you specified a parameter. Example #Get stealth my $stealth = $member->stealth().1r4 Page 391 (Rev. Omit the parameter to retrieve the attribute value. AUTHOR Infoblox Inc. If you did not specify a parameter. the method returns the attribute value. Omit the parameter to retrieve the attribute value. Example #Get name my $name = $member->name(). Omit the parameter to retrieve the attribute value. #Modify stealth $member->stealth("true"). If you did not specify a parameter. Parameter IPv4 address (32 bits) of the member. #Modify name $member->name("hostname. Include the specified parameter to set the attribute value. A) .3"). Parameter Specify "true" to set the stealth flag or "false" to deactivate/unset it. which indicates whether this name server is in stealth or normal mode. and returns false when the operation fails. Returns If you specified a parameter. Include the specified parameter to set the attribute value. stealth( ) Use this method to set or retrieve the "stealth" flag.Infoblox::Session->search(). #Modify ipv4addr $member->ipv4addr("192. and returns false when the operation fails. the method returns true when the modification succeeds. and returns false when the operation fails. Returns If you specified a parameter.com"). Include the specified parameter to set the attribute value. the method returns the attribute value.Infoblox::Session NIOS 5.Infoblox API Documentation Use this method to set or retrieve the member IPv4 address that is published in the glue A record when setting this Microsoft DNS server as a name server. http://www.infoblox. the method returns the attribute value. the method returns true when the modification succeeds.com/ SEE ALSO Infoblox::DNS::TSIGKey. Infoblox::Session->add().168.Infoblox::Session->modify(). If you did not specify a parameter.

Infoblox API Documentation COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc.1r4 Page 392 (Rev. A) . NIOS 5.

#Required if this name server is used to represent an external DDNS server gss_tsig_domain => $string. A) . Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( ipv4addr => "1. CONSTRUCTOR my $nameserver = Infoblox::DNS::Nameserver->new( ipv4addr => $ipv4addr. Infoblox::DHCP::View->external_ddns_primaries( ) Use this function to specify a nameserver to send DDNS updates to at the network view level. #Optional / Default is undefined ). #Required if $ipv6addr is not present ipv6addr => $ipv6addr.DNS Nameserver object NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DHCP::View->external_ddns_primaries( ) Infoblox::DNS::Zone->delegate_to( ) Infoblox::DNS::Zone->forward_to( ) Infoblox::DNS::Zone->secondaries( ) Infoblox::DNS::Zone->primary( ) Infoblox::Grid::Member->prefer_resolver( ) Infoblox::Grid::Member->alternate_resolver( ) Infoblox::Grid::DNS::Nsgroup->primary( ) Infoblox::Grid::DNS::Nsgroup->secondaries( ) METHODS ddns_zone( ) gss_tsig_domain( ) gss_tsig_dns_principal( ) ipv4addr( ) ipv6addr( ) name( ) stealth( ) TSIGkey( ) TSIGname( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::Nameserver .4".Infoblox API Documentation Infoblox::DNS::Nameserver .3. MODULE METHODS The following functions are available to apply to a nameserver object. NIOS 5.2. #Required if this name server is not used to represent an external DDNS server ddns_zone => $string.1r4 Page 393 (Rev. #Optional / Default is "false" TSIGkey => $string | ":2xCOMPAT" #Optional / Default is undefined TSIGname => $string. #Optional / Default is undefined gss_tsig_dns_principal => $string.DNS Nameserver object DESCRIPTION Manipulates a Nameserver object that contains information about the domain name space. #Optional / Default is undefined stealth => "true" | "false". TSIGname => "tsig_name". #Required if $ipv4addr is not present name => $fqdn.

ipv4addr => "4. # Configure Nameserver my $response = $Zone->forward_to([$nameserver]). TSIGkey => "ZX1jVJl7C58GT/sc7Q3uca==".com". ).test. ). TSIGkey => "ZX1jVJl7C58GT/sc7Q3uca==".6.2. stealth => "false".$nameserver1]).4.test. Example NIOS 5. stealth => "false". Infoblox::DNS::Zone->secondaries( ) Use this function to specify a nameserver at the zone level. Infoblox::DNS::Zone->primary( ) Use this function to specify a nameserver at the zone level.test.com". #Construct an object my $nameserver1 = Infoblox::DNS::Nameserver->new( ipv4addr => "1. TSIGkey => "ZX1jVJl7C58GT/sc7Q3uca==".1r4 Page 394 (Rev. ipv4addr => "4. ddns_zone => "zone1" ). ).5. # Configure Nameserver my $response = $View->external_ddns_primaries([$nameserver.6". Infoblox::DNS::Zone->delegate_to( ) Use this function to specify a nameserver at the zone level. # Configure Nameserver my $response = $Zone->delegate_to([$nameserver]). TSIGname => "tsig_name".6.5".test. TSIGname => "tsig_name". ).7".$nameserver1]).Infoblox API Documentation TSIGkey => "ZX1jVJl7C58GT/sc7Q3uca==". Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( name => "ns1. #Construct an object my $nameserver1 = Infoblox::DNS::Nameserver->new( name => "ns4. Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( name => "ns2.com". # Configure Nameserver my $response = $Zone->secondaries([$nameserver.com". ipv4addr => "4.7.4". A) .4. TSIGname => "tsig_name".3. Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( name => "ns3. ddns_zone => "zone2" ). ipv6addr => "2009::546". Infoblox::DNS::Zone->forward_to( ) Use this function to specify a nameserver at the zone level.

4. ). ).test.5. ipv6addr => "2004::223".5. stealth => "false". ). # Configure Nameserver my $response = $grid_member_object->primary([$nameserver]).10.test. NIOS 5. Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( ipv4addr => "10.com".6". Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( name => "ns5.6". TSIGname => "tsig_name". stealth => "false".7.test.$nameserver1]).6". # Configure Nameserver my $response = $grid_member_object->alternate_resolver([$nameserver]). Infoblox::Grid::Member->prefer_resolver( ) Use this function to specify a nameserver at the grid member level. # Configure Nameserver my $response = $Zone->primary([$nameserver. A) . Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( name => "ns5. Infoblox::Grid::Member->alternate_resolver( ) Use this function to specify a nameserver at the grid member level.com". ).5. ipv4addr => "10.10. TSIGkey => "Zx1JVjl7C58gT/sc7Q3uca==". Example #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( ipv4addr => "10. #Construct an object my $nameserver1 = Infoblox::DNS::Nameserver->new( name => "nsv6.com".6".test. TSIGkey => "ZX1jVJl7C58GT/sc7Q3uca==". stealth => "false". # Configure Nameserver my $response = $grid_member_object->prefer_resolver([$nameserver]). TSIGkey => "ZX1jVJl7C58GT/sc7Q3uca==". Infoblox::Grid::DNS::Nsgroup->primary( ) Use this function to specify a nameserver at the grid DNS level. ).5.com". TSIGname => "tsig_name".1r4 Page 395 (Rev.Infoblox API Documentation #Construct an object my $nameserver = Infoblox::DNS::Nameserver->new( name => "ns4. TSIGname => "tsig_name". Infoblox::Grid::DNS::Nsgroup->secondaries( ) Use this function to specify a nameserver at the grid DNS level. ipv4addr => "4.

METHODS This section describes all the methods that you can use to configure and retrieve the attribute values of a Nameserver object. Parameter Desired domain name in string format with a maximum of 1023 bytes. and returns false when the operation fails. and returns false when the operation fails. the method returns true when the modification succeeds. gss_tsig_domain( ) Use this method to set or retrieve the domain in which GSS-TSIG for dynamic updates is enabled. Omit the parameter to retrieve the attribute value. "Zx1JVjl7C58gT/sc7Q3uca==". If you did not specify a parameter. Include the specified parameter to set the attribute value. Parameter Desired ddns_zone for the name server in string format. => => => => "10. gss_tsig_dns_principal( ) Use this method to set or retrieve the principal name in which GSS-TSIG for dynamic updates is enabled. the method returns true when the modification succeeds.Infoblox API Documentation ipv4addr stealth TSIGname TSIGkey ). the method returns the attribute value. If you did not specify a parameter.6". Example NIOS 5. "tsig_name". Parameter Desired principal name in string format with a maximum of 1023 bytes.5. Omit the parameter to retrieve the attribute value. the method returns the attribute value. # Modifying gss_tsig_domain $nameserver->gss_tsig_domain("mydomain"). Returns If you specified a parameter. "false". Returns If you specified a parameter. Returns If you specified a parameter. ddns_zone( ) Use this method to set or retrieve the zone name served by the name server. the method returns the attribute value.1r4 Page 396 (Rev. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value. # Modifying ddns_zone $nameserver->ddns_zone("zone2"). Omit the parameter to retrieve the attribute value.10. Example # Getting gss_tsig_domain my $gss_tsig_domain = $nameserver->gss_tsig_domain(). A) . If you did not specify a parameter. # Configure Nameserver my $response = $grid_member_object->secondaries([$nameserver]). Example # Getting ddns_zone my $ddns_zone = $nameserver->ddns_zone(). and returns false when the operation fails. the method returns true when the modification succeeds.

the method returns the attribute value. and returns false when the operation fails.168. Omit the parameter to retrieve the attribute value. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. and returns false when the operation fails. Example # Getting name my $name = $nameserver->name(). the method returns the attribute value. Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. ipv4addr( ) Use this method to set or retrieve the IPv4 address. the method returns the attribute value.0. # Modifying gss_tsig_dns_principal $nameserver->gss_tsig_dns_principal("local1/a. Include the specified parameter to set the attribute value. Returns If you specified a parameter.3"). stealth( ) Use this method to make the name server stealth or not. If you did not specify a parameter. When the attribute stealth is "true" . It consists of eight groups of four hexadecimal digits separated by colons (example: 12ab:0000:0000:0123:4567:89ab:0000:cdef). This NIOS 5. Include the specified parameter to set the attribute value.localhost@LOCAL"). Include the specified parameter to set the attribute value.Infoblox API Documentation # Getting gss_tsig_dns_principal my $gss_tsig_dns_principal = $nameserver->gss_tsig_dns_principal(). the method returns true when the modification succeeds.2). Returns If you specified a parameter. A) . If you did not specify a parameter.0. the method returns true when the modification succeeds.com"). # Modifying ipv6addr $nameserver->ipv6addr("12ab::345"). Required only when ipv4 is not specified. Parameter An IPv4 address is a 32-bit number in dotted decimal notation. Required only when ipv6 is not specified. Returns If you specified a parameter. ipv6addr( ) Use this method to set or retrieve the IPv6 address.1. Example # Getting ipv4addr my $ipv4addr = $nameserver->ipv4addr(). Parameter An IPv6 address is a 128-bit number in colon hexadecimal notation. name( ) Use this method to set or retrieve a resolvable domain name for the server. the method returns true when the modification succeeds. and returns false when the operation fails. # Modifying ipv4addr $nameserver->ipv4addr("10.1r4 Page 397 (Rev. Parameter Desired name for the name server in FQDN format.domain. If you did not specify a parameter. the name server is in stealth mode. # Modifying name $nameserver->name("ns2. Example # Getting ipv6addr my $ipv6addr = $nameserver->ipv6addr().

The local appliance generates the required TSIG key for authenticating DNS messages to and from appliances running DNS One 2. SAMPLE CODE NIOS 5. Parameter Desired TSIGkey of the name server in string format. Then type or copy-and-paste that name and key into the appropriate fields. OR Use DNS One 2. If you did not specify a parameter. Omit the parameter to retrieve the attribute value.1r4 Page 398 (Rev. and returns false when the operation fails. Valid values are ":2xCOMPAT" or a TSIG key string. Include the specified parameter to set the attribute value. or you can obtain the TSIG key name and key from the external name server either by accessing the appliance yourself or by requesting the appliance administrator to deliver them to you through some out-of-band mechanism. the method returns true when the modification succeeds.x TSIG: If you want to use TSIG authentication and the external primary name server is an Infoblox appliance running DNS One 2. If you did not specify a parameter. Include the specified parameter to set the attribute value. Include the specified parameter to set the attribute value.x code. Example # Getting TSIGkey my $TSIGkey = $nameserver->TSIGkey(). A) . and it does not respond to queries from resolvers and other name servers. Returns If you specified a parameter. If you did not specify a parameter. Example # Getting TSIGname my $TSIGname = $nameserver->TSIGname(). Parameter Valid values are "true" or "false" . This key must also be present on the external primary server. TSIGname( ) Use this method to set or retrieve the name of the TSIG key you want to use. # Modifying TSIGname $nameserver->TSIGkey("ZX1jVJl7C58GT/sc7Q3uc2==").Infoblox API Documentation means that its NS record is not published among the zone data. and returns false when the operation fails. Omit the parameter to retrieve the attribute value. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. # Modifying TSIGname $nameserver->TSIGname("tsig2_name"). Example # Getting stealth my $stealth = $nameserver->stealth(). # Modifying stealth $nameserver->stealth("true"). the method returns the attribute value. Returns If you specified a parameter. the method returns true when the modification succeeds.x code. Returns If you specified a parameter. and returns false when the operation fails. Parameter Desired name of the TSIG key in string format. the method returns the attribute value. You can generate a TSIG key. the method returns the attribute value. TSIGkey( ) Use this method to set or retrieve the TSIG key.

} } else { NIOS 5.com failed: ".5. #Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192. print " Zone creation successful\n".5.com" ). ). ipv4addr => "10. #put zone into session $session->add($zone) or die("Zone creation failed: ". Infoblox::status_code() . password => "infoblox" ). unless ($nameserver1){ die("Construct Nameserver failed: ".6".5"). # Create a zone and use $nameserver1 #create a zone and use $nameserver1 my $zone = Infoblox::DNS::Zone->new( name => "domain. #Get and modify the name server #get Zone object from session my @result = $session->get( object => "Infoblox::DNS::Zone". username => "admin". unless (scalar(@result) == 0) { my $zone = $result[0]. Infoblox::status_code() . TSIGname => "tsig_name". if ($zone) { #modify ipv4addr value $nameserver1->ipv4addr("5. } print "Nameserver object created successfully\n". $zone->primary([$nameserver1]).5. A) . ##Preparation prior to a DNS nameserver object insertion #PROGRAM STARTS: Include all the modules that will be used use strict. #update session $session->modify($zone) or die("modify zone domain. use Infoblox. Infoblox::status_detail()). ":" .1.168. unless ($session) { die("Construct session failed: ". modify. stealth => "false".com".Infoblox API Documentation The following sample code demonstrates the different functions that can be applied to an object such as add. Infoblox::status_detail()).4. Infoblox::status_detail()). } print "Session created successfully\n". TSIGkey => "ZX1jVJl7C58GT/sc7Q3ucA==". ).2". This sample also includes error handling for the operations.com".1r4 Page 399 (Rev. #Create a nameserver object my $nameserver1 = Infoblox::DNS::Nameserver->new( name => "ns1. primary => [$nameserver1]. ":" .domain. name => "domain. ":" . $session->status_detail()). Infoblox::status_code() . $session->status_code().

Infoblox::Session>modify().Infoblox API Documentation print "No zone found. Infoblox::Session->add(). http://www.1r4 Page 400 (Rev.Infoblox::DNS::Zone. Infoblox::Grid::Member. Infoblox::Grid::DNS::Nsgroup COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. Infoblox::Grid::DHCP.Infoblox::DHCP::View. A) .". Infoblox::Session->get(). NIOS 5.infoblox.com/ SEE ALSO Infoblox::Session. } ####PROGRAM ENDS#### AUTHOR Infoblox Inc.

1r4 Page 401 (Rev.0. Include the specified parameter to set the attribute value. # Configure a name server address on the NS record object $ns_record->nameservers([$ns1]). DESCRIPTION The NS Name Server object provides IP address information for the name server associated with an NS record.1" ). If you do not specify a parameter. the method returns true when the modification succeeds.NS Name Server object. NAME DESCRIPTION CONSTRUCTOR MODULE METHODS Infoblox::DNS::Record::NS->nameservers( ) METHODS address( ) auto_create_ptr( ) AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::Nameserver::Address . A) . address( ) Use this method to set or retrieve the IPv4 address of the name server. Example #Construct an NS Name Server object my $ns1 = Infoblox::DNS::Nameserver::Address->new( address => "10. MODULE METHODS You can apply the following functions to an NS Name Server object: Infoblox::DNS::Record::NS->nameservers( ) Use this function to specify the IP addresses associated with the NS record. See Infoblox::DNS::Record::NS->nameservers() for parameters and return values. the method returns the attribute value. Example NIOS 5. CONSTRUCTOR my $rootns = Infoblox::DNS::Nameserver::Address->new( address => $address.0. Parameter The IPv4 address (32 bits) of the name server.NS Name Server object. Returns If you specify a parameter. METHODS This section describes all the methods you can use to configure and retrieve the attribute values of an NS Name Server object. #Required auto_create_ptr => "true" | "false" #Optional / Default "true" ). and returns false when the operation fails.Infoblox API Documentation Infoblox::DNS::Nameserver::Address . Omit the parameter to retrieve the attribute value.

infoblox. the method returns the attribute value. Parameter Valid values are "true" or "false" . Example #Get auto_create_ptr my $aptr = $ns->auto_create_ptr(). PTR records are automatically created for NS records created in a reverse zone. A) . Omit the parameter to retrieve the attribute value. Infoblox::DNS::Record::NS COPYRIGHT Copyright (c) 1999-2010 Infoblox Inc. #Modify the address $ns->address("10. NIOS 5. Include the specified parameter to set the attribute value. AUTHOR Infoblox Inc. the method returns true when the modification succeeds.Infoblox API Documentation #Get the address my $addr = $ns->address().0. When this flag is set to true.1r4 Page 402 (Rev. If you do not specify a parameter. Returns If you specify a parameter. http://www.0. and returns false when the operation fails. #Modify auto_create_ptr $rootns->auto_create_ptr("false").1"). auto_create_ptr( ) Use this method to set or retrieve the auto_create_ptr flag of the name server.com/ SEE ALSO Infoblox::Session.

DNS A record object.DNS A record object.1r4 Page 403 (Rev. To define a specific name-to-address mapping. #Required NIOS 5. CONSTRUCTOR my $bind_a = Infoblox::DNS::Record::A->new ( ipv4addr => $ipv4addr.Infoblox API Documentation Infoblox::DNS::Record::A . NAME DESCRIPTION CONSTRUCTOR SESSION METHODS Infoblox::Session->add( ) Infoblox::Session->get( ) Infoblox::Session->modify( ) Infoblox::Session->remove( ) Infoblox::Session->search( ) METHODS comment( ) disable( ) discovered_name( ) discoverer( ) first_discovered( ) extensible_attributes( ) ipv4addr( ) last_discovered( ) mac_address( ) name( ) netbios( ) network_component_description( ) network_component_ip( ) network_component_name( ) network_component_port_description( ) network_component_port_name( ) network_component_port_number( ) network_component_type( ) os( ) port_duplex( ) port_link_status( ) port_speed( ) port_status( ) port_vlan_description( ) port_vlan_name( ) port_vlan_number( ) ttl( ) views( ) v_cluster( ) v_datacenter( ) v_host( ) v_name( ) v_netadapter( ) v_switch( ) v_type( ) zone( ) SAMPLE CODE AUTHOR SEE ALSO COPYRIGHT NAME Infoblox::DNS::Record::A . A) . DESCRIPTION An A (address) record maps a domain name to an IPv4 address. Note that you must specify only one view for the attribute "views". add an A record to a previously defined authoritative forward-mapping zone.

#Optional / Default is empty disable => "true" | "false" #Optional / Default "false" extensible_attributes => { $string => $string | $num. Discovered VMware datacenter name. A hash reference containing extensible attributes. Infoblox::Session->modify( ) Use this method to modify an object in the Infoblox appliance..Infoblox API Documentation name => $fqdn.com". v_switch . name => "bind_a.1r4 Page 404 (Rev. Key References Apply the following attributes to get a specific DNS A object: name . mac_address => "1:1:1:1:1:1".Optional. The address of the host record. v_datacenter . #Required comment => $string. . See Infoblox::Session->modify() for parameters and return values. }.1.1.1".. "VirtualCenter"). Discovered VMware server name. extensible_attributes => { 'Site' => 'Santa Clara' }). v_type => 'VirtualMachine'). Discovered VMware entity type (possible values: "VirtualMachine". view . $string => [ $string | $num. # Submit for addition my $response = $session->add( $bind_a ). v_host . The DNS view in which the A record is located. SESSION METHODS This section describes all the methods in Infoblox::Session module that you can apply to a DNS A object. . Infoblox::Session->add( ) Use this method to add an object to the Infoblox appliance. v_type .domain.Optional. But if you omit this attribute and specify a zone.Optional.Optional. Discovered VMware host or virtual machine name.Optional. #Optional / Default is undefined views => [$View1]. #Optional / Default is "default" view ). A host name in string format.Optional.Optional.domain. #get all DNS A recods with the extensible attribute 'Site' my @retrieved_objs = $session->get( object => "Infoblox::DNS::Record::A". v_cluster . v_name . ipv4addr .Optional. # get DNS A records by v_type: my @retrieved_objs = $session->get( object => 'Infoblox::DNS::Record::A'. NIOS 5. #Optional / Default is undefined last_discovered => $string. views => [$view1] ). zone . view => "default" ). all DNS views are searched. extensible_attributes . By default. ].. A zone name in FQDN format. A) . See Infoblox::Session->add() for parameters and return values. name => "bind_a. #Optional / Default is empty mac_address => $mac_addr. comment => "this is a demo bind_a record"..Optional. Discovered VMware physical network adapter name. Example my @retrieved_objs = $session->get( object => "Infoblox::DNS::Record::A". #Optional / Default is empty ttl => $num | undef.Optional. Discovered VMware cluster name. disable => "true". Infoblox::Session->get( ) Use this method to retrieve all the matching objects from the Infoblox appliance. "HostSystem".Optional. the appliance searches the 'default' view only. ttl => "33". See Infoblox::Session->get() for parameters and return values. v_netadapter .Optional.com". Example #Construct an object my $bind_a = Infoblox::DNS::Record::A->new ( ipv4addr => "1. Discovered VMware virtual switch name.

v_switch . The DNS view in which the A record is located. the appliance searches the 'default' view only.com". Example # search for all DNS A objects that match "domain. A hash reference containing extensible attributes. # Submit modification my $response = $session->modify( $bind_a ). METHODS This section describes all the methods that you can use to configure and retrieve the attribute values of an A record NIOS 5. # Submit for removal my $response = $session->remove( $desired_a ). view => "default" ). A) . v_datacenter . $bind_a->comment("this is a modified comment").com". Discovered VMware server name (regular expression). "HostSystem". A comment in string format (regular expression).Optional. # Find the desired object from the retrieved list. Discovered VMware cluster name (regular expression).Optional. all DNS views are searched.Infoblox API Documentation Example # Use method to modify the comment. A zone name in FQDN format. Key References Apply the following attributes to search for a DNS A record object: name . zone => "domain. and then submit this object for removal. v_type .Optional.Optional. By default. Infoblox::Session->remove( ) Use this method to submit to remove an object from the Infoblox appliance. Infoblox::Session->search( ) Use this method to search for DNS A record objects in the Infoblox appliance. Discovered VMware entity type (possible values: "VirtualMachine". v_datacenter => "test. # search DNS A records by v_datacenter: my @retrieved_objs = $session->search( object => "Infoblox::DNS::Record::A". v_netadapter . first use get() or search() to retrieve the specific object.Optional. v_name . # search for all DNS A records in the "domain. extensible_attributes => { 'Site' => 'Santa Clara' }). To remove a specifc object. "VirtualCenter"). name => 'domain\. The address of the host record (regular expression).1r4 Page 405 (Rev. Discovered VMware virtual switch name (regular expression). Discovered VMware host or virtual machine name (regular expression). See Infoblox::Session->remove() for parameters and return values. Discovered VMware physical network adapter name (regular expression). Example # Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DNS::Record::A". view . name => "bind_a. #get all DNS A recods with the extensible attribute 'Site' my @retrieved_objs = $session->search( object => "Infoblox::DNS::Record::A".*"). my $desired_a = $retrieved_objs[0].Optional. comment .com'.Optional. view => "default" ).Optional. But if you omit this attribute and specify a zone. ipv4addr . See Infoblox::Session->search() for para meters and return values. Discovered VMware datacenter name (regular expression).domain.Optional. v_host . zone . A host name in string format (regular expression).Optional.Optional.Optional.Optional. extensible_attributes . view => "default" ).com" in the default DNS view my @retrieved_objs = $session->search( object => "Infoblox::DNS::Record::A".com" zone of the default view my @retrieved_objs = $session->search( object => "Infoblox::DNS::Record::A". v_cluster .

the method returns the attribute value. Example #Get comment my $comment = $bind_a->comment(). Example #Get disable my $disable = $bind_a->disable(). #Modify comment $bind_a->comment("Modifying the DNS A comment"). A) .1r4 Page 406 (Rev. If you did not specify a parameter. the method returns true when the modification succeeds. #Modify disable $bind_a->disable("true"). Example NIOS 5. discovered_name( ) Use this method to retrieve the discovered name of an A Record object. Include the specified parameter to set the attribute value. Example #Get discovered_name my $discovered_name = $bind_a->discovered_name(). The DNS record is enabled. Parameter Desired comment in string format with a maximum of 256 bytes. and returns false when the operation fails. disable( ) Use this method to set or retrieve the disable flag of a DNS record. The default value for this field is false. the method returns the attribute value. Returns If you specified a parameter. discoverer( ) Use this method to retrieve the discoverer of an A Record object. the method returns true when the modification succeeds. Omit the parameter to retrieve the attribute value. and returns false when the operation fails. Parameter none Returns The method returns the discovered name. If you did not specify a parameter.Infoblox API Documentation comment( ) Use this method to set or retrieve the descriptive comment. Parameter none Returns The method returns the discoverer value. Parameter Specify "true" to set the disable flag or "false" to deactivate/unset it. Omit the parameter to retrieve the attribute value. Returns If you specified a parameter. Include the specified parameter to set the attribute value.

Omit the parameter to retrieve the attribute value. Omit the parameter to retrieve the attribute value. Parameter An IPv4 address is a 32-bit number in dotted decimal notation. Parameter none Returns The method returns the date and time when the A Record object was first discovered. the value is a string with a maximum of 256 characters. Include the specified parameter to set the attribute value. the method returns true when the modification succeeds. 1970 UTC. and string types. #Modify ipv4addr $bind_a->ipv4addr("2. the value is an integer from -2147483648 through 2147483647. the method returns true when the modification succeeds.2). For email.1r4 Page 407 (Rev. 168. For a date. ipv4addr( ) Use this method to set or retrieve the the IPv4 address. Returns If you specified a parameter. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192. The default value for this field is empty.2.2. If you did not specify a parameter. the method returns the attribute value. Parameter The valid value is a hash reference containing the names of extensible attributes and their associated values. Example #Get extensible attributes my $ref_extensible_attributes = $bind_a->extensible_attributes().1. A) . extensible_attributes( ) Use this method to set or retrieve the extensible attributes associated with a DNS A record. the method returns the attribute value.2"). #Modify extensible attributes $bind_a->extensible_attributes({ 'Site' => 'Santa Clara'. 'Administrator' => [ 'Peter'. and returns false when the operation fails.Infoblox API Documentation #Get discoverer my $discoverer = $bind_a->discoverer(). Parameter NIOS 5. The default value is undefined. first_discovered( ) Use this method to retrieve the date and time that the A Record object was first discovered. For an integer. Example #Get ipv4addr my $ipv4addr = $bind_a->ipv4addr(). Example #Get first_discovered my $first_discovered = $bind_a->first_discovered(). and returns false when the operation fails. The names must be those of existing Infoblox::Grid::ExtensibleAttributeDef objects in the database. 'Tom' ] }). the value is the number of seconds that have elapsed since January 1st. If you did not specify a parameter. For a list. the value is a string with a maximum of 64 characters. URL. Include the specified parameter to set the attribute value. last_discovered( ) Use this method to retrieve the time this object was last seen by a discovery job. Returns If you specified a parameter.

network_component_description( ) Use this method to retrieve the description of the network device that is connected to the A Record object. Format for the hexadecimal strings for MAC addresses and vendor prefixes with colons or dashes. A) . #Modify mac_address $bind_a->mac_address("11::11::11::11::11::12"). Parameter Hostname in FQDN (Fully Qualified Domain Name) format. #Modify name $bind_a->name("bind_a. Include the specified parameter to set the attribute value.1r4 Page 408 (Rev. Returns If you specified a parameter.Infoblox API Documentation N/A Returns The method returns the attribute value. Example #Get last_discovered my $last_discovered = $bind_a->last_discovered(). Example #Get name my $name = $bind_a->name(). the method returns true when the modification succeeds. Returns The method returns the attribute value.com"). mac_address( ) Use this method to set or retrieve the the mac address. Omit the parameter to retrieve the attribute value. The FQDN consists of the hostname followed by the domain name (example: abc. name( ) Use this method to set or retrieve the host name.domain. Omit the parameter to retrieve the attribute value. A hostname can have a maximum of 256 bytes. If you did not specify a parameter. NIOS 5. Both of the following formats are acceptable: 11:11:11:11:11:11 and 11-11-11-11-11-11. A wildcard A record maps all the hostnames in a domain to a single IP address. Infoblox also supports wildcard A records. and returns false when the operation fails. netbios( ) Use this method to retrieve the name in the NetBIOS reply that responded to a NetBIOS query. Include the specified parameter to set the attribute value. Example #Get netbios my $netbios = $bind_a->netbios().com). Returns If you specified a parameter. the method returns true when the modification succeeds. the method returns the attribute value. and returns false when the operation fails. the method returns the attribute value. If you did not specify a parameter. Example #Get mac_address my $mac_address = $bind_a->mac_address(). Parameter MAC Address of the A record object.

Example #Get network_component_port_description my $network_component_port_description = $bind_a->network_component_port_description(). network_component_port_name( ) Use this method to retrieve the name of the network device port that is connected to the A Record object. Example #Get network_component_name my $network_component_name = $bind_a->network_component_name(). Parameter none Returns The method returns the network device name. network_component_name( ) Use this method to retrieve the name of the network device that is connected to the A Record object. A) . Example #Get network_component_description my $network_component_description = $bind_a->network_component_description(). network_component_port_description( ) Use this method to retrieve the description of the network device port that is connected to the A Record object.1r4 Page 409 (Rev. Example NIOS 5. network_component_ip( ) Use this method to retrieve the IP address of the network device that is connected to the A Record object. Parameter none Returns The method returns the network device IP address. Parameter none Returns The method returns the name of the port on the network device. Parameter none Returns The method returns the network device port description.Infoblox API Documentation Parameter none Returns The method returns the network device description. Example #Get network_component_ip my $network_component_ip =