Skip to content

Commit 082c1ea

Browse files
more docs
1 parent b2e6784 commit 082c1ea

File tree

3 files changed

+31
-17
lines changed

3 files changed

+31
-17
lines changed

SoftLayer/managers/vs_capacity.py

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@
2020

2121

2222
class 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]]]"

docs/api/managers/vs_capacity.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. _vs_capacity:
2+
3+
.. automodule:: SoftLayer.managers.vs_capacity
4+
:members:
5+
:inherited-members:

docs/cli/vs/reserved_capacity.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ The SLCLI supports some basic Reserved Capacity Features.
1515

1616
vs capacity create
1717
------------------
18-
This command will create a Reserved Capacity Group. **These groups can not be canceled until their contract expires in 1 or 3 years!**
18+
This command will create a Reserved Capacity Group.
19+
20+
.. warning::
21+
22+
**These groups can not be canceled until their contract expires in 1 or 3 years!**
1923

2024
::
2125

0 commit comments

Comments
 (0)