VMware vSAN SDK for Ruby
===============================

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).

Before you run the sample code, please make sure you have installed the
following dependencies properly:
*  VMware vSAN SDK for Ruby depends on RbVmomi - the Ruby SDK for the VMware
   vSphere API. Please refer to https://github.com/vmware/rbvmomi for RbVmomi
   documentation and software. The minimum RbVmomi version required is v2.4.1.

*  Ruby runtime (>2.7.0).

The vSAN SDK for Ruby 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.

*  Ruby bindings - the Ruby module/file under the 'bindings' directory
   It allows you to access vSAN management APIs. You need to put it
   in a path where your Ruby programs can import.

*  Sample codes - the sample programs and dependent libraries under the
   'samplecode' directory. To run the sample program, firstly you need to put
   the ruby binding - 'vsanmgmt.api.rb' to the same directory of the sample or
   paths where can be searched by Ruby. Then you can run the sample codes.

Sample code usage:
   ruby vsanapisamples.rb -o <host-address> -u <username> -p <password>
         <cluster-name>
   ruby vsaniscsisamples.rb -o <host-address> -u <username> -p <password>
         <cluster-name>

* Use "-h" or "--help" to see parameter usage message.
* Note that the vsanapisamples.rb depends on the vsanapiutis.rb, 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.
* The sample code requires 'nokogiri' and 'open-uri' to be installed.
