Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Consistency Updates #85

Merged
merged 2 commits into from

2 participants

@sudorandom
Collaborator

Some consistency updates; mostly in CLI doc blocks and some small python formatting issues.

Also removes the sl cci network details and sl cci dns doppleganger stubs to be added back whenever they're actually implemented. See #83 and #84 for those.

@CrackerJackMack CrackerJackMack merged commit 9c115f0 into from
@sudorandom sudorandom deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 5, 2013
  1. @sudorandom

    Consistency Updates

    sudorandom authored
Commits on Apr 6, 2013
  1. @sudorandom

    Documentation Formatting

    sudorandom authored
This page is out of date. Refresh to see the latest.
View
34 SoftLayer/CLI/modules/cci.py
@@ -15,6 +15,9 @@
create-options Output available available options when creating a CCI
reload Reload the OS on a CCI based on its current configuration
ready Check if a CCI has finished provisioning
+
+For several commands, <identifier> will be asked for. This can be the id,
+hostname or the ip address for a CCI.
"""
# :copyright: (c) 2013, SoftLayer Technologies, Inc. All rights reserved.
# :license: BSD, see LICENSE for more details.
@@ -66,7 +69,7 @@ class ListCCIs(CLIRunnable):
--hourly Show hourly instances
--monthly Show monthly instances
-H --hostname=HOST Host portion of the FQDN. example: server
- -D --domain=DOMAIN Domain portion of the FQDN example: example.com
+ -D --domain=DOMAIN Domain portion of the FQDN. example: example.com
-c --cpu=CPU Number of CPU cores
-m --memory=MEMORY Memory in mebibytes (n * 1024)
-d DC, --datacenter=DC datacenter shortname (sng01, dal05, ...)
@@ -126,12 +129,9 @@ class CCIDetails(CLIRunnable):
Get details for a CCI
-Positional Arguments:
- <identifier> This can be the id, hostname or ip address
-
Options:
- --passwords show passwords (check over your shoulder!)
- --price show associated prices
+ --passwords Show passwords (check over your shoulder!)
+ --price Show associated prices
"""
action = 'detail'
@@ -352,15 +352,15 @@ class CreateCCI(CLIRunnable):
Optional:
-d DC, --datacenter=DC datacenter shortname (sng01, dal05, ...)
Note: Omitting this value defaults to the first
- available datacenter
+ available datacenter
-n MBPS, --network=MBPS Network port speed in Mbps
--private Allocate a private CCI
--dry-run, --test Do not create CCI, just get a quote
-u --userdata=DATA User defined metadata string
-F --userfile=FILE Read userdata from file
- --wait=SECONDS Block until CCI is finished provisioning
- for up to X seconds before returning.
+ --wait=SECONDS Block until CCI is finished provisioning for up to X
+ seconds before returning.
"""
action = 'create'
options = ['confirm']
@@ -488,12 +488,9 @@ class ReadyCCI(CLIRunnable):
Check if a CCI is ready.
-Required:
- <identifier> Instance ID
-
Optional:
- --wait=SECONDS Block until CCI is finished provisioning
- for up to X seconds before returning.
+ --wait=SECONDS Block until CCI is finished provisioning for up to X seconds
+ before returning.
"""
action = 'ready'
@@ -632,8 +629,7 @@ def exec_reboot(client, args):
class NetworkCCI(CLIRunnable):
"""
-usage: sl cci network details <identifier> [options]
- sl cci network port <identifier> --speed=SPEED (--public | --private)
+usage: sl cci network port <identifier> --speed=SPEED (--public | --private)
[options]
Manage network settings
@@ -673,13 +669,13 @@ def exec_port(client, args):
@staticmethod
def exec_detail(client, args):
- print "TODO" # TODO this should print out default gateway and stuff
+ # TODO this should print out default gateway and stuff
+ raise CLIAbort('Not implemented')
class CCIDNS(CLIRunnable):
"""
usage: sl cci dns sync <identifier> [options]
- sl cci dns doppleganger <identifier> [options]
DNS related actions for a CCI
@@ -695,8 +691,6 @@ def execute(cls, client, args):
if args['sync']:
return cls.dns_sync(client, args)
- raise CLIAbort('Not implemented')
-
@staticmethod
def dns_sync(client, args):
from SoftLayer.DNS import DNSManager, DNSZoneNotFound
View
1  SoftLayer/CLI/modules/firewall.py
@@ -5,7 +5,6 @@
The available commands are:
list List active vlans with firewalls
-
"""
# :copyright: (c) 2013, SoftLayer Technologies, Inc. All rights reserved.
# :license: BSD, see LICENSE for more details.
View
15 SoftLayer/CLI/modules/iscsi.py
@@ -18,8 +18,6 @@ class ListISCSI(CLIRunnable):
usage: sl iscsi list [options]
List iSCSI accounts
-
-Options:
"""
action = 'list'
@@ -31,14 +29,21 @@ def execute(client, args):
mask='eventCount,serviceResource[datacenter.name]')
iscsi = [NestedDict(n) for n in iscsi]
- t = Table(['id', 'datacenter', 'size', 'username',
- 'password', 'server'])
+ t = Table([
+ 'id',
+ 'datacenter',
+ 'size',
+ 'username',
+ 'password',
+ 'server'
+ ])
for n in iscsi:
t.add_row([
n['id'],
n['serviceResource']['datacenter'].get('name', blank()),
- FormattedItem(n.get('capacityGb', blank()),
+ FormattedItem(
+ n.get('capacityGb', blank()),
"%dGB" % n.get('capacityGb', 0)),
n.get('username', blank()),
n.get('password', blank()),
View
18 docs/api/managers.rst
@@ -0,0 +1,18 @@
+.. _managers:
+
+Managers
+--------
+::
+
+ >>> from SoftLayer.CCI import CCIManager
+ >>> cci = CCIManager(client)
+ >>> cci.list_instances()
+ [...]
+
+Managers mask out a lot of the complexities of using the API into classes that provide a simpler interface to various services.
+
+.. toctree::
+ :maxdepth: 1
+ :glob:
+
+ managers/*
View
35 docs/index.rst
@@ -1,10 +1,18 @@
.. SoftLayer API Python Client documentation
-SoftLayer API Python Client
-===========================
+SoftLayer API Python Client |version|
+========================================
This is the documentation to SoftLayer's Python API Bindings. These bindings use SoftLayer's `XML-RPC interface <http://sldn.softlayer.com/article/XML-RPC>`_ in order to manage SoftLayer services.
-Release v\ |version|. (:ref:`Installation <install>`)
+.. toctree::
+ :maxdepth: 2
+
+ install
+ SoftLayer API Documentation <http://sldn.softlayer.com/reference/softlayerapi>
+ Source on Github <https://github.com/softlayer/softlayer-api-python-client>
+ SoftLayer Developer Network <http://sldn.softlayer.com/>
+ Twitter <https://twitter.com/SoftLayerDevs>
+
API Documentation
-----------------
@@ -19,26 +27,8 @@ API Documentation
.. toctree::
:maxdepth: 2
- install
api/client
-
-
-Managers
---------
-::
-
- >>> from SoftLayer.CCI import CCIManager
- >>> cci = CCIManager(client)
- >>> cci.list_instances()
- [...]
-
-Managers mask out a lot of the complexities of using the API into classes that provide a simpler interface to various services.
-
-.. toctree::
- :maxdepth: 1
- :glob:
-
- api/managers/*
+ api/managers
Command-Line Interface
@@ -58,6 +48,7 @@ Command-Line Interface
cli
cli/dev
+
Indices and tables
==================
View
9 docs/install.rst
@@ -2,6 +2,10 @@
Installation
============
+
+Using Pip
+---------
+
Install via pip: ::
$ pip install softlayer
@@ -13,9 +17,8 @@ Install from source gia pip (requires git): ::
The most up to date version of this library can be found on the SoftLayer GitHub public repositories: http://github.com/softlayer. Please post to the SoftLayer forums http://forums.softlayer.com/ or open a support ticket in the SoftLayer customer portal if you have any questions regarding use of this library.
-
-Get the Code
-------------
+From Source
+-----------
The project is developed on GitHub, at `github.com/softlayer/softlayer-api-python-client <https://github.com/softlayer/softlayer-api-python-client>`_.
Something went wrong with that request. Please try again.