summaryrefslogtreecommitdiff
path: root/ceilometerclient/shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Set auth_plugin in __init__Chris Dent2015-04-161-1/+3
| | | | | | | | This avoids auth_plugin being undefined when calling self.get_base_parser without self.main having been called. Closes-Bug: #1434264 Change-Id: Ic3a898ccecb865ff4e88d82538bcb04001d623db
* Fix improper parameter setup for cacert and client certsSrinivas Sakhamuri2015-01-151-1/+1
| | | | | | | | | | | | | The client passes cacert incorrectly, CA cert need to be passed in verify parameter to requests library. Also at present, key file is not being used, which if it is supplied need to be passed as a tuple in cert parameter Python requests library relevant doc link http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification Change-Id: Ie71e760bce6a78ed1444373adfa0a133e82ec434 Closes-Bug: 1408372
* Support ceilometer-url and os-endpointZhiQiang Fan2015-01-081-4/+9
| | | | | | | | | Ceilometerclient has messed up with (ceilometer-url and os-endpoint) and (os-auth-token and token). This patch marks ceilometer-url and auth-token as deprecated, and unifies the two pairs arguments. Change-Id: Id55e5b603d8075018cf45b9833d397173439b3ce Closes-Bug: #1396811
* Allow graceful shutdown on Ctrl+Cliu-sheng2014-12-121-0/+3
| | | | Change-Id: If02a849af2b0dd471ffa078a53864b3cf751b9bb
* Make methods static where it's possibleDina Belova2014-12-101-2/+4
| | | | Change-Id: If6c1fa05044e65ec1e72a3e5f63e6db826469a2d
* Fix timeout argument not treated as integerZhiQiang Fan2014-11-141-0/+15
| | | | | | | | | | | | Currently, if we specify --timeout 30 in CLI commands. we will get 'a float is required' error. Since we already specify timeout is ingeter in ceilometer.v2.client, this patch converts CLI argument timeout to integer. Note, if zero is passed to v2.client, we treat it as disable timeout. Change-Id: I213b6c24964095297cb4e87c25bb871ebd668bb4 Closes-Bug: #1391606
* switch to oslo.utilsgordon chung2014-09-291-2/+2
| | | | | | | oslo.utils is released and corresponding code in oslo-incubator has been removed. Change-Id: Ic3a13380809a8b00c979e5ac405b4084f486a31d
* Reduce redundant parameter of some commands in CLIls11752014-09-191-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deleting an alarm, we use "ceilometer alarm-delete -a <ALARM_ID>", unlike other deleting commands of openstack, the parameter-a/--alarm_id is redundant. The similar situations exist in showing alarm, geting alarm state, showing resource and so on. It is more easy to use for reducing these parameters. New behaviour: $ ceilometer help alarm-show usage: ceilometer alarm-show [<ALARM_ID>] Show an alarm. Positional arguments: <ALARM_ID> ID of the alarm to show. $ ceilometer alarm-show alarm_id should not be empty $ ceilometer alarm-show abcde Not Found (HTTP 404) $ ceilometer alarm-show -a abcde -a is obsolete! See help for more details. Not Found (HTTP 404) $ ceilometer alarm-show --alarm_id abcde --alarm_id is obsolete! See help for more details. Not Found (HTTP 404) Co-Authored-By: Nejc Saje <nsaje@redhat.com> Change-Id: I1fbc85aa253929bfbb5e73ed834a725b9cf828b4 Closes-bug: #1268557
* Use HTTPClient from common Oslo codeekudryashova2014-07-311-160/+18
| | | | | | | | | In the process of unification of the clients code we should reuse common functionality from Oslo. bp common-client-library-2 Change-Id: I0e027c33ee42b6de032d33269caeea33e7837f40
* Merge "Improve --debug logging output"Jenkins2014-07-221-1/+3
|\
| * Improve --debug logging outputliu-sheng2014-07-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This change makes the following improvements to the output of a ceilometer command with the --debug option set: * Silences spurious logging from iso8601 and urllib3.connectionpool * Removes the line number from the logging format, since the intent of --debug is to show the user what network requests are occuring. Change-Id: I1b286adf63b1ca05ec4fcfb27fbc939aa662cc7e Closes-bug: #1324470
* | Calculate a suitable column width for positional argumentsChristian Berendt2014-07-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overwrite the method add_arguments in the class OpenStackHelpFormatter to calculate a suitable columnt width (max_help_position) for the positional arguments. example output before this patch: alarm-threshold-create Create a new alarm based on computed statistics. alarm-threshold-update Update an existing alarm based on computed statistics. alarm-update Update an existing alarm (Deprecated). example output after this patch: alarm-threshold-create Create a new alarm based on computed statistics. alarm-threshold-update Update an existing alarm based on computed statistics. alarm-update Update an existing alarm (Deprecated). Change-Id: I945e46bb9e0309b960e3322261d9d6ff9fa35b52 Closes-Bug: #1326471
* | Update python-ceilometerclient to support Keystone V3 APIFabio Giannetti2014-06-261-79/+154
|/ | | | | | | | | | | | | | Keystone is now deprecating the V2 API in favor of the V3 API. The ceilometer client is now using the keystone session to delegate the discovery of the version that is going to be used, this eliminates the need of updating the client every time there is a new API version. DocImpact blueprint support-keystone-v3-api Change-Id: I6ebacce7adf70f24bdede9b920853ab9851071cf
* Merge "fixed several pep8 issues"Jenkins2014-05-291-1/+1
|\
| * fixed several pep8 issuesChristian Berendt2014-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | * E122 continuation line missing indentation or outdented * E126 continuation line over-indented for hanging indent * E128 continuation line under-indented for visual indent * E265 block comment should start with '# ' Tested with pep8 version 1.5.6 (2014-04-14). Change-Id: Iaea72c74d3678061b0ac837eb8fe8c85a883bb4a
* | Fix exception handling of CLIliu-sheng2014-05-231-1/+1
|/ | | | | | | | | | | Because exc.Unauthorized exception has been removed for commit "Remove out-dated exceptions"(https://review.openstack.org/#/c/93852/). but it still in use in ceilometerclient.shell.CeilometerShell#main(). This patch replace exc.Unauthorized with exc.HTTPUnauthorized. And other three places of exc.NotFound are in use too. Change-Id: I3e010db20cb6f6636126cceed5c62a9817213739 Closes-bug: #1321649
* Improve help stringsAndreas Jaeger2014-02-031-14/+14
| | | | | | | | | | | | | | The help strings where rather inconsistent in their usage of '.' and capitalization. Now all strings end with a "." and are capitalized. This leads to output like: --alarm_ids <ALARM IDS> List of alarm id Required. Note the missing period before "Required". Change-Id: I5edf0d4584b7f01d941068818c9dd0d17043ffaa
* Merge "Raise traceback on error when using CLI and -debug"Jenkins2014-01-281-3/+9
|\
| * Raise traceback on error when using CLI and -debugChmouel Boudjnah2014-01-191-3/+9
| | | | | | | | | | | | | | When --debug is specified to the CLI don't just print the simple error message but actually reraise that error. Change-Id: Iac624dbb3490d29e32a9ea251c14766186df31db
* | Merge "Remove ununsed httplib2 requirement"Jenkins2014-01-271-2/+0
|\ \
| * | Remove ununsed httplib2 requirementChmouel Boudjnah2014-01-271-2/+0
| |/ | | | | | | | | | | | | | | This is not needed anymore since the logging is handled by six.moves/httplib. Change-Id: I4de3cfd8d8d3c08b38e39fde12172bdb4de0cea0 Closes-Bug: 1272986
* | Merge "Using common methods from oslo cliutils"Jenkins2014-01-271-13/+15
|\ \
| * | Using common methods from oslo cliutilsJia Dong2014-01-241-13/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | There are some common methods in cliutils we can use in ceilometerclient: arg, env, unauthenticated, isunauthenticated. + Replaces utils.env to add alias env from cliutils. + Removes unused methods in utils: env To use methods from clituils. partially implements blueprint common-client-library-2 Change-Id: I295cc80635ed15c91e2832acb315e9deede09516
* | Avoid discarding alarm-threshold-create --query optionEoghan Glynn2014-01-231-3/+10
|/ | | | | | | | | Fixes bug 1271913 The query is crucial to the alarm evaluator statistics query being well-formed, so must not be discarded. Change-Id: I5ff8dcb420b932fc58dfef3dadfcbc4a4dc5cf66
* Supports bash_completion for ceilometerclientZhiQiang Fan2013-12-231-0/+29
| | | | | | | | | | | bash_completion feature can improve CLI user experience, projects like nova, keystone, and cinder already support it. NOTE: this patch just provides simple functionality, which means cache for IDs and names is not used (like nova). Change-Id: I1b04998a5e7c8818aed4b51f5fe5bf01efd0e14a Closes-Bug: #1260939
* Merge "Encode exception on ceilometer-client for UnicodeDecodeError"Jenkins2013-12-141-1/+6
|\
| * Encode exception on ceilometer-client for UnicodeDecodeErrorChenZheng2013-11-281-1/+6
| | | | | | | | | | | | | | | | Current ceilometer client did not handle output exception which is encoded, this patch implements the shell encoding for exception output. Change-Id: I3cddb277868e39765eccd68dc256f07e15a4207b
* | Change OpenStack Metering to OpenStack TelemetryAndreas Jaeger2013-12-021-1/+1
|/ | | | | | | With the project change, let's change the tool as well to use the new name. Change-Id: I90bcf55b54dc765abc377ced005cd7f2aab79c0e
* Ensure basic logging config is appliedEoghan Glynn2013-11-191-6/+6
| | | | | | | | | | | | | | | | Fixes bug 1252775 Previously the CLI emitted an obscure message related to logging config when a API call failure was encountered without the --debug flag being set: No handlers could be found for logger "ceilometerclient.common.http" Now we always set the basic logging config with serverity level of warning at least, so as to give the user a more friendly and less confusing error message. Change-Id: I5c6e70e97defca49ca62346f90190935646ff383
* Added support to --os-cacertStefano Zilli2013-10-011-3/+9
| | | | | | Closes-Bug: #1224343 Change-Id: Ib0549d4496c47900c81cc970b99bcff25cad0040
* Make authenticated client easier to consume.Eoghan Glynn2013-06-211-54/+3
| | | | | | Encapsulate keystone logic in an convenience method. Change-Id: I0a048e02f57d657b8b414a76d759ceb9e0e025df
* Use Python 3.x compatible except constructDirk Mueller2013-06-071-1/+1
| | | | | | | Per (proposed) Hacking check, use except x as y: instead of x,y:, which works with any Python version >= 2.6 Change-Id: I6e52cedec5c694bccae10541b1964a8547d4ffd1
* Fix pep H306 (import order)Angus Salkeld2013-05-201-1/+1
| | | | | | | | Also remove some unused imports This is an effort to get the pep ignores to be closer to nova. Change-Id: I35612de45084fac0ae1c96dad84bb23cfade0e4f
* Fix pep H402 and H401 errorsAngus Salkeld2013-05-201-3/+1
| | | | | | This is an effort to get the pep ignores to be closer to nova. Change-Id: I451df579bbead00a8ff2c301c1a84e7c0a896002
* Fix mis-scoped Client class breaking CLIEoghan Glynn2013-05-151-1/+2
| | | | | | | | | | | | | | | | | Fixes bug 1180439 The change in importation in this commit: https://github.com/openstack/python-ceilometerclient/commit/453f4d2a caused the ceilometer CLI to fail in all cases with: 'module' object has no attribute 'Client' due to the mis-scoping of ceilometerclient.client.Client as ceilometerclient.Client. Change-Id: I5ec30bf74233f758519810629763ccb70bb7af87
* client does not show versionGordon Chung2013-05-071-3/+5
| | | | | | | | add support for --version update openstack.common to bring in latest openstack.common.version Change-Id: Ic1e66ea1f1aa65039b79902b893d1b2474ecb63e Fixes:bug1177573
* Change the default API version used by the cli to v2Angus Salkeld2013-04-101-2/+2
| | | | | | Since the v1 API is somewhat deprecated lets default to v2. Change-Id: Iece5428b2a47e63995e26f58347d4f7c8f8cb238
* Merge "Corrected help strings."Jenkins2013-03-191-3/+3
|\
| * Corrected help strings.Lianhao Lu2013-03-141-3/+3
| | | | | | | | | | | | Corrected the wrongly mentioning of glance in help strings. Change-Id: Ic8613e8670f96be38d1a63777edc6c113a1894d4
* | Don't log unneccessarly on each http requestAngus Salkeld2013-03-131-4/+0
|/ | | | | | | | | | Note: logging still works with -d, this just quiets it down for the normal case. bug 1154408 Signed-off-by: Angus Salkeld <asalkeld@redhat.com> Change-Id: I0adccc8b2c83d917d2742e86fdb4b6363b398ca6
* Support --os-auth-token.Lianhao Lu2013-02-201-32/+38
| | | | | | Fixed bug #1130286. Change-Id: Ia0a8884f2738c31c3d91d6679622ebd3ec9b86b5
* Pin pep8 to 1.3.3Chuck Short2013-01-071-73/+78
| | | | | | | | pep8 1.3.3 is pretty much standard across the openstack projects. Pin pep8 1.3.3 and fix associated warnings/errors. Change-Id: I7230857889d261320a0dab2c261c9f85dc0ee602 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Fix testsJulien Danjou2012-12-061-1/+1
| | | | | Change-Id: I8c6a1c4bc4dec052fbb5f2544f519253bc8be143 Signed-off-by: Julien Danjou <julien@danjou.info>
* Fix the default service_typeAngus Salkeld2012-11-301-1/+1
| | | | Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
* Add basic functionalityAngus Salkeld2012-11-091-0/+335
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>