Skip to main content

VMware vCloud Director Python SDK

Project description

pyvcloud
========

|ver| |build-status|

Python SDK for VMware vCloud Director and vCloud Air.

This project is under development, the classes, methods and parameters might change over time. This README usually reflects the syntax of the latest version.

New vCD support is located under `pyvcloud/vcd <pyvcloud/vcd>`_ directory.

Sample Usage
============

Import modules and instantiate a VCA object:

.. code:: python

from pyvcloud.vcloudair import VCA
vcd = VCA(host, user, service_type, service_version, verify)

Login to a vCloud Director instance:

.. code:: python

result = vcd.login(password=password, org=org)

See `changes log <ChangeLog>`_ for a list of changes.

Installation
============

The Python SDK requires the libxml2 and libxslt libraries, see `lxml <http://lxml.de/installation.html>`_ for more details.

On Debian/Ubuntu, you can install `lxml` and Python development dependencies with this command:

.. code:: bash

sudo apt-get install libxml2-dev libxslt-dev python-dev python-pip

On RHEL-based distributions:

.. code:: bash

sudo yum install libxslt-devel libxml2-devel python-devel python-pip

The Python SDK can then be installed with the following command:

.. code:: bash

pip install --user pyvcloud

**pyvcloud** can also be installed with `virtualenv <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_

Examples
========

See the `examples <https://github.com/vmware/pyvcloud/blob/master/examples>`_ directory for sample code.

Development and Test
====================

To run the source code, check it out from GitHub and install it with:

.. code:: bash

python setup.py develop

To log the requests, add the ``log=True`` parameter to the VCA constructor. The log is appended to file ``$TMPDIR/pyvcloud.log``.

.. code:: python

vcd = VCA(host=host,
username=username,
service_type='vcd',
version='5.7',
verify=False,
log=True)

To test **pyvcloud**:

.. code:: bash

git clone https://github.com/vmware/pyvcloud.git
cd pyvcloud
virtualenv .venv
source .venv/bin/activate
python setup.py develop
pip install -r test-requirements.txt
cp tests/config.yaml my_config.yaml
# customize credentials and other parameters
nosetests --verbosity=2 --tc-format yaml --tc-file my_config.yaml tests/00010_vcd_login.py

See `.gitlab-ci.yml <.gitlab-ci.yml>`_ for current tests.

.. |build-status| image:: https://img.shields.io/travis/vmware/pyvcloud.svg?style=flat
:alt: build status
:scale: 100%
:target: https://travis-ci.org/vmware/pyvcloud/

.. |ver| image:: https://img.shields.io/pypi/v/pyvcloud.svg
:alt: Stable Version
:scale: 100%
:target: https://pypi.python.org/pypi/pyvcloud



Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvcloud-18.0.13.dev7.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvcloud-18.0.13.dev7-py2-none-any.whl (1.4 MB view details)

Uploaded Python 2

File details

Details for the file pyvcloud-18.0.13.dev7.tar.gz.

File metadata

File hashes

Hashes for pyvcloud-18.0.13.dev7.tar.gz
Algorithm Hash digest
SHA256 f88aee27e27daf1df145b9b5845c981e7eaa51c0b248130bd6c46bb57495ca1a
MD5 4daf7f90dcd73e78b599353e4283c648
BLAKE2b-256 f426b28d7d2daf5a1022baa568f9eb585b32dfea397fc9cebb54c643675f238b

See more details on using hashes here.

File details

Details for the file pyvcloud-18.0.13.dev7-py2-none-any.whl.

File metadata

File hashes

Hashes for pyvcloud-18.0.13.dev7-py2-none-any.whl
Algorithm Hash digest
SHA256 6028301331e3657bde71b8e12f433374cad846e391614760a4be0aa006f3a0ca
MD5 19c57d0a07e342ffe568704c321854a0
BLAKE2b-256 ff7fe947799eff278604ef0fada13c8e6b14b99849a6017d81e1a347c69f51a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page