i am using NMSDK script to get info of cluster,
but i want to get the output in json() format.
How can i set the Content type as "application/json"
<snip>
import sys
import pprint
import json
sys.path.append("./NetApp")
from NaServer import *
s = NaServer("Array", 1 , 32)
s.set_server_type("FILER")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("admin", "password@123")
api = NaElement("cluster-identity-get")
xi = NaElement("desired-attributes")
api.child_add(xi)
xi1 = NaElement("cluster-identity-info")
xi.child_add(xi1)
xi1.child_add_string("cluster-contact","<cluster-contact>")
xi1.child_add_string("cluster-location","<cluster-location>")
xi1.child_add_string("cluster-name","<cluster-name>")
xi1.child_add_string("cluster-serial-number","<cluster-serial-number>")
xi1.child_add_string("cluster-uuid","<cluster-uuid>")
xi1.child_add_string("rdb-uuid","<rdb-uuid>")
xo = s.invoke_elem(api)
print (type(xo))
if (xo.results_status() == "failed") :
print ("Error:\n")
print (xo.sprintf())
sys.exit (1)
print ("Received:\n")
data = xo.sprintf()
print (data)
<snip>