Skip to content

Commit 53c17e1

Browse files
#627 autoscale feature documentation
1 parent 645df87 commit 53c17e1

File tree

3 files changed

+60
-13
lines changed

3 files changed

+60
-13
lines changed

SoftLayer/managers/autoscale.py

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
SoftLayer.autoscale
3-
~~~~~~~~~~~~
3+
~~~~~~~~~~~~~~~~~~~
44
Autoscale manager
55
66
:license: MIT, see LICENSE for more details.
@@ -14,22 +14,26 @@ def __init__(self, client):
1414
self.client = client
1515

1616
def list(self, mask=None):
17-
"""Calls SoftLayer_Account getScaleGroups()_
17+
"""Calls `SoftLayer_Account::getScaleGroups()`_
1818
1919
:param mask: optional SoftLayer_Scale_Group objectMask
20-
.. getScaleGroups(): https://sldn.softlayer.com/reference/services/SoftLayer_Account/getScaleGroups/
20+
21+
.. _SoftLayer_Account::getScaleGroups():
22+
https://sldn.softlayer.com/reference/services/SoftLayer_Account/getScaleGroups/
2123
"""
2224
if not mask:
2325
mask = "mask[status,virtualGuestMemberCount]"
2426

2527
return self.client.call('SoftLayer_Account', 'getScaleGroups', mask=mask, iter=True)
2628

2729
def details(self, identifier, mask=None):
28-
"""Calls SoftLayer_Scale_Group getObject()_
30+
"""Calls `SoftLayer_Scale_Group::getObject()`_
2931
3032
:param identifier: SoftLayer_Scale_Group id
3133
:param mask: optional SoftLayer_Scale_Group objectMask
32-
.. _getObject(): https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/getObject/
34+
35+
.. _SoftLayer_Scale_Group::getObject():
36+
https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/getObject/
3337
"""
3438
if not mask:
3539
mask = """mask[virtualGuestMembers[id,virtualGuest[hostname,domain,provisionDate]], terminationPolicy,
@@ -40,11 +44,13 @@ def details(self, identifier, mask=None):
4044
return self.client.call('SoftLayer_Scale_Group', 'getObject', id=identifier, mask=mask)
4145

4246
def get_policy(self, identifier, mask=None):
43-
"""Calls SoftLayer_Scale_Policy getObject()_
47+
"""Calls `SoftLayer_Scale_Policy::getObject()`_
4448
4549
:param identifier: SoftLayer_Scale_Policy id
4650
:param mask: optional SoftLayer_Scale_Policy objectMask
47-
.. _getObject(): https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Policy/getObject/
51+
52+
.. _SoftLayer_Scale_Policy::getObject():
53+
https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Policy/getObject/
4854
"""
4955
if not mask:
5056
mask = """mask[cooldown, createDate, id, name, actions, triggers[type]
@@ -54,31 +60,36 @@ def get_policy(self, identifier, mask=None):
5460
return self.client.call('SoftLayer_Scale_Policy', 'getObject', id=identifier, mask=mask)
5561

5662
def scale(self, identifier, amount):
57-
"""Calls SoftLayer_Scale_Group scale()_
63+
"""Calls `SoftLayer_Scale_Group::scale()`_
5864
5965
:param identifier: SoftLayer_Scale_Group Id
6066
:param amount: positive or negative number to scale the group by
6167
62-
.. _scale(): https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/scale/
68+
.. _SoftLayer_Scale_Group::scale():
69+
https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/scale/
6370
"""
6471
return self.client.call('SoftLayer_Scale_Group', 'scale', amount, id=identifier)
6572

6673
def scale_to(self, identifier, amount):
67-
"""Calls SoftLayer_Scale_Group scaleTo()_
74+
"""Calls `SoftLayer_Scale_Group::scaleTo()`_
6875
6976
:param identifier: SoftLayer_Scale_Group Id
7077
:param amount: number to scale the group to.
71-
.. _scaleTo(): https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/scaleTo/
78+
79+
.. _SoftLayer_Scale_Group::scaleTo():
80+
https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/scaleTo/
7281
"""
7382
return self.client.call('SoftLayer_Scale_Group', 'scaleTo', amount, id=identifier)
7483

7584
def get_logs(self, identifier, mask=None, object_filter=None):
76-
"""Calls SoftLayer_Scale_Group getLogs()_
85+
"""Calls `SoftLayer_Scale_Group::getLogs()`_
7786
7887
:param identifier: SoftLayer_Scale_Group Id
7988
:param mask: optional SoftLayer_Scale_Group_Log objectMask
8089
:param object_filter: optional SoftLayer_Scale_Group_Log objectFilter
81-
.. getLogs(): https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/getLogs/
90+
91+
.. _SoftLayer_Scale_Group::getLogs():
92+
https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/getLogs/
8293
"""
8394
return self.client.call('SoftLayer_Scale_Group', 'getLogs', id=identifier, mask=mask, filter=object_filter,
8495
iter=True)

docs/api/managers/autoscale.rst

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

docs/cli/autoscale.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. _cli_autoscale:
2+
3+
Autoscale Commands
4+
==================
5+
These commands were added in version `5.8.1 <https://github.com/softlayer/softlayer-python/releases/tag/v5.8.1>`_
6+
7+
For making changes to the triggers or the autoscale group itself, see the `Autoscale Portal`_
8+
9+
- `Autoscale Product <https://www.ibm.com/cloud/auto-scaling>`_
10+
- `Autoscale Documentation <https://cloud.ibm.com/docs/vsi?topic=virtual-servers-about-auto-scale>`_
11+
- `Autoscale Portal`_
12+
13+
.. click:: SoftLayer.CLI.autoscale.list:cli
14+
:prog: autoscale list
15+
:show-nested:
16+
17+
.. click:: SoftLayer.CLI.autoscale.detail:cli
18+
:prog: autoscale detail
19+
:show-nested:
20+
21+
.. click:: SoftLayer.CLI.autoscale.scale:cli
22+
:prog: autoscale scale
23+
:show-nested:
24+
25+
.. click:: SoftLayer.CLI.autoscale.logs:cli
26+
:prog: autoscale logs
27+
:show-nested:
28+
29+
30+
31+
.. _Autoscale Portal: https://cloud.ibm.com/classic/autoscale

0 commit comments

Comments
 (0)