| |
- __builtin__.object
-
- Queue
- Request
- Requests
class Queue(__builtin__.object) |
| |
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Request(__builtin__.object) |
| |
Methods defined here:
- Server(self)
- Return server associated with this request.
>>> d = clc.v2.Datacenter()
>>> q = clc.v2.Server.Create(name="api2",cpu=1,memory=1,group_id=d.Groups().Get("Default Group").id,template=d.Templates().Search("centos-6-64")[0].id,network_id=d.Networks().networks[0].id,ttl=4000)
>>> q.WaitUntilComplete()
0
>>> q.success_requests[0].Server()
<clc.APIv2.server.Server object at 0x1095a8390>
>>> print _
VA1BTDIAPI214
- Status(self, cached=False)
- WaitUntilComplete(self, poll_freq=2)
- Poll until status is completed.
If status is 'notStarted' or 'executing' continue polling.
If status is 'succeeded' return
Else raise exception
poll_freq option is in seconds
- __getattr__(self, var)
- __init__(self, id, alias=None, request_obj=None)
- Create Request object.
https://t3n.zendesk.com/entries/43699144-Get-Status
- __str__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Requests(__builtin__.object) |
| |
Methods defined here:
- WaitUntilComplete(self, poll_freq=2)
- Poll until all request objects have completed.
If status is 'notStarted' or 'executing' continue polling.
If status is 'succeeded' then success
Else log as error
poll_freq option is in seconds
Returns an Int the number of unsuccessful requests. This behavior is subject to change.
>>> clc.v2.Server(alias='BTDI',id='WA1BTDIKRT02').PowerOn().WaitUntilComplete()
0
- __add__(self, obj)
- __init__(self, requests_lst, alias=None)
- Create Requests object.
Treats one or more requests as an atomic unit.
e.g. if performing a simulated group operation then succeed
or fail as a group
- __radd__(self, obj)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |