2017-05-29 02:05 AM
I need help in using netapp sdk, oncommand api.
We are writing puppet application to talk to netapp ONTAP.
I need to know if storage-raid-options-iter is present in api functions list?
Where can i get this list ? which functions are exposed by API ?
Any helpful links url guides to get started will be helpful.
Solved! SEE THE SOLUTION
2017-05-29 03:46 AM - edited 2017-05-29 04:07 AM
You can view all the supported API's by downloading the NMSDK, extracting it and running the ZExplore application within the Zedi folder once the SDK is unzipped.
Copy the two files "zexplore.exe" and "zexplore.jar" to any windows system with Java runtime installed and run the appliation from a CLI:
C:\ZExplore>java -jar zexplore.jar
It takes a few seconds to load, once the GUI opens you can select the API type you want to connect in top left naviagation menu (EG DFM 7.2) and select "preferences\connect"
Enter the Hostname, FQDN or IP Address of your OCUM server, change the port to 443, enter your credentials then click connect. EG
Once connected, drag\drop the API from left navigation to right pane an click the execute button. EG drag drop the "system-about" api into the execute pane which generates the XML, when you click the green play button the API is executed and the XML response is shown.
Also if you click on the "develop" tab it will display the source C# sharp code.
Note: you can change your programming language preference by selecting "preferences\language" and select from C#, C, Java, Perl, Python, Ruby
Hope that helps
2017-05-30 02:01 AM
Thanks fo ryour helpful reply.
I do not have a windows system that can connect to a vsim ..
But its okay i found this
which is telling about all api functions available.
Now i have another doubt .
i want to use thsi api function from my puppet program
My question is if a command needs to be exceuted in some specific privelege - like advanced or diagnostic.
Then does this api will auto convert the ONTAP into that mode and execute the command ?
there is some specific process with which we can first execute set -privelege advanced and then call
this api function ?
If i am calling certain api function on ONTAP - can i see these logs somewhere where i want to see -
what all calls have come on ONTAP vsim w.r.t this api call ?
2017-05-30 05:56 PM - edited 2017-05-30 06:31 PM
There are a few options, if you are connecting via ZAPI then you set the required privellage when establishing your connection to the controller.
Alternately you can use a semicolon to execute multilple SSH commands with the first command used set the privellage. EG
TESTNS01> priv set advanced;vfiler run testnv01 vol offline /vol/testvol3
I am assuming that you are working with 7-Mode as "storage-array-list-info" is a 7-Mode API.
As for ZAPI logging in 7-Mode see the following KB artilcle
2017-05-31 12:45 AM
Thanks for your reply.
It has been very helpful.
One thing which i noticed,
we did manual "set -privilege advanced" on vsim cli prompt.
Ran my puppet program - which throws ONTAP api call "storage-array-modify"
corresponding to this command -- storage array modify -name <name> -max-queue-depth <value>
It worked well!!
I did not require to throw "set priv advanced" from API at all.
Now i doubt what would happen if i do not do manual
"set -privilege advanced" on vsim cli prompt.
Another doubt i have is
For some of the commands we need to integrate with puppet i am not getting any corresponding ONTAP API.
vserver services name-service dns modify -vserver * -domains <value> -state <value>
vserver services web modify -vserver <cluster_name> -enabled
storage raid-options modify -node * -name
and many more.
Where do i get corresponding api calls for these commands ?
I am referring netapp-manageability-sdk-ontap-8.3-api-documentation
Kindly correct me IIW and suggest right docs that can be useful in this work.
3 weeks ago
any update on this? I am running into same issue.
Are you running remote SSH or through Ruby (Puppet). I am trying to modify system time out. ZEDI works, but what next? How do I use the Developer code from ZEDI into puppet?
3 weeks ago
There are puppet libraries\modules for you to use as an example and modify to meet your requriements here:
this also might be useful: