Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

NetMRI_Easy.pm provides an interface to the NetMRI API from perl Perl scripts run on the NetMRI appliance. NetMRI_Easy.pm offers all of the features of infoblox_jobs.pm, with some safeguards and object-oriented interfaces that are unavailable when infoblox_jobs.pm is used.
NetMRI_Easy.pm is designed to be imported as a library into NetMRI and used by Perl scripts executed in the Sandbox sandbox environment.
NetMRI_Easy.pm is also a compatibility layer, allowing the writing of Perl scripts that function unaltered with the newer 2.5 NetMRI Perl API, using scripts originally developed for the NetMRI Perl Core API 1.1. The following subsections describe the Perl functions encompassed by NetMRI_Easy.pm.

...

my $easy = new NetMRI_Easy(api_version => 2, nios_api => 1, port => https);

or

my $easy = new NetMRI_Easy(api_version => 2, nios_api => 1, port => 443);

The Constructor for NetMRI_Easy takes a hash reference for options.

api_version => $version

Specifies which API version to use. See NetMRI::API for details.

nios_api => 1

Load the Infoblox API before connecting to the API. Using this option is the same as

use NetMRI::Util;

use_infoblox_api($main::nios_ipaddress);


NetMRI_Easy ensures that the Infoblox API is loaded before LWP::UserAgent. This is necessary because the Infoblox API requires a different version of LWP::UserAgent, and will fail if modules are loaded in the wrong order.


nios_ipaddress => $ip_address

IP address of the NIOS device to download the Infoblox API and connect to when using the nios_session method. This option is necessary when connecting to a NIOS that is not registered with NetMRI.

nios_username => $username

IP address of the NIOS device to download the Infoblox API and connect to when using the nios_session method. This option is necessary when connecting to a NIOS that is not registered with NetMRI.

nios_username => $username

Username to use when connecting to the NIOS device. This option is necessary when connecting to a NIOS appliance that is not registered with

...

NetMRI

...

or to connect with different credentials.

nios_password => $secret

Password to use when connecting to the NIOS device. This option is necessary when connecting to a NIOS appliance that has not been registered with NetMRI, or to connect with different credentials.

port => 443 or port => httpsConnects the sandbox to NetMRI via port 443. If not specified, the sandbox connects to NetMRI via port 80.