Skip to main content

UNKNOWN

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'lars@oddbit.com'}>

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.

Source Distribution

opensink-0.3.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file opensink-0.3.tar.gz.

File metadata

  • Download URL: opensink-0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for opensink-0.3.tar.gz
Algorithm Hash digest
SHA256 4e18b6f0d1597bd0818d419ccfab5f1e3fc801fc6179d01f82a232bc2d0f2101
MD5 6ee68718be82cfbf4f7ccf70282ee937
BLAKE2b-256 86dd4f5328a7ad83143d59b5b53de74bc7f03cd582b808e0fcc8dc6fcd6897da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page