The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

Getting volume owner from DFM

GUILLAUMEWYSSEN

Dear community,

 

We have defined the field "owner" on the DFM web interface on each volumes. We want to use this field to specify "customer name" for another internal system.

 

I need to get this information through the Perl API.

 

I get all Volumes informations with "volume-list-info-iter-next" but I can't see any entry for the owner.

 

There is another way to get the owner field through API ?

 

There is another another field that i can use for external data ? (Like comment or annotation)

1 REPLY 1

cscott

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

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public