You can use Data ONTAP APIs retrieve information about various NetApp storage system features, such as qtrees, quotas, volumes, LUNs, Snapshot, SnapMirror, and so on.
The following list describes the sample codes that demonstrate the use of a few Data ONTAP APIs. The list also provides links to view those codes.
|
|
|
Sample code in languages... |
|||||||
|
Name |
Description |
C |
Perl |
Java |
C# |
VB.NET |
PoweShell |
Python |
Ruby |
|
FlexClone |
This sample code demonstrates how to create a clone for a flexible volume. It estimates the size, splits the clone, and shows the status. |
flexclone.c |
flexclone.pl |
flexclone.java |
- |
- |
-
|
flexclone.py |
flexclone.rb |
|
Quota listing |
This sample code demonstrates how to list the quota available on a storage system. |
quotalist.c |
quotalist.pl |
quotalist.java |
- |
- |
-
|
quotalist.py |
quotalist.rb |
|
Snapshot |
This sample code shows how to manage Snapshot copies. It demonstrates how to create a Snapshot copy, rename it, and delete it. The sample code also demonstrates how to get Snapshot copy lists and schedules. |
snapman.c |
snapman.pl |
- |
snapman.cs |
snapman.vb |
snapman.ps1 |
snapman.py |
snapman.rb |
|
SNMP |
This sample code describes how to use the SNMP API. The following actions are performed with this sample code:
|
snmp.c |
snmp.pl |
snmp.java |
- |
- |
-
|
snmp.py |
snmp.rb |
|
Consistency Group |
This sample code shows how to manage a consistency group, that is how to start and commit a consistency group. |
cg_operation.c |
cg_operation.pl |
- |
- |
- |
-
|
cg_operation.py |
cg_operation.rb |
|
Volume List |
This sample code lists the volumes that are available on a storage system. |
vollist.c |
print_volume.pl |
vollist.java |
vollist.cs |
vollist.vb |
vollist.ps1 |
print_volume.py |
print_volume.rb |
|
MAC address List |
This sample code shows a list of IP addresses and the corresponding MAC addresses. |
getmac.c |
- |
- |
- |
- |
-
|
|
- |
|
Option List |
This sample code shows a list of the options and demonstrates the use of the following functions:
|
optmgmt.c |
optmgmt.pl |
optmgmt.java |
optmgmt.cs |
optmgmt.vb |
optmgmt.ps1 |
optmgmt.py |
optmgmt.rb |
|
SnapMirror |
This code demonstrates the management of SnapMirror operations. |
sm.cpp |
snapmirror.pl |
snapmirror.java |
- |
- |
- |
snapmirror.py
|
snapmirror.rb |
|
Symlink |
This is a sample code for symbolic links from Windows. It demonstrates the use of the following functions:
|
symlink.c |
- |
- |
- |
- |
- |
|
- |
|
Volume Monitor |
This sample code shows how to monitor a volume on a storage system. |
- |
monitor_volume.pl |
- |
- |
- |
- |
monitor_volume.py
|
monitor_volume.rb |
|
qtree |
This sample code creates a qtree on a specified volume and adds a quota entry. |
- |
qtree_quota.pl |
- |
- |
- |
- |
qtree_quota.py
|
qtree_quota.rb |
|
vFiler |
This sample code demonstrates how to create, destroy, and list vFiler units on the storage system. |
vfiler.c |
vfiler.pl |
vfiler.java |
- |
- |
- |
vfiler.py
|
vfiler.rb |
|
vFiler Tunnelling |
This sample code demonstrates how to invoke Data ONTAP APIs on a vFiler through the physical storage system. |
vfiler_tunnel.c |
vfiler_tunnel.pl |
vfiler_tunnel.java |
vfiler_tunnel.cs |
vfiler_tunnel.vb |
vfiler_tunnel.ps1 |
vfiler_tunnel.py
|
vfiler_tunnel.rb |
|
Unified Capacity Management |
This sample code demonstrates the usage of Data ONTAP APIs for capacity management of NetApp storage systems. It demonstrates the following function:
|
unified_capacity_mgmt.c |
unified_capacity_mgmt.pl |
- |
- |
- |
-
|
unified_capacity_mgmt.py |
unified_capacity_mgmt.rb |
|
User administration |
This sample code demonstrates how to add, modify. and list the user administration capabilities using Data ONTAP APIs It demonstrates the following functions:
|
useradmin.c |
- |
- |
- |
- |
- |
- |
- |
|
Performance Operation |
This sample code demonstrates the use of some of the perf family APIs. The sample code lists the system-wide performance objects, the counters for a given performance object, the object instances for a given object, and also provides values for counters of a given performance object. |
perf_operation.c |
perf_operation.pl |
perf_operation.java |
perf_operation.cs |
perf_operation.vb |
perf_operation.ps1 |
perf_operation.py |
perf_operation.rb |
|
NFS |
This sample code demonstrates the use of some of the NFS family API. The sample code enables you to start, stop, and query the status of the NFS service. It also lists the current NFS export rules. |
nfs.c |
nfs.pl |
nfs.java |
nfs.cs |
nfs.vb |
nfs.ps1 |
nfs.py |
nfs.rb |
|
File SnapLock |
This sample code demonstrates how to get the retention time and how to set the retention for SnapLock files. |
file_snaplock.c |
file_snaplock.pl |
file_snaplock.java |
- |
- |
- |
file_snaplock.py |
file_snaplock.rb |
|
SAN Management |
This sample code demonstrates the following functions:
|
san_mgmt.c |
san_mgmt.pl |
- |
- |
- |
-
|
san_mgmt.py
|
san_mgmt.rb |
Sample codes for Data ONTAP Cluster-Mode:
|
Name |
Description |
C |
Perl |
Java |
C# |
VB.NET |
Python |
|
Data ONTAP mode |
This sample code finds out whether Data ONTAP is 7-Mode or Cluster-Mode |
- |
- |
system_mode.java |
- |
- |
system_mode.py |
|
Volume list |
This sample code lists the volumes that are available on a storage system . |
vollist.c |
vollist.pl |
vollist.java |
vollist.cs |
vollist.vb |
- |
|
Vserver |
This sample code demonstrates how to manage a Vserver in Data ONTAP Cluster-Mode. It demonstrates the following functions:
|
- |
vserver.pl |
vserver.java |
- |
- |
- |
|
Vserver list |
This sample code demonstrates howto lists all or few Vservers on a Data ONTAP Cluster-Mode. |
vserverlist.c |
vserverlist.pl |
vserverlist.java |
vserverlist.cs |
vserverlist.vb |
- |
|
Vserver tunneling |
This sample code demonstrates how to use Vserver tunneling |
- |
- |
vserver_tunnel.java |
- |
- |
vserver_tunnel.py |