@@ -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'
0 commit comments