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::DNS::View->new( name => 'Internal' );
my $searchHost = $session -> search (
object => "Infoblox::DNS::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::DNS::Record::Host' , please make sure this is a supported object type.
Anyone see what the problem with the code is ?
