ONTAPI™ Management APIs

          

Each of the other API sets in Manage ONTAP have a fairly well-defined role and set of responsibilities. They do not, however, address all the unique functionality offered by Network Appliance products. There are no industry standard APIs at present for managing snapshots and qtrees, for example.The ONTAPI interface set exists to fill this hole. It is, however, designed to play well with emerging storage management standards.

ONTAPI includes APIs for qtrees, quotas, volumes, luns, snapshots, snapmirror, vfilers, and numerous other features. Complete API lists are in the doc/ontapi directory of the distribution, with subdirectories for each release version (the chart at doc/ONTAP_Interface_Versions.html lines up the versions of each interface that pertain to each major release of the ONTAP OS.

ONTAPI interfaces use XML as a format and may be configured to use either HTTP or DCE/RPC as the transport mechanism. HTTP is important when managing devices which may be outside of the corporate firewall, and locked down so that only port 80 is available, and is the default transport configuration. Security for HTTP can be be provided by using SSL.

ONTAPI is implemented as a small set of primitives that marshall and unmarshall arguments onto and from the wire, using XML as the description language. At present, bindings for C/C++, Perl and Java are provided. Development of bindings for other languages will be driven primarily by developer demand.

These primitives are the core routines that you use to call the ONTAPI APIs. There's a tutorial on how to use the core APIs from C/C++, Perl or Java. There's also language-specific reference information for C/C++, Perl and Java. A companion document shows the mapping between the core primitives in C, Perl and Java. There's also a Windows application called zexplore that lets you dynamically browse the ONTAPI APIs, call them and inspect the results. A perl script called ontapi lets you explore the APIs from a command line, either Windows or Unix.

The Manage ONTAP SDK contains sample code demonstrating the use of ONTAPI in both C and Perl. The sample applications, which are in the src/sample directory of the distribution, check version numbers and demonstrate a primitive snapshot management utility. The snapshot management sample code shows how to encapsulate a number of ONTAPI interfaces into typed functions and arguments. This code is not part of the ONTAPI interface set, as ONTAPI was designed to be easy to port to multiple languages because of its very simple and small set of primitives and use of the mini-DOM object model.

ONTAPI Mechanics
ONTAPI uses XML internally to represent both the inputs and outputs of an API invocation. Client code uses a small set of primitives to create a request, associate an API name with it, and add named parameters to the request. At the server end, similar primitives extract the parameters from the request for processing, and package up the reply. Finally, back at the client end, you extract the data from the reply using primitives such as na-child-get-string() provided for the purpose.

The fact that parameters are named makes optional parameters possible. When a parameter is specified as optional in the API documentation, you can usually leave it out. The exception is when a function expects one of three optional parameters; you must of course then specify one of them.

For portability, the only primitive data type in ONTAPI are integers, strings and booleans, and nested structures and arrays containing these types. The types are intentionally SOAP-compatible, although our transport mechanism is currently not SOAP

ONTAPI functions are guaranteed by the Manage ONTAP program to remain backward compatible for the life of the API and the major version of the SDK. When APIs must be updated, the new versions will use new names, take new optional parameters, or in some other way arrange to provide new functionality only to those clients which expect it. Major and minor version numbers will be provided for this purpose. Anytime new APIs are introduced, new optional parameters for existing APIs become available, and so on, the minor version number will be incremented. Major version number changes are reserved for incompatible architectural changes, and are not on any current roadmap.

The ONTAPI interface is the foundational API for Network Appliance products moving forward. We value your input. Please contact your Network Appliance representative with suggestions and issues.


Support

The sample code and documents in the SDK are unsupported by Network Appliance CS. To obtain direct engineering support for your development effort and purchase incident packs, please contact Network Appliance by sending email to dl-manage-ontap-api@netapp.com.

Your feedback is important to us. If you have suggestions for improvement of this sample code or documentation, please send them to sdk-feedback@netapp.com.