Cloudforms API v2 Python Client’s documentation!¶
This is the documentation for the community-supported Red Hat Cloudforms (ManageIQ) API v2 Python client.
Contents:
Examples¶
List all virtual servers for the account:
from Cloudforms import (
Client,
VSManager
)
client = Client(
username='admin',
password='smartvm',
host='127.0.0.1'
)
vs_mgr = VSManager(client)
instances = vs_mgr.list()
for instance in instances:
print 'Server #%s: %s (%s)' % (
instance.get('id'),
instance.get('name'),
instance.get('raw_power_state')
)