Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
I use "system-get-version" to check my ontap version, it comes to "NetApp Release 9.4P1".
and I downloaded netapp-manageability-sdk-9.5, in tool zedi, there are many API version to choose.
Which one should I use?
Solved! See The Solution
In ZEDI GUI connect to cluster and it will automatically connect to correct API vesion.
If you want to check API version use API "system-get-ontapi-version"
In ZEDI GUI connect to cluster and it will automatically connect to correct API vesion.
If you want to check API version use API "system-get-ontapi-version"
thanks a lot!!!
And I have another problem. We have many netapp storage machines and they have different ontap version from 8.x to 9.5, if I use SDK api version of 1.130, does it adapt to old ontap version like 8.x?
Any response would be helpful, thank you a lot again.
No. You have to choose correct version for each connection. Generally, I have a practice to having all version's connection in one file and use that file as python class.
Thank you it's a very good idea, but I have two questions.
First, before connected to the ontap, I can't get the correct api version but connect to ontap need input api version.
s = Naserver('host',1,140) s.set_server_type() s.set_transport_type() s.set_port() s.set_style() s.set_admin_user() s.set_vserver() api = NaElement('system-get-ontapi-version') xo = s.invoke_elem(api)
Second, one api's(like 'volume-create') parameters are different from a different version.
Like in 'volume-create', older api version doesn't have an input parameter 'space-slo'.
So when I change api version, do I need to change my whole code?
Would you mind sharing your different connection python class code demo?
Thank you a lot again, you really helped me!
get the output of api version and call same function from PY class.
from NaServer import * class Connection: def conn115(node): filer_name = node s = NaServer(filer_name, 1 , 15) s.set_server_type("FILER") s.set_transport_type("HTTPS") s.set_port(443) s.set_style("LOGIN") s.set_admin_user("username", "password") return s def conn121(node): filer_name = node s = NaServer(filer_name, 1 , 21) s.set_server_type("FILER") s.set_transport_type("HTTPS") s.set_port(443) s.set_style("LOGIN") s.set_admin_user("username", "password") return s def conn111(node): filer_name = node s = NaServer(filer_name, 1 , 11) s.set_server_type("FILER") s.set_transport_type("HTTPS") s.set_port(443) s.set_style("LOGIN") s.set_admin_user("username", "password") return s def conn113(node): filer_name = node s = NaServer(filer_name, 1 , 13) s.set_server_type("FILER") s.set_transport_type("HTTPS") s.set_port(443) s.set_style("LOGIN") s.set_admin_user("username", "password") return s def conn119(node): filer_name = node s = NaServer(filer_name, 1 , 19) s.set_server_type("FILER") s.set_transport_type("HTTPS") s.set_port(443) s.set_style("LOGIN") s.set_admin_user("username", "password") return s def conn130(node): filer_name = node s = NaServer(filer_name, 1 , 30) s.set_server_type("FILER") s.set_transport_type("HTTPS") s.set_port(443) s.set_style("LOGIN") s.set_admin_user("username", "password") return s def conn132(node): filer_name = node s = NaServer(filer_name, 1 , 32) s.set_server_type("FILER") s.set_transport_type("HTTPS") s.set_port(443) s.set_style("LOGIN") s.set_admin_user("username", "password") return s
s = Connection.conn115(l)
Hope this will help you.