Software Development Kit (SDK) and API Discussions

API quota-report does not poll vfiler quotas

pastel01
1,623 Views

Hello,

I need to get data from virtual Filers (vFilers) hosted on a physical Filer in 8.1.4P9 7-Mode. I succeed only to get the quota report  data on the physical Filer (vfiler0).

Do I use to right API? How can I do to get quota report data for all the vFilers (vFiler0 and the others)?

 

Thanks for your help.

1 REPLY 1

gaurav_verma
1,467 Views

Hope this help you

 

class Set_filer:

        def a(self, api, filer_name):
                s = NaServer(filer_name, 1 , 20)
                s.set_server_type("FILER")
                s.set_transport_type("HTTPS")
                s.set_port(443)
                s.set_style("LOGIN")
                s.set_admin_user("admin", "password")
                a = s.invoke_elem(api)
                out = a.sprintf()
                return out

 

def quota():

        filer_name = raw_input("Enter Cluster name or IP:")
        api = NaElement("quota-list-entries-iter")
        api.child_add_string("max-records","10000")
        m = Set_filer()
        out =  m.a(api, filer_name)
        obj = xmltodict.parse(out)
        jdump = json.dumps(obj)
        final = json.loads(jdump)

Public