SSO Login is being implemented on this site. Existing users: Your existing password must be reset the first time you login using SSO. Click here to reset your password first before login. Your new username will be your email.

API & Integration, DevOps,NetOps,SecOps

Reply

Register MAC address with additional fields

Member
Posts: 1
803     0

Hello, I have this existing PERL code which registers a MAC address along with various other information, such as a filter (which says if network adapter is wireless or wired), username, expiriation time, etc. I want to recreate this MAC address registration using the new Infoblox Rest API. What would be the equivalent to this PERL code using the REST API? Thanks.

 

Below is the existing PERL code:

 

use Infoblox;

my $argc = @ARGV;

my $session;
$session = Infoblox:Smiley Frustratedession->new(
"master" => "",
"username" => "",
"password" => "");
my @obj = $session->get(
object => "Infoblox:Smiley Very HappyHCP::MAC",
mac => $ARGV[0]);

unless (@obj){
my $mac = Infoblox:Smiley Very HappyHCP::MAC->new (
"mac" => $ARGV[0],
"filter" => $ARGV[1],
"comment" => $ARGV[4],
"expiration_time" => "0",
"username" => $ARGV[3],
"authentication_time" => $ARGV[2],
"reserved_for_infoblox" => "For Infoblox Use only"
);
my $response = $session->add($mac);
unless($response) {
die ("Create registration failed (" . $session->status_code() . ":" . $session->status_detail() . ")\n");
}
print "Registration was successful.\n";
}

Showing results for 
Search instead for 
Did you mean: 

Recommended for You