apitest is a command-line utility to test the Data ONTAP APIs. This utility is suitable for API users who are at a beginner level. This utility is available in C, Java, Perl, C#, and VB.NET in Windows. In UNIX-like environments, apitest is available in C, Java, and Perl.
For Windows, complete the following steps:
Open the command prompt.
Go to bin/nt/ directory.
To execute run apitest.
For a UNIX-like environment, complete the following steps:
Open the command prompt.
Go to src/util/apitest/ directory.
Run make to create the executable.
For Windows, complete the following steps:
Open the command prompt.
Go to src/sample/java/apitest/ directory.
Run MAKE.BAT file to create the class file.
For a UNIX-like environment, complete the following steps:
Open the command prompt.
Go to src/sample/java/apitest/ directory.
Run make to create the class file.
Complete the following steps:
Open the command prompt.
Go to src/sample/perl/ directory.
Run the command perl apitest.pl to execute.
Complete the following steps:
Open apitest.sln present at src/sample/CSharp/apitest/ in Visual Studio editor.
From the Build menu click Build apitest to generate the executable.
Complete the following steps:
Open apitest.sln at src/sample/VB.NET/apitest/ in Visual Studio editor.
From the Build menu click Build apitest to generate the executable.
Following is the command syntax:
apitest {options} <host> <user> <password> <API> [ <paramname> <arg> ...]
|
Command details |
Description |
|
apitest |
The command name. |
|
options |
An optional parameter. See the table below for more information. |
|
host |
The host name or IP address of the storage system. |
|
user |
The user name. |
|
password |
The corresponding password. |
|
API |
The name of the API. |
|
paramname |
The input element of the API. |
|
arg |
The value of the input element. |
Following are the options of the apitest command:
|
Options |
Description |
|
-i |
API specified as XML output, on the command line. |
|
-I |
API specified as XML output, on standard input. |
|
-t |
Server type. Following are the possible values:
|
|
-v |
The vFiler name, if the API has to be executed in the context of a vFiler. |
|
-r |
Uses RPC transport. |
|
-s |
Uses SSL. |
|
-p |
Overrides port to use. |
|
-x |
Shows the XML input and output. |
|
-X |
Shows the raw XML input and output. |
|
-h |
Authenticates hosts using the hosts.equiv file. |
|
-c |
Sets the connection timeout. |
Following is an example of the apitest command:
|
$apitest -x <host> <user> <password> file-read-file length 100 offset 0 path /vol/vol0/etc/temp/1 INPUT: <file-read-file> <length>100</length> <offset>0</offset> <path>/vol/vol0/etc/temp/1</path> </file-read-file>
OUTPUT: <results status="passed"> <length>3</length> <data>00abcd</data> </results> |
|
|
On the Windows platform, the RPC transport layer does not work without the ntapadmin.dll file in the DLL search path of the application. The file ntapadmin.dll is at bin/nt/. |