Subscribe

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

[ Edited ]

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")

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

never mind..think figured out the answer.