Software Development Kit (SDK) and API Discussions

NetApp SDK 5.0 Python code for C-Mode filer problem

wugang10717
3,105 Views

I selected "ONntapi 1.15 Cluster-Mode" and "vserver-get-iter" from ZExplore Development Interface. then generate Python code.

when I ran the script , I got :

Error:

<results status="failed" errno="13001" reason="Extra content at the end of the document "></results>


can someone please help? my filer is  "8.1.1 Cluster-Mode" and FAS6280

1 REPLY 1

kunalm
3,020 Views

This is the working code (taken from ZEDI) -

import sys

sys.path.append("<path_to_nmsdk_root>/lib/python/NetApp")

   

from NaServer import *

           

s = NaServer("<server name or IP address>", 1 , 17)

s.set_server_type("FILER")

s.set_transport_type("HTTPS")

s.set_port(443)

s.set_style("LOGIN")

s.set_admin_user("<user name>", "<password>")

                             

api = NaElement("vserver-get-iter")

   

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

Public