Skip to content

Commit a79cc7c

Browse files
Merge pull request #1960 from allmightyspiff/issues1959
Updated readthedocs documentation
2 parents 141a331 + bc99210 commit a79cc7c

File tree

13 files changed

+836
-105
lines changed

13 files changed

+836
-105
lines changed

SoftLayer/CLI/search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def cli(env, query, types, advanced):
3030
3131
Read More: https://sldn.softlayer.com/reference/services/SoftLayer_Search/search/
3232
Examples:
33+
3334
slcli search test.com
3435
slcli search _objectType:SoftLayer_Virtual_Guest test.com
3536
slcli -vvv search _objectType:SoftLayer_Hardware hostname:testibm --advanced

SoftLayer/managers/search.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""
22
SoftLayer.search
3-
~~~~~~~~~~~~~~~~~~
3+
~~~~~~~~~~~~~~~~
44
Search Manager
55
66
:license: MIT, see LICENSE for more details.
77
"""
88

99

1010
class SearchManager(object):
11-
"""Manager to help searcha via the SoftLayer API.
11+
"""Manager to help search via the SoftLayer API.
1212
1313
:param SoftLayer.API.BaseClient client: the client instance
1414
"""
@@ -18,27 +18,21 @@ def __init__(self, client):
1818
self.search_manager = client['SoftLayer_Search']
1919

2020
def get_object_types(self):
21-
"""returns a collection of SoftLayer_Container_Search_ObjectType containers.
22-
23-
"""
21+
"""returns a collection of SoftLayer_Container_Search_ObjectType containers."""
2422
return self.search_manager.getObjectTypes()
2523

2624
def search(self, search_string):
27-
"""allows for searching for SoftLayer resources by simple phrase.
28-
29-
"""
25+
"""allows for searching for SoftLayer resources by simple phrase."""
3026
return self.search_manager.search(search_string)
3127

3228
def advanced(self, search_string):
33-
"""allows for searching for SoftLayer resources by simple phrase.
34-
35-
"""
29+
"""Uses the SoftLayer_Search::advancedSearch API. Allows for more complicated search phrases."""
3630
return self.search_manager.advancedSearch(search_string)
3731

3832
def search_instances(self, search_string, mask=None, **kwargs):
3933
"""Lists VSIs based in the search_string.
4034
41-
Also takes in a few search terms as **kwargs. such as hostname, datacenter, domain and tags
35+
Also takes in a few search terms as \\*\\*kwargs. such as hostname, datacenter, domain and tags
4236
"""
4337

4438
# This forces the Search API to do a fuzzy search on our term, kinda. Not sure why the ** are
@@ -65,8 +59,8 @@ def search_instances(self, search_string, mask=None, **kwargs):
6559
def search_hadrware_instances(self, search_string, mask=None, **kwargs):
6660
"""Lists hardwares based in the search_string.
6761
68-
Also takes in a few search terms as **kwargs. such as hostname, datacenter, domain and tags
69-
"""
62+
Also takes in a few search terms as \\*\\*kwargs. such as hostname, datacenter, domain and tags
63+
"""
7064

7165
# This forces the Search API to do a fuzzy search on our term, kinda. Not sure why the ** are
7266
# Required but it will do an exact search without them.

SoftLayer/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
~~~~~~~~~~~~~~~
44
Utility function/classes.
55
6-
:license: MIT, see LICENSE for more details.
76
"""
7+
88
import collections
99
import datetime
1010
from json import JSONDecoder
@@ -247,7 +247,6 @@ class IdentifierMixin(object):
247247
248248
This mixin provides an interface to provide multiple methods for
249249
converting an 'indentifier' to an id
250-
251250
"""
252251
resolvers = []
253252

@@ -375,7 +374,7 @@ def verify_date(date):
375374
"""Verify if the date format is correct
376375
377376
:param string date: A date in format string
378-
:return a exception if the date is not the correct format
377+
:return Exception: a exception if the date is not the correct format
379378
"""
380379
try:
381380
date = datetime.datetime.strptime(date, '%m/%d/%Y')

docs/api/managers/autoscale.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/api/managers/search.rst

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

docs/cli/commands.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Can be called with an un-authenticated API call.
3636
:prog: metadata
3737
:show-nested:
3838

39-
search
40-
========
39+
Search
40+
======
4141

4242
Is an API service that lets you make complex queries about data indexed by the service.
4343
Can be called with an un-authenticated API call.

docs/cli/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _cli_security:
22

33
SSH Keys and SSL Certificates
4-
========
4+
=============================
55

66
.. click:: SoftLayer.CLI.security.sshkey_add:cli
77
:prog: security sshkey-add

docs/cli/sshkey.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/cli/ssl.rst

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/cli/vs.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,11 @@ If no timezone is specified, IMS local time (CST) will be assumed, which might n
291291
:prog: virtual notification-delete
292292
:show-nested:
293293

294-
.. click:: SoftLayer.CLI.virt.host_list:cli
295-
This command is an alias for `slcli dedicatedhost list`
296-
:prog: virtual host-list
297-
:show-nested:
294+
.. click:: SoftLayer.CLI.dedicatedhost.list:cli
295+
:prog: virtual host-list
296+
:show-nested:
298297

299-
.. click:: SoftLayer.CLI.virt.create:cli
300-
This command is an alias for `slcli dedicatedhost create`
298+
.. click:: SoftLayer.CLI.dedicatedhost.create:cli
301299
:prog: virtual host-create
302300

303301
.. click:: SoftLayer.CLI.virt.os_available:cli

0 commit comments

Comments
 (0)