VMware vSAN SDK for Perl
=================================

The VMware vSAN SDK supports the development of programs that manage
vSAN using vSAN Management API.

VMware vSAN runs in conjunction with vCenter and ESXi servers.
Please note that the VMware vSphere API is required as a baseline for using
vSAN API (i.e. vSphere API should be used for logging in, retreiving
ManagedEntities like vCenter clusters).

VMware vSAN SDK for Perl depends on viperl (v6.7) - the Perl
SDK for the VMware vSphere API. You should know how to use viperl before
trying this SDK. Please refer to https://www.vmware.com/support/developer
/viperltoolkit/ for viperl documentation and software.

The vSAN SDK for perl includes the following documentation and software.
*  vSAN API reference - HTML documents in the 'docs' directory
   You can browse it with your browsers by opening the index.html locally.

*  Perl bindings - the Perl module/file under the 'bindings' directory
   It allows you to access vSAN management APIs. You need to put it
   in a path where your Perl programs can import. Note that viperl must
   be installed before importing the vSAN bindings.

*  Sample codes - the sample programs and dependent libraries under the
   'samplecode' directory. To run the sample program, firstly you need to put
   the perl binding - 'VIM25VsanmgmtRuntime.pm' and 'VIM25VsanmgmtStub.pm'
   to the same directory of the sample or paths where can be searched by Perl.
   Then you can run the sample codes.

Sample code usage:

* Test VC side API:

    vsanapisample.pl --url https://<host>:<port>/sdk/vimService
               --username myuser --password mypassword --cluster_name mycluster
    vsanapisample.pl --url https://<host>:<port>/sdk/vimService
               --username myuser --password mypassword --cluster_moid clustermoid

  Specifically to test with vSAN iSCSI target service:

    vsaniscsisample.pl --url https://<host>:<port>/sdk/vimService
               --username myuser --password mypassword --cluster_name mycluster
    vsaniscsisample.pl --url https://<host>:<port>/sdk/vimService
               --username myuser --password mypassword --cluster_moid clustermoid

* Test ESX side API:
    vsanapisample.pl --url https://<host>:<port>/sdk
               --username myuser --password mypassword

* Use "--help" to see parameter usage message.
* Note that the vsanapisamples.pl depends on the VsanapiUtil.pm, which provides
  uitlity lib to retrieve vSAN Managed Objects.
* You can use the sample code to get vSAN Managed Objects on vCenter and
  ESXi servers. It will automatically identify the target server type.
