Perl DFM 5.2 API : event_list_iter_start giving 0 records in output even if there are events present in DFM
INPUT:
require 5.6.1;
use lib '<path_to_nmsdk_root>/lib/perl/NetApp';
use strict;
use warnings;
use NaServer;
use NaElement;
my $s = new NaServer('scspn0061845002.lab.eng.btc.netapp.in', 1 , 0);
$s->set_server_type('DFM');
$s->set_transport_type('HTTP');
$s->set_port(8080);
$s->set_style('LOGIN');
$s->set_admin_user('administrator', '<password>');
my $api = new NaElement('event-list-iter-start');
my $xi = new NaElement('event-application-list');
$api->child_add($xi);
$xi->child_add_string('event-application-type','<event-application-type>');
$api->child_add_string('event-id','<event-id>');
my $xi1 = new NaElement('event-severities');
$api->child_add($xi1);
$xi1->child_add_string('obj-status','critical');
$api->child_add_string('event-source-id','<event-source-id>');
my $xi2 = new NaElement('event-type-filter-list');
$api->child_add($xi2);
my $xi3 = new NaElement('event-type-filter');
$xi2->child_add($xi3);
$xi3->child_add_string('event-filter','<event-filter>');
$api->child_add_string('is-acknowledged','false');
$api->child_add_string('max-events','<max-events>');
$api->child_add_string('object-management-filter','node');
my $xi4 = new NaElement('time-range');
$api->child_add($xi4);
my $xi5 = new NaElement('event-timestamp-range');
$xi4->child_add($xi5);
$xi5->child_add_string('end-time','<end-time>');
$xi5->child_add_string('start-time','<start-time>');
$api->child_add_string('timeout','<timeout>');
my $xo = $s->invoke_elem($api);
if ($xo->results_status() eq 'failed') {
print 'Error:\n';
print $xo->sprintf();
exit 1;
}
print 'Received:\n';
print $xo->sprintf();
OUTPUT:
<?xml version='1.0' encoding='UTF-8' ?>
<netapp version='1.0' xmlns='http://www.netapp.com/filer/admin'>
<!-- Output of event-list-iter-start [Execution Time: 69 ms] -->
<results status='passed'>
<records>0</records>
<tag>Event_List69_6852</tag>
</results>
<!-- Output of event-list-iter-end [Execution Time: 7 ms] -->
<results status='passed'/>
</netapp>
s