Skip to content

Commit ba2ad90

Browse files
#1068 doc updates
1 parent 7506faf commit ba2ad90

File tree

6 files changed

+30
-21
lines changed

6 files changed

+30
-21
lines changed

SoftLayer/CLI/hardware/edit.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,20 @@
1212
@click.command()
1313
@click.argument('identifier')
1414
@click.option('--domain', '-D', help="Domain portion of the FQDN")
15-
@click.option('--userfile', '-F',
16-
help="Read userdata from file",
17-
type=click.Path(exists=True, readable=True, resolve_path=True))
18-
@click.option('--tag', '-g',
19-
multiple=True,
15+
@click.option('--userfile', '-F', type=click.Path(exists=True, readable=True, resolve_path=True,
16+
help="Read userdata from file"))
17+
@click.option('--tag', '-g', multiple=True,
2018
help="Tags to set or empty string to remove all")
2119
@click.option('--hostname', '-H', help="Host portion of the FQDN")
2220
@click.option('--userdata', '-u', help="User defined metadata string")
23-
@click.option('--public-speed',
24-
help="Public port speed.",
25-
default=None,
26-
type=click.Choice(['0', '10', '100', '1000', '10000']))
27-
@click.option('--private-speed',
28-
help="Private port speed.",
29-
default=None,
30-
type=click.Choice(['0', '10', '100', '1000', '10000']))
21+
@click.option('--public-speed', default=None,
22+
type=click.Choice(['0', '10', '100', '1000', '10000', '-1']
23+
help="Public port speed. -1 is best speed available"))
24+
@click.option('--private-speed', default=None,
25+
type=click.Choice(['0', '10', '100', '1000', '10000', '-1']
26+
help="Private port speed. -1 is best speed available"))
3127
@environment.pass_env
32-
def cli(env, identifier, domain, userfile, tag, hostname, userdata,
33-
public_speed, private_speed):
28+
def cli(env, identifier, domain, userfile, tag, hostname, userdata, public_speed, private_speed):
3429
"""Edit hardware details."""
3530

3631
if userdata and userfile:

SoftLayer/managers/vs_placement.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ def list(self, mask=None):
5050
def create(self, placement_object):
5151
"""Creates a placement group
5252
53-
:param dictionary placement_object: Below are the fields you can specify, taken from
54-
https://softlayer.github.io/reference/datatypes/SoftLayer_Virtual_PlacementGroup/
53+
A placement_object is defined as::
54+
5555
placement_object = {
5656
'backendRouterId': 12345,
5757
'name': 'Test Name',
5858
'ruleId': 12345
5959
}
60+
61+
- https://softlayer.github.io/reference/datatypes/SoftLayer_Virtual_PlacementGroup/
62+
63+
:param dictionary placement_object:
6064
6165
"""
6266
return self.client.call('SoftLayer_Virtual_PlacementGroup', 'createObject', placement_object)

docs/api/managers/vs_placement.rst

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

docs/cli.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ functionality not fully documented here.
1414

1515
cli/ipsec
1616
cli/vs
17+
cli/hardware
1718
cli/ordering
1819
cli/users
1920

@@ -34,7 +35,7 @@ To update the configuration, you can use `slcli setup`.
3435
:..............:..................................................................:
3536
: Username : username :
3637
: API Key : oyVmeipYQCNrjVS4rF9bHWV7D75S6pa1fghFl384v7mwRCbHTfuJ8qRORIqoVnha :
37-
: Endpoint URL : https://api.softlayer.com/xmlrpc/v3/ :
38+
: Endpoint URL : https://api.softlayer.com/xmlrpc/v3.1/ :
3839
:..............:..................................................................:
3940
Are you sure you want to write settings to "/home/me/.softlayer"? [y/N]: y
4041

@@ -47,7 +48,7 @@ To check the configuration, you can use `slcli config show`.
4748
:..............:..................................................................:
4849
: Username : username :
4950
: API Key : oyVmeipYQCNrjVS4rF9bHWV7D75S6pa1fghFl384v7mwRCbHTfuJ8qRORIqoVnha :
50-
: Endpoint URL : https://api.softlayer.com/xmlrpc/v3/ :
51+
: Endpoint URL : https://api.softlayer.com/xmlrpc/v3.1/ :
5152
:..............:..................................................................:
5253

5354

docs/cli/hardware.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.. click:: SoftLayer.CLI.hardware.list:cli
2+
:prog: slcli hw list
3+
:show-nested:

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3131
extensions = ['sphinx.ext.autodoc',
3232
'sphinx.ext.coverage',
33-
'sphinx.ext.viewcode']
33+
'sphinx.ext.viewcode',
34+
'sphinx_click.ext']
3435

3536
# Add any paths that contain templates here, relative to this directory.
3637
templates_path = ['_templates']
@@ -48,7 +49,7 @@
4849
project = u'SoftLayer API Python Client'
4950
# Hack to avoid the "Redefining built-in 'copyright'" error from static
5051
# analysis tools
51-
globals()['copyright'] = u'2017, SoftLayer Technologies, Inc.'
52+
globals()['copyright'] = u'2019, SoftLayer Technologies, Inc.'
5253

5354
# The version info for the project you're documenting, acts as replacement for
5455
# |version| and |release|, also used in various other places throughout the

0 commit comments

Comments
 (0)