2020
2121
2222class CapacityManager (utils .IdentifierMixin , object ):
23- """Manages SoftLayer Dedicated Hosts .
23+ """Manages SoftLayer Reserved Capacity Groups .
2424
25- See product information here https://www.ibm.com/cloud/dedicated
25+ Product Information
26+
27+ - https://console.bluemix.net/docs/vsi/vsi_about_reserved.html
28+ - https://softlayer.github.io/reference/services/SoftLayer_Virtual_ReservedCapacityGroup/
29+ - https://softlayer.github.io/reference/services/SoftLayer_Virtual_ReservedCapacityGroup_Instance/
2630
2731
2832 :param SoftLayer.API.BaseClient client: the client instance
@@ -50,7 +54,7 @@ def get_object(self, identifier, mask=None):
5054 """Get a Reserved Capacity Group
5155
5256 :param int identifier: Id of the SoftLayer_Virtual_ReservedCapacityGroup
53- :parm string mask: override default object Mask
57+ :param string mask: override default object Mask
5458 """
5559 if mask is None :
5660 mask = "mask[instances[billingItem[item[keyName],category], guest], backendRouter[datacenter]]"
@@ -96,12 +100,12 @@ def get_available_routers(self, dc=None):
96100 def create (self , name , datacenter , backend_router_id , capacity , quantity , test = False ):
97101 """Orders a Virtual_ReservedCapacityGroup
98102
99- :params string name: Name for the new reserved capacity
100- :params string datacenter: like 'dal13'
101- :params int backend_router_id: This selects the pod. See create_options for a list
102- :params string capacity: Capacity KeyName, see create_options for a list
103- :params int quantity: Number of guest this capacity can support
104- :params bool test: If True, don't actually order, just test.
103+ :param string name: Name for the new reserved capacity
104+ :param string datacenter: like 'dal13'
105+ :param int backend_router_id: This selects the pod. See create_options for a list
106+ :param string capacity: Capacity KeyName, see create_options for a list
107+ :param int quantity: Number of guest this capacity can support
108+ :param bool test: If True, don't actually order, just test.
105109 """
106110 args = (self .capacity_package , datacenter , [capacity ])
107111 extras = {"backendRouterId" : backend_router_id , "name" : name }
@@ -120,15 +124,16 @@ def create(self, name, datacenter, backend_router_id, capacity, quantity, test=F
120124 def create_guest (self , capacity_id , test , guest_object ):
121125 """Turns an empty Reserve Capacity into a real Virtual Guest
122126
123- :params int capacity_id: ID of the RESERVED_CAPACITY_GROUP to create this guest into
124- :params bool test: True will use verifyOrder, False will use placeOrder
125- :params dictionary guest_object: Below is the minimum info you need to send in
127+ :param int capacity_id: ID of the RESERVED_CAPACITY_GROUP to create this guest into
128+ :param bool test: True will use verifyOrder, False will use placeOrder
129+ :param dictionary guest_object: Below is the minimum info you need to send in
126130 guest_object = {
127- 'domain': 'test.com',
128- 'hostname': 'A1538172419',
129- 'os_code': 'UBUNTU_LATEST_64',
130- 'primary_disk': '25',
131+ 'domain': 'test.com',
132+ 'hostname': 'A1538172419',
133+ 'os_code': 'UBUNTU_LATEST_64',
134+ 'primary_disk': '25',
131135 }
136+
132137 """
133138 vs_manager = VSManager (self .client )
134139 mask = "mask[instances[id, billingItem[id, item[id,keyName]]], backendRouter[id, datacenter[name]]]"
0 commit comments