pyvcloud
is the Python SDK for VMware vCloud Director.
This project is under development, the classes, methods and parameters might change over time. This README usually reflects the syntax of the latest version.
We are rewriting pyvcloud
for a more efficient and easy-to-use library. The new code is located under the pyvcloud/vcd directory. The original code is still part of the SDK but we encourage to use (and contribute to) the new library. The new vcd-cli is being developed with the new library implementation and can be used as a reference, in addition to the unit tests.
In general, pyvcloud
can be installed with the following command:
$ pip install --user pyvcloud
pyvcloud
can also be installed with virtualenv.
Contributions to pyvcloud
are welcome and they should include unit tests.
Check out the latest version and install:
git clone https://github.com/vmware/pyvcloud.git
cd pyvcloud
virtualenv .venv
source .venv/bin/activate
python setup.py develop
Sample test parameters are in file tests/config.yml. Create a copy to specify your own settings and use the VCD_TEST_CONFIG_FILE
env variable.
cd tests
cp config.yml private.config.yml
# customize credentials and other parameters
export VCD_TEST_CONFIG_FILE=private.config.yml
# run unit test
python -m unittest vcd_login vcd_catalog_setup
# run just a test method
python -m unittest vcd_catalog_setup.TestCatalogSetup.test_validate_ova
See tests/run-tests.sh for a list of current unit tests written for the new SDK implementation.