Subscribe
Accepted Solution

Beginner to use netapp sdk - api

Hello All,

 

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.

 

Thanks

Nidhi

Re: Beginner to use netapp sdk - api

[ Edited ]

Hi Nidhi,

 

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

 

zexplore1.png

 

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.

 

zexplore2.png

 

Also if you click on the "develop" tab it will display the source C# sharp code.

 

zexplore3.png

 

Note: you can change your programming language preference by selecting "preferences\language" and select from C#, C, Java, Perl, Python, Ruby

 

Hope that helps

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Beginner to use netapp sdk - api

Hello,

 

Thanks fo ryour helpful reply.

I do not have a windows system that can connect to a vsim .. 

But its okay i found this 

 

 

netapp-manageability-sdk-ontap-8.3-api-documentation/netapp-manageability-sdk-ontap-8.3-api-documentation/doc/WebHelp/index.htm

 

which is telling about all api functions available.

 

 

Now i have another doubt .

 

i want to use thsi api function from my puppet program

storage-array-list-info 

 

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 ?

 

OR

 

there is some specific process with which we can first execute set -privelege advanced and then call 

this api function ?

 

and 

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 ?

 

 

Thanks

Nidhi

 

Re: Beginner to use netapp sdk - api

[ Edited ]

Hi

 

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.

 

zexplore1.png

 

As for ZAPI logging in 7-Mode see the following KB artilcle

 

https://kb.netapp.com/support/s/article/ka31A0000000wodQAA/oem-how-to-enable-zapi-debug-logging-on-7-mode-controllers

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Beginner to use netapp sdk - api

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.

like 

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

netapp-manageability-sdk-oncommand-6.1-api-documentation

 

Kindly correct me IIW and suggest right docs that can be useful in this work.