A consistent interface to multiple IaaS clouds; in Python http://cloudbridge.cloudve.org

Enis Afgan a976bbd179 (WIP) Adding security-based resources. In the process, added SecurityGroupService and KeyPairService. ATM, OpenStack implementation is still incomplete and the AWS implementation is out of sync with the new interface. Missing tests před 10 roky
cloudbridge a976bbd179 (WIP) Adding security-based resources. In the process, added SecurityGroupService and KeyPairService. ATM, OpenStack implementation is still incomplete and the AWS implementation is out of sync with the new interface. Missing tests před 10 roky
test c480ca9b2b Fix python 3 compatibility for exception před 10 roky
.gitignore bc79e797a9 Add .DS_Store to .gitignore před 10 roky
.travis.yml e090981cb5 Simplified tox coverage. Fixed typos před 10 roky
LICENSE 1500caecff Initial commit před 10 roky
README.md 6fd60d9370 Rename EC2 into AWS to be consistent with the naming principles used with OpenStack před 10 roky
example.py 1cfae21f31 Merge branch 'master' of https://github.com/gvlproject/cloudbridge před 10 roky
requirements.txt 4b12ccfb9b Added setup.py před 10 roky
setup.py 888126dd2a Added volume+snapshot support to openstack před 10 roky
tox.ini 629e1ed12a Renamed aws environment variables před 10 roky

README.md

cloudbridge

cloudbridge provides a layer of abstraction over different cloud providers. It's a straightfoward implementation of the bridge pattern.

Code Climate Code Health Coverage Status Build Status Release Status

Usage example

from cloudbridge.providers.interfaces import CloudProviderFactory
from bunch import Bunch

config = Bunch(access_key='a_key',
               secret_key='s_key')

provider = CloudProviderFactory().create_provider(ProviderList.AWS, config)
print(provider.security.list_key_pairs())

Running tests

To run the test suite locally, install tox with pip install tox and run tox command. This will run all the tests for all the environments defined in file tox.ini. In order to properly run the tests, you should have all the environment variables listed in tox.ini file (under passenv) exported.

If you’d like to run the tests on a specific environment only, use a command like this: tox -e py27 (or python setup.py test directly). If you'd like to run the tests for a specific cloud only, you should export env var CB_TEST_PROVIDER and specify the desired provider name (e.g., aws or openstack) and then run the tox command.

Note that running the tests will create various cloud resources, for which you may incur costs.