
		Example perl programs

This directory contains example perl programs. 

The directory has simple and complicated programs.
It is recommended users start with programs listed in
'Simple Examples' section and then move to programs
listed in 'Complicated Examples' section.

List of Perl programs:

Simple Examples:
hello_ontapi.pl : Prints ONTAP version of filer
print_volume.pl : Prints volume information.
qtree_quota.pl  : Creates qtree on a volume and adds quota entry. 
apitest.pl       : Executes ONTAPI routines on filer specified.   

Complicated Examples:
snapman.pl      : Snapshot mgmt using ONTAPI interfaces.
monitor_volume.pl  : Monitors volume on a filer & sends e-mail 
                     on space usage crossing threshold value. 
					 Depends on volume_configt text file.
					 Math/Round.pm needs to be present in the perl library
					 for this to work.

Usage :

Windows:

Syntax:
$perl hello_ontapi.pl <filer name> <user> <password>
$perl apitest.pl <filername> <user> <password> <ONTAPI-name> {<key> <value>}

Example:
$perl hello_ontapi.pl toaster root bread
$perl apitest.pl toaster root bread quota-report volume vol0 

Unix:

Syntax:
$./hello_ontapi.pl <filer name> <user> <password>
$./apitest.pl <filername> <user> <password> <ONTAPI-name> {<key> <value>}

Example:
$./hello_ontapi.pl toaster root bread
$./apitest.pl toaster root bread quota-report volume vol0 

Documentation:
Programs listed in the directory have 'pod' documentation.  
Syntax to print the document of perl program:
$perldoc <perl-program>


Dependency:
These perl programs use perl modules located in /lib/perl/NetApp
directory of SDK.
