Hello,
Assuming DFM 3.7.1 through 5.2 and 7mode controllers(per the SDK), the API can pull comment information, here is the basic outline to pull the information.
On all of my DFM instances the ownerName field is object ID 2 but you can specify ownerName, your ID may differ.
The comment-field-object-type for a volume is Volume, a qtree would be Qtree.
Object-name-or-id is the DFM volume syntax of <CONTROLLER>:/<VOLUME> or the volume ID in DFM.
I have not done any iterating through volumes, but hopefully this can get you started.
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('<server>', 1 , 0);
$s->set_server_type('DFM');
$s->set_transport_type('HTTPS');
$s->set_port(8488);
$s->set_style('LOGIN');
$s->set_admin_user('<user>', '<password>');
my $api = new NaElement('comment-field-values-list-info-iter-start');
$api->child_add_string('comment-field-name-or-id','ownerName');
my $xi = new NaElement('comment-field-object-types');
$api->child_add($xi);
$xi->child_add_string('comment-field-object-type','Volume');
$api->child_add_string('object-name-or-id','<volume Name or ID>');
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();
- Scott