Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.19 KB

index.rst

File metadata and controls

50 lines (37 loc) · 1.19 KB

Cloudforms API v2 Python Client's documentation!

This is the documentation for the community-supported Red Hat Cloudforms (ManageIQ) API v2 Python client.

Contents:

api/*

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')
    )

External Links