Reply

Perl API: can't get() or search() CNAME record

EYurchenko
Techie
Posts: 2
3685     0
Hello, when I log in into Infoblox Grid Manager I can easily find given CNAME record. Trying to do the same using Perl API I have no luck with error "1003-The specified object was not found". Here is my code: my @CNAMErecords = $session->search( object => "Infoblox:Smiley Very HappyNS::Record::CNAME", name => 'test-cname'); if (@CNAMErecords){ for my $C (@CNAMErecords){ print "CNAME record found: ".$C->canonical()."\n"; } }else{ print "\tNo CNAME records found: ".$session->status_code()."-".$session->status_detail()."\n"; } tried adding view and/or zone to search criteria without any positive results. What am I doing wrong? Thanks.

the issue was resolved by

EYurchenko
Techie
Posts: 2
3685     0
the issue was resolved by adding appropriate permissions to account the script was using to create $session.

Thanks

I-Team Employee
Employee
Posts: 186
3685     0

thanks for that update, Evgeny!

can you elaborate?

JEarickson
Techie
Posts: 6
3685     0

Can you give a few more clues as to what you did?  I am using perl on a Centos 6.6 system.  My session to Infoblox gets connected, then I do:

my @network_array = $session->get(
    object => "Infoblox:Smiley Very HappyHCP::Network" ,
    network => "[my network range here]",
    network_view => "default"
);
if ( $session->status_code() ) {
    printf("[%d] %s\n", $session->status_code(), $session->status_detail());
}

I get no error code but Data:Smiley Very Happyumper fails on @network_array and I get the same "[1003] The specified object was not found" error.

I am using an account with super-admin rights.

Highlighted

Re: can you elaborate?

GHorne Community Manager
Community Manager
Posts: 254
3685     0

you should just use a string, not an array in the network field:

 

network=>"1.1.0.0/24"

 

network=> "192.168.*"

 

etc.

Showing results for 
Search instead for 
Do you mean 

Recommended for You