Skip to main content

rtwo 0.5.25 A unified interface into multiple cloud providers.

To install use pip install git+git://git@github.com:iPlantCollaborativeOpenSource/rtwo.git


rtwo

Build Status

A unified interface into multiple cloud providers.

Built on top of Apache libcloud with support for modern OpenStack. Also supports legacy Eucalyptus 2.x and AWS.

Install

pip install rtwo

Or from source

pip install -e git://github.com/cyverse/rtwo#egg=rtwo

Use

In [1]: import rtwo

In [2]: from rtwo.provider import OSProvider

In [3]: from rtwo.identity import OSIdentity

In [4]: from rtwo.driver import OSDriver

In [5]: from rtwo.accounts.openstack import AccountDriver

In [6]: osp = OSProvider()

In [7]: ad = AccountDriver()

In [8]: ad.create_account("awesomeo")
Out[8]: 
(<User {u'email': u'awesomeo@iplantcollaborative.org', u'tenantId': u'97dfaaebb0d943baa0cfa7cbd3bf24d5', u'enabled': True, u'name': u'awesomeo', u'id': u'
3d3ca254e7054fdcaa54f473e4d5b59f'}>,
 'yourpassword',
 <Tenant {u'enabled': True, u'description': None, u'name': u'awesomeo', u'id': u'97dfaaebb0d943baa0cfa7cbd3bf24d5'}>)
In [9]: osi = OSIdentity(osp, key=OPENSTACK_ADMIN_KEY, secret=OPENSTACK_ADMIN_SECRET, user="awesomeo", auth_url="http://openstack-server.org:port/v2.0", password=ad.hashpass("awesomeo"), region_name="ValhallaRegion", ex_tenant_name="awesomeo", username="awesomeo")

In [19]: osdriver = OSDriver(osp, osi)

In [11]: sizes = osdriver.list_sizes()

In [12]: machines = osdriver.list_machines()
In [13]: osdriver.create_instance(name="Lame.", image=machines[-1], size=sizes[1])
Out[13]: <class 'rtwo.instance.OSInstance'> {'name': 'Lame.', 'ip': None, 'machine': {'alias': '7819f88b-b335-449d-b17f-ed3af350c918', 'provider': 'OpenStack', 'id': '7819f88b-b335-449d-b17f-ed3af350c918', 'name': 'Ubuntu 12.04 NoGui 4GB 64-bit bare'}, 'alias': '2b3a1021-aaed-439f-a6b6-5e6f1a9d1fd5', 'provider': 'OpenStack', 'id': '2b3a1021-aaed-439f-a6b6-5e6f1a9d1fd5', 'size': {'alias': '2', 'bandwidth': None, 'disk': 10, 'name': 'm1.small', 'price': 0.0, 'ram': 2048, 'id': 'm1.small', 'cpu': 1}}
In [14]: osdriver.list_instances()
Out[14]: [<class 'rtwo.instance.OSInstance'> {'name': 'Lame.', 'ip': None, 'machine': {'alias': '7819f88b-b335-449d-b17f-ed3af350c918', 'provider': 'OpenStack', 'id': '7819f88b-b335-449d-b17f-ed3af350c918', 'name': 'Ubuntu 12.04 NoGui 4GB 64-bit bare'}, 'alias': '2b3a1021-aaed-439f-a6b6-5e6f1a9d1fd5', 'provider': 'OpenStack', 'id': '2b3a1021-aaed-439f-a6b6-5e6f1a9d1fd5', 'size': {'alias': '2', 'bandwidth': None, 'disk': 10, 'name': 'm1.small', 'price': 0.0, 'ram': 2048, 'id': 'm1.small', 'cpu': 1}}]

License

See LICENSE file.


For more information, please see: https://github.com/iPlantCollaborativeOpenSource/rtwo

Metadata

Release files for rtwo 0.5.25

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rtwo 0.5.25
File Size Uploaded Provenance Actions
rtwo-0.5.25.tar.gz 60.8 kB Without provenance Details for rtwo-0.5.25.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rtwo 0.5.25
File Interpreter ABI Platform Actions
rtwo-0.5.25-py2-none-any.whl Python 2 none any Details for rtwo-0.5.25-py2-none-any.whl

Total release size: 130.9 kB

Release files / rtwo-0.5.25.tar.gz

Download URL rtwo-0.5.25.tar.gz
Size 60.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a9dd1ea8d35a865bc4a93eb5ab43547a48635783bbb1ca91a76d92099c1b3649
BLAKE2b-256 checksum
How to use checksums
50bafc7860ff483d71045ef62781f19e29b4e6b08d1d2c9d2ee0557d27138ad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.15+

Release files / rtwo-0.5.25-py2-none-any.whl

Download URL rtwo-0.5.25-py2-none-any.whl
Size 70.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
0910d6c14e1fc7c3e5a6edd0b9aefc6deb4bd7c3bba83d85b231aa1fcae21994
BLAKE2b-256 checksum
How to use checksums
5adfb37a61a2bfa73d6457fb008d733725129648b02a286c4973f16f08ba2fad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.15+

Security for rtwo 0.5.25

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.25 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page