Friday, 3 March 2017

NetApp ONTAP - API Primer: Programmatical Access to ONTAP

The post specifically focuses around API/Programmatical/Script methods/resources to help you manage your NetApp (Clustered Data) ONTAP environment.

Clustershell

Definitely CLI and perhaps not obviously API, but there are a few Clustershell commands that are worth looking at::>


set advanced
security login role show-ontapi

set diag
system ontapi changes show
system ontapi limits show


Tip: The output of ‘security login role show-ontapi’ shows the ONTAPI and related Clustershell command.

NetApp PowerShell Toolkit for Windows

“The ONTAP PowerShell module contains 2050 cmdlets, enabling the storage administration of NetApp ONTAP systems via ZAPI” (Toolkit version 4.3)

Tip: The output of Get-NcHelp shows the API leveraged by the cmdlet.

NetApp Manageability SDK (NMSDK)

You can find this on the download site - http://mysupport.netapp.com/NOW/cgi-bin/software/ - under ‘NetApp Manageability SDK’. Under the {Select Platform} dropdown, there is:

- .NET API Bindings for Windows
- Java API Bindings
- All Platforms

As an example from the ‘All Platforms’ download, in the zedi folder, you will find the application zexplore.exe. A screenshot of the ‘ZExplore Development Interface’ is below:

Image: ZExplore Development Interface
You can choose your API version (sample list of ONTAP version to API version is in the Appendix below), choose your API, and get code examples for these languages:
C#, C, Java, Perl, Python, Ruby
Note: The relevant libraries are in the lib folder.

OnCommand Workflow Automation REST API

You can manage your ONTAP clusters with WFA and - furthermore - use REST API with WFA. Check out the latest version of the ‘REST Web Services Primer’ for your version of WFA. Links to WFA documentation and the latest (non-release candidate) version of the Primer are below:

OnCommand API Services (REST API)

OnCommand API Services (for Linux - CentOS or RedHat) is available from the NetApp download site.

The latest version of OnCommand API Services is 1.2. Check out the documentation:

The following image illustrates how the API server works:

Image: OnCommand API Services - how the API server works
Appendix: Sample list of ONTAP version to API version


ONTAP 9.1: Ontapi 1.110 Cluster-Mode
ONTAP 9.0: Ontapi 1.100 Cluster-Mode
ONTAP 8.3.2: Ontapi 1.32 Cluster-Mode
7-Mode 8.2.3: Ontapi 1.21 7-Mode
7-Mode 8.1.4: Ontapi 1.19 7-Mode


Note: My method of finding this information wasn’t very scientific, just from the PowerShell toolkit -

(Connect-NcController CDOT_CLUSTER -credential admin).Ontapi
(Connect-NaController 7MODE_CONTROLLER -credential root).Ontapi

- using what VSIMs I had in my lab.

No comments:

Post a Comment