Hi Guys,
I am using Netapp SDK 5.7 and below is the python code. If I try to list all of the volumes under the cluster it shows only 50+ or sometimes 200+ volumes. I could confirm that the cluster(version 9.1) has 1000+ volumes.How could I list all the volumes?
s = NaServer("x.x.x.x", 1 , 31)
s.set_server_type("FILER")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("someuser", "somepassword")
result = s.invoke('volume-get-iter' , 'max-records', 1000)
print(result.sprintf())
for volume in result.child_get('attributes-list').children_get():
volumename = volume.child_get('volume-id-attributes').child_get_string('name')
print(volumename)
#Below are the last few output lines of sprintf()
</volume-attributes>
</attributes-list>
<next-tag><volume-get-iter-key-td>
<key-0>vserver1</key-0>
<key-1>vol101</key-1>
</volume-get-iter-key-td>
</next-tag>
<num-records>250</num-records>
</result>
Looks to me "next-tag" says there is a volume vol101 being followed up and this time it prints 250 volumes(this number changes everytime running the script). How can I print all of the volumes from the cluster? Why max-records parameter doesnt helps here?
I dont know how to make use of "next-tag" and "tag" in the code. Could someone please explain me with an example. Thanks in advance.
Regards,
Joy