Software Development Kit (SDK) and API Discussions

DFM API - host-list-info-iter-start inable to retrive filer info

sridharchevendra

This is the firs time using iter function. It is providing 3 out put result sin zedi.When querying from python on the hosts output, it says hosts has None. Did anyone come across this? appreciate any doc or sugestion in retriving info from the iter functions.

 

Here is the sample code.

 

api1 = NaElement("host-list-info-iter-start")
api1.child_add_string("expand-filer-to-vfilers","true")

xi_1 = NaElement("host-types")
api1.child_add(xi_1)

xi_1.child_add_string("host-type","vfiler")

xo1 = s.invoke_elem(api1)
if (xo1.results_status() == "failed") :
print ("Error:\n")
print (xo1.sprintf())

 

#Able to retrive the information from the first set of results

tag = xo1.child_get_string("tag")
records = xo1.child_get_string("records")

 

# Following fails

for host in xo1.child_get("hosts").children_get():
print host.child_get_string("id")

1 REPLY 1

sridharchevendra

never mind..think figured out the answer.

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