Software Development Kit (SDK) and API Discussions

How to get major and minor No. info for NetApp array


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


import sys
from NaServer import *
s = NaServer("array", 1 , 32)
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())



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




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. 




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?


@neha_T No I am not aware of any such document. 



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 ???


I  think there is no such command as well. 

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner