Skip to content

Commit a279a8a

Browse files
updating travis environments
1 parent 3dcea7e commit a279a8a

File tree

3 files changed

+93
-3
lines changed

3 files changed

+93
-3
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ matrix:
66
env: TOX_ENV=py35
77
- python: "3.6"
88
env: TOX_ENV=py36
9-
- python: "pypy3.7"
10-
env: TOX_ENV=pypy
119
- python: "3.7"
10+
env: TOX_ENV=py37
11+
- python: "pypy3.6"
12+
env: TOX_ENV=pypy
13+
- python: "3.6"
1214
env: TOX_ENV=analysis
13-
- python: "3.7"
15+
- python: "3.6"
1416
env: TOX_ENV=coverage
1517
install:
1618
- pip install tox

docs/cli.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,74 @@ Most commands will take in additional options/arguments. To see all available ac
176176
separated tags
177177
--help Show this message and exit.
178178

179+
180+
181+
Debugging
182+
=========
183+
To see exactly what API call is being made by the SLCLI, you can use the verbose option.
184+
185+
A single `-v` will show a simple version of the API call, along with some statistics
186+
187+
::
188+
189+
slcli -v vs detail 74397127
190+
Calling: SoftLayer_Virtual_Guest::getObject(id=74397127, mask='id,globalIdentifier,fullyQualifiedDomainName,hostname,domain', filter='None', args=(), limit=None, offset=None))
191+
Calling: SoftLayer_Virtual_Guest::getReverseDomainRecords(id=77460683, mask='', filter='None', args=(), limit=None, offset=None))
192+
:..................:..............................................................:
193+
: name : value :
194+
:..................:..............................................................:
195+
: execution_time : 2.020334s :
196+
: api_calls : SoftLayer_Virtual_Guest::getObject (1.515583s) :
197+
: : SoftLayer_Virtual_Guest::getReverseDomainRecords (0.494480s) :
198+
: version : softlayer-python/v5.7.2 :
199+
: python_version : 3.7.3 (default, Mar 27 2019, 09:23:15) :
200+
: : [Clang 10.0.1 (clang-1001.0.46.3)] :
201+
: library_location : /Users/chris/Code/py3/lib/python3.7/site-packages/SoftLayer :
202+
:..................:..............................................................:
203+
204+
205+
Using `-vv` will print out some API call details in the summary as well.
206+
207+
::
208+
209+
slcli -vv account summary
210+
Calling: SoftLayer_Account::getObject(id=None, mask='mask[ nextInvoiceTotalAmount, pendingInvoice[invoiceTotalAmount], blockDeviceTemplateGroupCount, dedicatedHostCount, domainCount, hardwareCount, networkStorageCount, openTicketCount, networkVlanCount, subnetCount, userCount, virtualGuestCount ]', filter='None', args=(), limit=None, offset=None))
211+
:..................:.............................................................:
212+
: name : value :
213+
:..................:.............................................................:
214+
: execution_time : 0.921271s :
215+
: api_calls : SoftLayer_Account::getObject (0.911208s) :
216+
: version : softlayer-python/v5.7.2 :
217+
: python_version : 3.7.3 (default, Mar 27 2019, 09:23:15) :
218+
: : [Clang 10.0.1 (clang-1001.0.46.3)] :
219+
: library_location : /Users/chris/Code/py3/lib/python3.7/site-packages/SoftLayer :
220+
:..................:.............................................................:
221+
:........:.................................................:
222+
: : SoftLayer_Account::getObject :
223+
:........:.................................................:
224+
: id : None :
225+
: mask : mask[ :
226+
: : nextInvoiceTotalAmount, :
227+
: : pendingInvoice[invoiceTotalAmount], :
228+
: : blockDeviceTemplateGroupCount, :
229+
: : dedicatedHostCount, :
230+
: : domainCount, :
231+
: : hardwareCount, :
232+
: : networkStorageCount, :
233+
: : openTicketCount, :
234+
: : networkVlanCount, :
235+
: : subnetCount, :
236+
: : userCount, :
237+
: : virtualGuestCount :
238+
: : ] :
239+
: filter : None :
240+
: limit : None :
241+
: offset : None :
242+
:........:.................................................:
243+
244+
Using `-vvv` will print out the exact API that can be used without the softlayer-python framework, A simple python code snippet for XML-RPC, a curl call for REST API calls. This is dependant on the endpoint you are using in the config file.
245+
246+
::
247+
248+
slcli -vvv account summary
249+
curl -u $SL_USER:$SL_APIKEY -X GET -H "Accept: */*" -H "Accept-Encoding: gzip, deflate, compress" 'https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getObject.json?objectMask=mask%5B%0A++++++++++++nextInvoiceTotalAmount%2C%0A++++++++++++pendingInvoice%5BinvoiceTotalAmount%5D%2C%0A++++++++++++blockDeviceTemplateGroupCount%2C%0A++++++++++++dedicatedHostCount%2C%0A++++++++++++domainCount%2C%0A++++++++++++hardwareCount%2C%0A++++++++++++networkStorageCount%2C%0A++++++++++++openTicketCount%2C%0A++++++++++++networkVlanCount%2C%0A++++++++++++subnetCount%2C%0A++++++++++++userCount%2C%0A++++++++++++virtualGuestCount%0A++++++++++++%5D'

docs/cli/reports.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _cli_reports:
2+
3+
Reports
4+
=======
5+
6+
There are a few report type commands in the SLCLI.
7+
8+
.. click:: SoftLayer.CLI.summary:cli
9+
:prog: summary
10+
:show-nested:
11+
12+
A list of datacenters, and how many servers, VSI, vlans, subnets and public_ips are in each.
13+
14+
15+
.. click:: SoftLayer.CLI.report.bandwidth:cli
16+
:prog: report bandwidth
17+
:show-nested:

0 commit comments

Comments
 (0)