summaryrefslogtreecommitdiff
path: root/ceilometerclient/tests/test_shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Add timeout for keystoneclient sessionZhiQiang Fan2015-04-201-2/+13
| | | | | | | | | | | | Currently, we only apply timeout on ceilometer api, but not on keystone api as well, this is not consistent. Keystone api may be slow, or worse, stuck, then ceilometerclient will not return timely. This issue has caused availability problem in our environment when ceilometer alarm service has been running for a long time. Change-Id: I0d5f82ff9cf4132a1de2f0b649908483326e116e Closes-Bug: #1436249 (cherry picked from commit 44af2d4087815d5d451305b549f91ab6130528c0)
* Set auth_plugin in __init__Chris Dent2015-04-161-0/+5
| | | | | | | | This avoids auth_plugin being undefined when calling self.get_base_parser without self.main having been called. Closes-Bug: #1434264 Change-Id: Ic3a898ccecb865ff4e88d82538bcb04001d623db
* Support ceilometer-url and os-endpointZhiQiang Fan2015-01-081-0/+18
| | | | | | | | | 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
* Enable --os-insecure CLI optionZhiQiang Fan2014-12-061-0/+36
| | | | | | | | | | | | | --os-insecure is not correctly passed to Keystoneclient because it expects a bool type but we assgin a string value to the insecure parameter, this patch fixes it by using oslo.utils.strutils.bool_from_string. --os-insecure is ignored by Ceilometerclient.v2.client because it expects parameter verify rather than insecure, this patch fixes it by converting insecure to verify if that field is not set. Change-Id: I545de167cdf8cfec6b5c67984b74327fb76c513a Closes-Bug: #1394449
* Fix timeout argument not treated as integerZhiQiang Fan2014-11-141-0/+29
| | | | | | | | | | | | 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
* Refactor tests/test_shell.pyZhiQiang Fan2014-11-131-18/+10
| | | | | | | Remove unnecessary help test for keystone shell test. Change-Id: I4891a3e7d13f924ba0a1f7c57e87cd092ed8f9ff Closes-Bug: #1391965
* Use HTTPClient from common Oslo codeekudryashova2014-07-311-6/+6
| | | | | | | | | In the process of unification of the clients code we should reuse common functionality from Oslo. bp common-client-library-2 Change-Id: I0e027c33ee42b6de032d33269caeea33e7837f40
* Update python-ceilometerclient to support Keystone V3 APIFabio Giannetti2014-06-261-15/+53
| | | | | | | | | | | | | | 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
* Fix hacking rules: H302,H305,H307,H402ZhiQiang Fan2014-06-111-3/+2
| | | | | | | | | | Currently, OpenStack Proposal Bot tries to update requirements with global requirements, while the upgraded hacking has introduced some new rules which are not fully handled by current code. This patch fixes some simple rules which are quite straight-forward. Change-Id: If8334f69fb1ad34fbbd6ad898e0e92eb3f81e95a
* Merge "use mock instead of try...finally"Jenkins2014-06-101-7/+2
|\
| * use mock instead of try...finallyZhiQiang Fan2014-05-301-7/+2
| | | | | | | | | | | | | | There are some test code use try...finally block to catch or ignore the stdout message. The job can be done by mock too, and it is cleaner. Change-Id: I0c29382e7bcd0b7f399565b26f27315f7e17a8fc
* | Avoid unnecessary stderr message when run testZhiQiang Fan2014-05-271-1/+2
|/ | | | | | | | | Currently, if we run `tox -epy27`, we will get an useless stderr message 'HTTPUnauthorized (HTTP 401)', which is triggered on purpose by a test. It should be mocked because it provides no such useful message. Change-Id: I009310257741a34fe966d6d745de3c6cf58e0feb Closes-Bug: #1323480
* Remove out-dated exceptionsZhiQiang Fan2014-05-161-3/+3
| | | | | | | | There are some exceptions defined in exc module, which is introduced two years ago, and it is marked as DEPRECATED in the same time. It should be removed for now, since there are no longer used. Change-Id: I039575f37b0e6d1c30e447b74d61b8cd0b6bbd29
* Merge "Raise traceback on error when using CLI and -debug"Jenkins2014-01-281-0/+21
|\
| * Raise traceback on error when using CLI and -debugChmouel Boudjnah2014-01-191-0/+21
| | | | | | | | | | | | | | 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-6/+0
|\ \
| * | Remove ununsed httplib2 requirementChmouel Boudjnah2014-01-271-6/+0
| |/ | | | | | | | | | | | | | | This is not needed anymore since the logging is handled by six.moves/httplib. Change-Id: I4de3cfd8d8d3c08b38e39fde12172bdb4de0cea0 Closes-Bug: 1272986
* | Replace inheritance hierarchy with compositionAndrey Kurilin2014-01-151-2/+2
|/ | | | | | | | | In the process of unification of the clients code we should use composition to allow easier replacement with common HTTPClient. bp common-client-library-2 Change-Id: I98d2bc89d5b1a36c30771923cd1cda7925e563d5
* Replace mox3 with mock in unit testLianhao Lu2013-10-211-4/+5
| | | | | | Compared to mox3, mock is tested much more in various Python 3 versions. Change-Id: I9e83aa622257c36ff47c79f6b491c1b074d2245d
* Import six.StringIOKui Shi2013-10-141-2/+2
| | | | | | | | | | six.StringIO This is an fake file object for textual data. It is an alias for StringIO.StringIO in Python 2 and io.StringIO in Python 3. Partial Implement: blueprint py33-support Change-Id: I76c05041565614241eea7b7595e4503c88211ee8
* Updated from global requirementsMonty Taylor2013-08-081-0/+12
| | | | Change-Id: Ibf423f14a5c37aa298b2115bfd4936f660c6f530
* Move tests to ceilometerclient.Monty Taylor2013-06-301-0/+89
tests.* implies an incorrect global package name. Additionally, consuming code can benefit from being able to choose to consume test code and fixtures. Change-Id: I7ba2b3ba1c2a99410b54fc40b48dfe2fc53eb79a