| |
- __builtin__.object
-
- Group
- Groups
class Group(__builtin__.object) |
| |
Methods defined here:
- Account(self)
- Return account object.
>>> clc.v2.Group(alias="BTDI",id="wa1-837").Account()
<clc.APIv2.account.Account instance at 0x108789878>
>>> print _
BTDI
- Archive(self)
- Create(self, name, description=None)
- Creates a new group
>>> clc.v2.Datacenter(location="WA1").RootGroup().Create("Test3","Description3")
<clc.APIv2.group.Group object at 0x10cc76c90>
>>> print _
Test5
- Defaults(self, key)
- Returns default configurations for resources deployed to this group.
If specified key is not defined returns None.
# {"cpu":{"inherited":false},"memoryGB":{"inherited":false},"networkId":{"inherited":false},
# "primaryDns":{"value":"172.17.1.26","inherited":true},"secondaryDns":{"value":"172.17.1.27","inherited":true},
# "templateName":{"value":"WIN2012DTC-64","inherited":false}}
- Delete(self)
- Delete group.
>>> clc.v2.Group("wa1-4416").Create(name="Test6")
<clc.APIv2.group.Group object at 0x1041937d0>
>>> clc.v2.Group(_.id).Delete().WaitUntilComplete()
0
- Pause(self)
- PowerOff(self)
- PowerOn(self)
- Reboot(self)
- Refresh(self)
- Reloads the group object to synchronize with cloud representation.
>>> clc.v2.Group("wa-1234").Refresh()
- Reset(self)
- Servers(self)
- Returns a Servers object containing all servers within the group.
>>> clc.v2.Group("wa1-4416").Servers()
<clc.APIv2.server.Servers object at 0x1065b0f10>
- ShutDown(self)
- StartMaintenance(self)
- StopMaintenance(self)
- Subgroups(self)
- Returns a Groups object containing all child groups.
>>> clc.v2.Group("wa1-4416").Subgroups()
<clc.APIv2.group.Groups object at 0x105fa27d0>
- Update(self)
- Update group
*TODO* API not yet documented
- __getattr__(self, var)
- __init__(self, id, alias=None, group_obj=None)
- Create Group object.
If parameters are populated then create object location.
Else if only id is supplied issue a Get Policy call
>>> clc.v2.Group(id="wa1-1798")
<clc.APIv2.group.Group object at 0x109188b90>
- __str__(self)
Static methods defined here:
- GetAll(root_group_id, alias=None)
- Gets a list of groups within a given account.
>>> clc.v2.Group.GetAll("wa1-4416")
[<clc.APIv2.group.Group object at 0x1065b0190>, <clc.APIv2.group.Group object at 0x1065b0dd0>]
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Groups(__builtin__.object) |
| |
Methods defined here:
- Get(self, key)
- Get group by providing name, ID, description or other unique key.
If key is not unique and finds multiple matches only the first
will be returned
>>> clc.v2.Datacenter().Groups().Get("Default Group")
<clc.APIv2.group.Group object at 0x1065e5250>
- Search(self, key)
- Search group list by providing partial name, ID, description or other key.
>>> clc.v2.Datacenter().Groups().Search("Default Group")
[<clc.APIv2.group.Group object at 0x1065b0f50>, <clc.APIv2.group.Group object at 0x1065b0d10>]
- __init__(self, groups_lst, alias=None)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |