Hi,
I am trying to collect volume space info using python and am getting the error message show below.
<results status="failed" errno="1" reason="Extra content at the end of the document "></results>
Function calling in python : query is a the locaiton where the api call for volume_space is present. Record limit is set to 500 and volume name is a string of vol name.
query.volume_space(apiconnect, recordlimit, volume)
query :
def volume_space(s, recordlimit, volume):
api = NaElement("volume-get-iter")
xi = NaElement("desired-attributes")
api.child_add(xi)
xi1 = NaElement("volume-attributes")
xi.child_add(xi1)
xi2 = NaElement("volume-space-attributes")
xi1.child_add(xi2)
xi2.child_add_string("size","<size>")
xi2.child_add_string("size-available","<size-available>")
xi2.child_add_string("size-total","<size-total>")
xi2.child_add_string("size-used","<size-used>")
api.child_add_string("max-records", recordlimit)
xi3 = NaElement("query")
api.child_add(xi3)
xi4 = NaElement("volume-attributes")
xi3.child_add(xi4)
xi5 = NaElement("volume-id-attributes")
xi4.child_add(xi5)
xi5.child_add_string("name", volume)
api.child_add_string("tag","<tag>")
xo = s.invoke_elem(api)
if (xo.results_status() == "failed") :
print ("Error:\n")
print (xo.sprintf())
sys.exit (1)
print ("Received:\n")
print (xo.sprintf())
Can you please help me with resolving this error?
It works fine in the ZEDI GUI. But it's failing when I make the same call in python.