Skip to main content


Project description

# OpenSink: All the OpenStack APIs in one place

Do you sometimes need to write scripts that interact with the OpenStack API? Do you always find yourself spending more time trying to remember how to get a valid Nova client than actually writing your scripts?

This is for you.

## Usage

Assuming that you have the standard suite of OS_* environment variable available, then using opensink is as simple as:

>>> import opensink.openstack
>>> clients = opensink.openstack.OpenStack()

Need a list of users?

>>> c.keystone.users.find(name='lars')
<User {u'username': u'lars', u'name': u'lars', u'enabled': True,
u'tenantId': u'f4e7e158cb154de5ab503bd7096b8981', u'id':
u'065e9427a1f14f9398082e5bed3d3fb7', u'email': u''}>

Or a list of servers?

>>> clients.nova.servers.list()
[<Server: larstest-server-23dwogjbq3ux>, <Server: cirros>]

Want to create a Cinder volume?

>>> clients.cinder.volumes.create(1)
<Volume: e61ffb18-7d97-4dde-ba70-b256df7b709f>

How about a list of resources in your heat stack?

>>> [ r.to_dict()['resource_name']
... for r in clients.heat.resources.list(id)]
[u'server_floating', u'secgroup_all_open', u'server_eth0', u'server']

Project details

Download files

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

Files for opensink, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size opensink-0.3.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page