A unified interface into multiple cloud providers.
Project description
rtwo 0.5.24
A unified interface into multiple cloud providers.
To install use pip install git+git://git@github.com:iPlantCollaborativeOpenSource/rtwo.git
----
rtwo
====
[![Build Status](https://travis-ci.org/cyverse/rtwo.svg?branch=master)](https://travis-ci.org/cyverse/rtwo)
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 #
```bash
pip install rtwo
```
## Or from source ##
```bash
pip install -e git://github.com/cyverse/rtwo#egg=rtwo
```
# Use #
```python
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
A unified interface into multiple cloud providers.
To install use pip install git+git://git@github.com:iPlantCollaborativeOpenSource/rtwo.git
----
rtwo
====
[![Build Status](https://travis-ci.org/cyverse/rtwo.svg?branch=master)](https://travis-ci.org/cyverse/rtwo)
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 #
```bash
pip install rtwo
```
## Or from source ##
```bash
pip install -e git://github.com/cyverse/rtwo#egg=rtwo
```
# Use #
```python
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
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
rtwo-0.5.24.tar.gz
(61.1 kB
view details)
Built Distribution
rtwo-0.5.24-py2-none-any.whl
(68.7 kB
view details)
File details
Details for the file rtwo-0.5.24.tar.gz
.
File metadata
- Download URL: rtwo-0.5.24.tar.gz
- Upload date:
- Size: 61.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fec1b92790731b9ba0d0348f9afc7a733f9ccea24a6b69f736b4923129f8440 |
|
MD5 | 24c432ffb03b79af10791b906367d1b7 |
|
BLAKE2b-256 | 20be3d69b574a75b53e20637f689cc81307ddd10c1f3cc12488e8b27e017bb6e |
File details
Details for the file rtwo-0.5.24-py2-none-any.whl
.
File metadata
- Download URL: rtwo-0.5.24-py2-none-any.whl
- Upload date:
- Size: 68.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99d6cad255377a43e40566f51ef442b041b97a332d3a78eb9adda2b567e8cef0 |
|
MD5 | c23b3ed56f4676f5b4ce98b74d451250 |
|
BLAKE2b-256 | f6f68cf643ecc4b7410ea19d989955dddb97da5d2be6634d74377c731e5a9130 |