Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i am using NMSDK with python. I am using below script
when i run the below script with major:minor no 1:32 it works fine
<script>
import sys
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("vsadmin", "pass")
api = NaElement("system-get-ontapi-version")
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())
<script>
But for same script when i pass major:minor no as:
s = NaServer("array-ip", 1 , 130) - > here 1:130 is major:minor no.
it gives error:
<results status="failed" errno="13010" reason="Version 1.130 was requested, but only 1.32 is supported."></results>
so, How can i get the supported major and minor no for Array
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a standard Python class which has functions for all version. In my environment we have standard ONTAP version so it is easy to identify geneally but if you have multiple version of ONTAP, I suggest to have one class with multiple functions in it for multiple version.
In your main script, use API failure message i.e. if there is failure then your other function and keep doing so until failure message does not go away.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes i get your point. is there any documentation for this major:minor no. combination
actually i m writing a generic script with NMSDK so for every array it can handle the version and provide the output despite of failure. or any command through which we can get the major and minor version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@neha_T No I am not aware of any such document.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for your inputs
i want to know one more thing
s = NaServer("array", 1 , 32) --> 1, 32 is major and minor no of appliance
I am getting this major and minor no. through zapi "system-get-ontapi-version", but is there any command through which i can get the same details on cluster/node ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think there is no such command as well.
