VMware vCloud Suite Python SDK: client README

VMware logo

The following section describes the current directory contents:

Directory structure

The vCloud Suite Client SDK for Python provides client bindings, documentation, samples, and WSDL files. The following table shows the client directories and their contents.

DirectoryDescriptionContents
bin Command scripts for sample execution run_sample.bat
run_sample.sh
lib VMware python libraries for accessing vCloud Suite services
samples Python samples that demonstrate the use of the vCloud Suite API See the Python samples README
wsdl Lookup Service WSDL files. lookup.wsdl
lookupservice.wsdl

Python SDK API Docs

apidocs directory contains the generated python API reference documentation for vCloud Suite features like Content Library and Tagging. The README page also includes a hyperlink to pyVmomi API reference documentation for convenience. Please Refer to vCloud Suite SDK Pythondoc for details.

SDK libraries

For python developers, client libraries are supplied for testing and development purposes. All the supplied libraries are located under lib directory.

NameDescription

Installing SDK and 3rd party libraries

The supplied python libs can be installed using pip install; For details on how to install python packages using pip please refer to pip user guide.

vapi_runtime

This library is needed for accessing features like Content Library and Tagging.

> pip install /path/to/VMware-vCloud-Suite-SDK-Python/client/lib/vapi_runtime-1.0.0.zip

pyOpenSSL is required by vapi_runtime. Please see the pyOpenSSL installation steps for details.

vapi_common_client

This library is needed for accessing features like Content Library and Tagging.

> pip install /path/to/VMware-vCloud-Suite-SDK-Python/client/lib/vapi_common_client-1.0.0.zip

vapi_client_bindings

This library is needed for accessing features like Content Library and Tagging.

> pip install /path/to/VMware-vCloud-Suite-SDK-Python/client/lib/vapi_client_bindings-1.0.0.zip

pyVmomi

This library is needed for accessing/manipulating vCenter Server managed objects using vSphere APIs; For more information please refer to vmware pyVmomi

> pip install pyvmomi

The following 3rd party python libraries are required to be installed for running the sample.
  • pyOpenSSL
  • lxml
  • suds (suds-jurko for python 3.x)

pyOpenSSL

This requires python cryptography package to be installed as a pre-requisite.
Please follow the detailed instruction from installing cryptography dev documentation
VMware strongly recommends using openssl version 1.0.1j or, higher. SDK and samples are tested against openssl version >= 1.0.1j.

pyOpenSSL version 0.14 is needed for the SDK (vapi_runtime) and samples. For details on how to install the package please go to pypi.python.org/pypi/pyOpenSSL/0.14.

lxml

Please follow detailed instructions from Installing lxml

> pip install lxml

Notes for the Windows client

How to use MinGW's gcc compiler when installing python package using pip?
  • install MinGW with gcc Compiler option checked
  • add C:\MinGW\bin to your PATH
  • In PYTHONPATH\Lib\distutils, create a file distutils.cfg and add these lines:
  • [build]
    compiler=mingw32
    
Here's an alternative method:
  • Download Libxml-python (Libxml-python are bindings for the libxml2 and libxslt libraries). Windows 64-bit installer for python 2.7 can be found here
  • Run the installer to install libxml2 and libxslt
  • Download lxml 3.3.1 windows 64-bit installer for python 2.7. link
  • Run the installer to install lxml

suds(suds-jurko)

This library is needed for lookup service queries; For more information please refer to suds Documentation

> pip install suds
Use suds-jurko for python 3.x
> pip install suds-jurko

Running a sample

Please refer to Running a sample for details.
  • run_sample.sh is needed for running the samples in UNIX/mac OS X environment
  • run_sample.bat is a windows bat file needed for running the samples in windows


Copyright © 2015 VMware, Inc. All rights not expressly granted herein are reserved.

Last updated: 23rd January 2015 |  VMware vCloud Suite Python SDK