- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Infoblox API - Session "Search"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-20-2012 10:21 AM
I'm wrinting a perl script which uses the "session -> search" method to look for a DNS Host record. In the code below The $hostname variable contains the FQDN of the host I'm searching for :sub search4host { my ($hostname) = @_; my ($result, $response); my $intView = Infoblox:NS::View->new( name => 'Internal' ); my $searchHost = $session -> search ( object => "Infoblox:
NS::Record::Host", name => "$hostname" , views => [ $intView ], ) ; $result = $session->status_code(); $response = $session->status_detail(); print "($result) $response\n" ;The script gets the following error: <1001> General failure searching object type 'Infoblox:
NS::Record::Host' , please make sure this is a supported object type.Anyone see what the problem with the code is ?
Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2012 11:37 AM
Hi Jose,
Per the engineering team (response below)
it's called DNS::Host, not DNS::Record::Host
Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2012 11:58 AM

Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2012 02:24 PM


Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2012 02:42 PM
sub search4host {my ($hostname) = @_;my ($result, $response);my $intView = Infoblox:
NS::View->new( name => 'Internal' );my ($searchhost) = $session -> search (object => "Infoblox:
NS::Host",name => "$hostname",views => [ $intView ],);my $ref_ipv4addrs = $searchhost->ipv4addrs();
$ref_ipv4addrs will now contain all the addresses or fixed address objects. You could use foreach to loop through, and confirm the type of object by using ref().
Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2012 02:56 PM


Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2012 03:11 PM
Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-21-2012 08:00 AM
@searchhost is an array. $searchhost is a scalar. What he did was use a scalar variable to store a reference to the information.
ref() is a function that lets you look at a variable and figure out what's in it. You can find an overview of ref here:
http://perldoc.perl.org/functions/ref.html
If you haven't used references in perl, they can be confusing to start, but they give you some ways of dealing with data that give ytou a lot of flexibility. They are worth studying if you're going to work in perl.
Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-21-2012 10:56 AM


Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-11-2012 11:12 AM
Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-12-2012 12:40 PM
Is there a way to get all the
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-10-2013 06:39 AM
I'm looking to retrieve all of the IPAM::Address, DNS::Record::A and DNS:Record:AAAAA records from the IB database without regard to any other values. Once I get the records back, I plan to search for particular IP addresses and/or domain names.
Is there any easy way to do this?
Jeff Burt
AT&T Government Solutions
Re: Infoblox API - Session
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-10-2013 11:54 PM
Hi
I tried similar concept but always return as no reord found though the record is exist.