Currently Being Moderated

Introduction to Manage ONTAP SDK  (Storage Systems,Host Agents and NetCache) & Manageability  SDK (DFM Servers)
===============================================================================================

 

If you have Storage System, Ops Manager, DFM Servers, NetApp Host Agents or NetCaches then it will be interesting to know about NetApp SDK. The NetApp SDK is a very convenient way to communicate with any of these systems by building your own solution. It has its own Programming interfaces which allow you to build your own applications/interfaces to sort out your requirement quickly.

 

First, a quick explanation of Data ONTAP APIs would be, Storage Systems have a CLI interface,SNMP and they have a web interface, via FilerView. They also have an API interface called Data ONTAP APIs (ONTAPI).  The exact set of available Data ONTAP APIs depends on what type and what version of software you are trying to communicate with. For Storage Systems, Host Agents and NetCaches use the NetApp Manage ONTAP SDKhelp pages for Data ONTAP API details and for Ops Manager, DFM Servers you need to look into to NetApp Manageability SDK (NM).

 

Getting started with SDK
==================

 

Download:

 

NetApp Manage ONTAP SDK     @ http://communities.netapp.com/docs/DOC-1110

NetApp Manageability (NM) SDK @ http://communities.netapp.com/docs/DOC-1152

 

 

What is Next ?

 

Getting started with an SDK can be a fun and a great journey, and lets hope we can get you off to a right start! .Once you have the SDK downloaded, to proceed with install, extract it into some directory structure you can work with. Then, for some tips and guidance of what to do, browse down to the following file:

 

<SDK>\doc\WebHelp\index.htm or using the shortcut <SDK>/SDK_help.htm

 

At this point, open the above help file in your favorite browser (IE or Firefox). The best place to start from there is in the "Getting started with the SDK" section. This will provide you with an introduction, overview, release notes, etc.  Enough to get you started and playing with the SDK!

 

Additionally, if you want to play around with some things like (with a simulator ) you can play around with a few tools (cli or gui) located in "SDK\bin\nt"  In there you will find zexplore and apitest - Launch them and you'll see what it brings for you to play with!

 

Meet Data ONTAP SDK utilities

=======================

 

Apitest

----------

An example set of Data ONTAP APIs is the system-get-version or system-get-info call. This can be used to show the Data ONTAP version. The apitest command allows you to do get and set values on the target system from your host system, whether your host is Solaris, Linux or Windows. Here’s the usage

 

linux-server> apitest -t filer -x filer1 root password system-get-info

INPUT:
<system-get-version/>

OUTPUT:
<results status="passed">
        <version>NetApp Release 7.3.1.1P4D2: Tue Jul 21 12:42:50 PDT 2009</version>
</results>

 

 

This example shows how to add a filer,  Filer1, to the list of Storage Systems monitored by the DFM Server running on a Linux Server.

 

linux-server> apitest -t dfm -x  mydfmserver root  password host-add host-name-or-id Filer1

INPUT:

<host-add>

        <host-name-or-id>Filer1</host-name-or-id>

</host-add>

OUTPUT:

<results status="passed">

        <appliance-id>XXX</appliance-id>

        <host-address>XXX.XXX.XXX.XXX</host-address>

</results>

 

The apitest command is actually part of the ONTAP SDK. This SDK includes C, Java, and perl interfaces to Data ONTAP API servers (Storage System). If you like perl then you can use the perl interface to make the same type of requests as you can make with apitest.

 

Usage:

apitest {options} <host> <user> <password> <API> [<paramname> <arg> ...]

Options:
  -i          API specified as XML input, on the command line

  -I          API specified as XML input, on standard input

  -t {type}   Server type(type = filer, dfm, agent, netcache)

  -r          Use RPC transport (Windows)

  -s          Use SSL

  -p {port}   Override port to use

  -x          Show the XML input and output

  -X          Show the raw XML input and output

 

<host> is the name of the target system. It is the Filer, DFM Server, Host Agent or NetCache you want to communicate with. <user> and <password> are the credentials to access that target system. Here are a couple example invocations.

 

 

Hello ONTAPI  Perl Sample Code Walk

==============================

 

use strict;

use lib '../../../lib/perl/NetApp'; ===================> Use the Netapp Perl SDK librariers
use NaServer;===============================>
class for managing NetApp storage systems using ONTAPI(tm) APIs.

use Pod::Usage;

die pod2usage(
verbose => 1
) unless $ARGV[2];

our $filer = $ARGV[0];
our $user = $ARGV[1];
our $password = $ARGV[2];

our $s = NaServer->new($filer, 1, 1);
$s->set_admin_user($user, $password);=============>
Set the admin username and password

our $output = $s->invoke( "system-get-version" );======>Submit an XML request already encapsulated as  an NaElement and return the result in another  NaElement.

if ($output->results_errno != 0) {
our $r = $output->results_reason();
print "Failed: $r\n";
}
else {
our $r = $output->child_get_string( "version" );=======>
Gets the child named $version from the current object and returns its value.  If no child named $version is found, returns undef.

print "$r\n";
}

 

 

FAQs

====

 

o How to write my own solution using this SDK?

 

   Go to  SDK/src/sample path. You will find lots of sample code specific to languages (C,C#,Java,Per,VB.NET/). Try to use them as reference and program it.

 

o What is vFiler tunneling ?

 

 

    vFiler tunneling is a feature that enables an API to be invoked on a vFiler through the physical storage system on which the vFiler is contained. To access

    a vFiler, a user requires the IP address, user name, and password of the physical storage system alone.

 

    This feature is supported by the -v option of the apitest utility in the SDK.

 

 

    vFiler tunneling is supported by Data ONTAP 7.2.1 and later. While using the API na_server_set_vfiler, the client has to specify the ONTAPI version 1.7

    or  later.

 

   Before this feature was introduced, a user needed the IP address, user name, and password of both the actual storage system and the vFiler on which an

   API was to be invoked. It was a difficult task to maintain the details of the storage system and all the vFiler units on a network with a large number of

   vFiler units.

 

o How to Install SDK ?

 

     Its simple just download the zip file and unzip it to your prefered location.

353 Views Tags: manage, netapp, ontap, software, upgrade, admin, dataontap, manageability, virtualization, sdk, simulator, install, storage, command, (nm)