The vSAN Management SDKs bundle language bindings for accessing the vSAN Management API and creating client applications for automating vSAN management tasks.

The vSAN Management API The vSAN Management API is an extension of the vSphere API. Both vCenter Server and ESXi hosts expose the vSAN Management API. You can use the vSAN Management API to implement the client applications that perform the following tasks:

>>Configure a vSAN cluster – Configure all aspects of a vSAN cluster, such as set up VMkernel networking, claim disks, configure fault domains, enable the deduplication and compression of all flash clusters, and assign the vSAN license.

>>Configure a vSAN stretched cluster – Deploy the vSAN Witness Appliance and configure a vSAN stretched cluster.

>>Upgrade the vSAN on-disk format.

>>Track the vSAN performance.

>>Monitor the vSAN health.

The vSAN Management SDKs are separated into five different programming languages, Java, .NET, Python, Perl, and Ruby.

Each of the five vSAN Management SDKs depends on the vSphere SDK with similar functionality delivered for the corresponding programming language.

You can download these vSphere SDKs from https://code.vmware.com/home or from Github.

1:vSAN Management SDK for Java

2:vSAN Management SDK for .NET

3:vSAN Management SDK for Python

4:vSAN Management SDK for Perl

5:vSAN Management SDK for Ruby

1: Running the Sample Applications The vSAN Management SDK for Java includes sample applications, build and run scripts, and dependent libraries. They are located under the samplecode directory in the SDK. You can use the sample code to get vSAN managed objects on vCenter Server or ESXi hosts.

Before running the sample applications, make sure that you have the vSphere Web Services SDK on your development environment, with the following directory structure:

VMware-vSphere-SDK–build

           SDK

                  vsphere-ws

Then copy the vsan-sdk-java directory at the same level as the vsphere-vs directory in the vSphere Web Services SDK:

VMware-vSphere-SDK–build

         SDK

                vsphere-ws

                vsan-sdk-java

Build the sample applications by running the build.py command. Run the sample applications using the run.sh script on Linux, or the run.bat script on Windows:

./run.sh com.vmware.vsan.samples. <Sample_name>

      –url https://vcenter/host_address/sdk

      –username <username>

      –password  <password>

2:vSAN Management SDK for .NET

The vSAN Management SDK for .NET provides libraries, sample code, and API reference for developing custom .NET clients against the vSAN Management API. The vSAN Management SDK for .NET depends on the vSphere Web Services SDK of similar level. You use the vSphere Web Services SDK for logging in to vCenter Server and for retrieving vCenter Server managed objects.

Building the vSAN C# DLL

You must have the following components to build the vSAN C# DLL:

>> csc.exe. A C# compiler

>> sgen.exe. An XML serializer generator tool

>> wsdl.exe. Web Service Description Language 4.0 for Microsoft .NET

>> Microsoft.Web.Services3.dll

>> .NET Framework 4.0 n Python 2.7.6

To build the vSAN C# DLL, run the following command:

$ python builder.py vsan_wsdl vsanservice_wsdl

This command generates the following DLL files:

>> VsanhealthService.dll

>> VsanhealthService.XmlSerializers.dll

Running the Sample Applications To run the sample applications, run the following command:

.\VsanHealth.exe –username  hostname

–url https://vcneter_name/sdk

–hostName cluster name —ignorecert –disablesso

To view information about the parameters, use –help.

For further references please follow : https://code.vmware.com/web/sdk/6.7U1/vsan-python & https://code.vmware.com/apis/444/vsan