summaryrefslogtreecommitdiff
path: root/ceilometerclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Allow alarm-threshold-update to upate generic attributes"1.0.7Jenkins2013-11-281-5/+32
|\
| * Allow alarm-threshold-update to upate generic attributesEoghan Glynn2013-11-221-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1253989 Previously, generic (i.e. non-threshold-related) alarm attributes could not be updated with the alarm-threshold-update command. An attempt to do so failed semi-silently when a non-existent dict key was referenced. Now, all alarm attributes can be updated with this command. Change-Id: Iba3f21de879fb853575dcec1730de7873eab8afd
* | Enable pep8 E711/E712/E721/H302 checkingLianhao Lu2013-11-221-1/+2
| | | | | | | | Change-Id: I229f1c15b46284fae94d4c786765baa18da0055f
* | Enable pep8 E128 checkingLianhao Lu2013-11-222-6/+6
| | | | | | | | Change-Id: I31dc17f0faaae1c32e5106873fd13158376367f7
* | Enable pep8 E121/E122/E123 checkingLianhao Lu2013-11-222-17/+15
|/ | | | Change-Id: I686f2b7895868e6ebaabe5d274e3efde2dd9c441
* Avoid reset of repeat_actions attribute on alarm updateEoghan Glynn2013-11-211-0/+67
| | | | | | | | | | | | | Fixes bug 1253057 Previously, when an unrelated alarm attribute was updated via the CLI, the repeat_actions attribute was also set to False as an unwanted side-effect. Now, we only set this attribute in the update call if explicitly specified as a CLI arg. Otherwise the value provided in the PUT request body reflects the pre-existing value for this attribute. Change-Id: I94468ff649dd4367848c74e94a3feb08494bb223
* Adds the 'limit' parameter to sample list command in V2 APINejc Saje2013-10-282-1/+17
| | | | | Change-Id: I338590fcd75f39c3419e7e138023f6918f206ae2 Fixes: bug #1244172
* Fix order of sample listfujioka yuuichi2013-10-282-0/+131
| | | | | | | | | | | Samples of "ceilometer sample-list" are sorted by Resource ID and Volume. Expected order is Timestamp. This pache fixes this problem. Change-Id: I338014e5868b2176a3afd549e13d0dd6118b3ac1 Closes-Bug: #1227495
* Fix cacert argument to HTTPS connectionKieran Spear2013-10-241-7/+14
| | | | | | | | | | This fixes a typo that broke the client for HTTPS URLs. Added a basic test to cover this case. Coverage is very low in common/http.py. Change-Id: Ic440f20f463c3b8558a7639f1015096a01496cf8 Closes-bug: 1244091
* Replace mox3 with mock in unit testLianhao Lu2013-10-212-7/+5
| | | | | | Compared to mox3, mock is tested much more in various Python 3 versions. Change-Id: I9e83aa622257c36ff47c79f6b491c1b074d2245d
* Fix missed Pep8 error with 1.4.6Dirk Mueller2013-10-181-2/+1
| | | | | | Missed E126 continuation line over-indented for hanging indent Change-Id: I17ce2a984367fdb078d59bf6603610a01ad168f4
* Replace mox with mox3Kui Shi2013-10-151-1/+1
| | | | | | | | | | | | | | | | | Mox3 is an unofficial port of the Google mox framework (http://code.google.com/p/pymox/) to Python 3. https://pypi.python.org/pypi/mox3 Align with global-requirement and update the importing clause. There is still py33 issue induced by keystoneclient. https://review.openstack.org/#/c/51788/ When keystoneclient is upgraded in requirements.txt, all py33 issues should be fixed. Change-Id: If0d00c088779b4a71e606cc87b37b5b1f9701081 Implement: blueprint py33-support
* align the order of parameters for urlencode()Kui Shi2013-10-155-14/+14
| | | | | | | | | | | | | | | | | In Python 3.3, hash randomization is enabled by default. It causes the iteration order of dicts and sets to be unpredictable and differ across Python runs. In the test case, the fixed expecting string will not match the test result, it is relying on the dict order. This change transforms the input dict to a sequence of two-element list, with fixed order, and update the related expecitng string / fixture in test cases. Partial Implement: blueprint py33-support Change-Id: I6dccde9e584be8335a6375f5fbad5c5cbd7b9b6d
* replace basetring/xrangeKui Shi2013-10-141-0/+1
| | | | | | | | | basetring --> six.string_types xrange --> six.moves.xrange Partial Implement: blueprint py33-support Change-Id: Iedc2cd66ec65c0e4685e56a3bfbf8e9d38fd0072
* Use six.iteritems() for dictKui Shi2013-10-141-5/+6
| | | | | | | | | Fix the error: AttributeError: 'dict' object has no attribute 'iteritems' Partial Implement: blueprint py33-support Change-Id: I5dff17d1df01d6583f882f818434804d65726c51
* Translate print statement to print functionKui Shi2013-10-141-5/+5
| | | | | | | | | Use "from __future__ import print_function" docs.python.org/3/howto/pyporting.html#from-future-import-print-function Partial Implement: blueprint py33-support Change-Id: I92fc07257851795a9972c8273d3278c8679d6628
* Fix module importing issues for Python 3Kui Shi2013-10-141-2/+2
| | | | | | | | | Copy py3kcompat from oslo for urlparse Substitute StringIO / httplib with six Partial Implement: blueprint py33-support Change-Id: Ic8da2ca53b4217ef13f15be094437f1f4e643001
* Import six.StringIOKui Shi2013-10-143-6/+6
| | | | | | | | | | 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
* Add support for new alarm-history command1.0.6Eoghan Glynn2013-10-032-3/+176
| | | | | | Expose the new alarm history API via the CLI. Change-Id: I5757d309dd7143dfab83985fb51ee6d320478e3b
* Merge "Use standard CLI object-verb ordering for alarm-{g|s}set-state"Jenkins2013-10-031-2/+2
|\
| * Use standard CLI object-verb ordering for alarm-{g|s}set-stateEoghan Glynn2013-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | The openstack CLIs all use an object-followed-by-verb ordering convention when construct command names. Follow a similar convention for commands to get and set alarm state. Change-Id: I34e0f450019556c80476df782d4c86dca08bdc9d
* | Merge "Fix shell.do_alarm_get_state to get as opposed to set"Jenkins2013-10-031-0/+39
|\ \ | |/
| * Fix shell.do_alarm_get_state to get as opposed to setEoghan Glynn2013-10-021-0/+39
| | | | | | | | | | | | | | | | | | Otherwise the CLI fails when attempting to set a state arg that doesn't exist. (Simple copy'n'paste error in the original code). Change-Id: Iab117177805449ddec9d03656a95a0cbbbbd58bb
* | Allow to update an alarm partiallyMehdi Abaakouk2013-10-012-4/+51
|/ | | | | | | | | | | | | The patch allow to only modify a part of an alarm instead of force to set the full alarm description. This permit to an application that have been written code around alarm with ceilometerclient 1.0.4 and ceilometer pre havana-3. To update alarm without any change with this and ceilometer >= havana-3 (ie: heat). Fixes bug #1231303 Change-Id: I20250131d05d20bfadbca450dfe6b8237f4b7183
* Help messages: specify which options are requiredCyril Roelandt2013-09-251-0/+19
| | | | | | Closes-Bug: #1223283 Change-Id: I080fa73bd45a1f9f442dbcdfa65fdc24e30521da
* Merge "Replace OpenStack LLC with OpenStack Foundation"Jenkins2013-09-2311-11/+11
|\
| * Replace OpenStack LLC with OpenStack FoundationZhiQiang Fan2013-09-2011-11/+11
| | | | | | | | | | Change-Id: Ia007da282714d8ee7337fd3b51f6dcc3b64d7ec3 Fixes-Bug: #1214176
* | Use the new alarm formatMehdi Abaakouk2013-09-202-34/+161
|/ | | | | | | | | | | The change sync the client API with the new alarm type and keep compatibility with the previous format of the alarm. It allows to create the new type of alarm: combination alarm. Implements blueprint alarming-logical-combination Change-Id: Ie62265023cadc20cf36a0d0b3775f4d984e324cf
* alarm: rename counter_name to meter_nameJulien Danjou2013-09-051-1/+29
| | | | | | | This is a follow-up wrt the recent fix that handled in Ceilometer for the alarming API. Change-Id: Ide73a2e703bf31652b819c6d5170891c73b77ec9
* Merge "Add support for new alarm repeat_actions attribute"1.0.3Jenkins2013-08-091-0/+1
|\
| * Add support for new alarm repeat_actions attributeEoghan Glynn2013-08-081-0/+1
| | | | | | | | | | | | Continuous notification is generally required by Heat. Change-Id: Ib396f47c68298f883e305c755d821c2679a56a5c
* | Updated from global requirementsMonty Taylor2013-08-082-0/+23
|/ | | | Change-Id: Ibf423f14a5c37aa298b2115bfd4936f660c6f530
* Enhance ceilometer statistics command with --periodGuangyu Suo2013-07-231-0/+9
| | | | | | | | | Currently, if don't specify query parameter in ceilometer statistics command, ceilometer statistics with --period will not work. This change is trying to fix this issue. Change-Id: I8723bad11d5c452c2834e33df9bb01ebdc6ce9ce Fixs: bug #1202658
* Allow to set matching_metadata with the cli1.0.2Mehdi Abaakouk2013-07-221-0/+12
| | | | | | | | | | | This change allows to set the matching_metadata of a alarm like this: ceilometer alarm-create --matching-metadata 'key=value' \ --matching-metadata 'key2=value2' --name 'alarm' ... Fixes bug #1201877 Change-Id: I22bf261b0a9580a06ae107ed45d082171f21fcc4
* Add support for creating samplesAngus Salkeld2013-07-181-14/+30
| | | | Change-Id: Ib33a5fd162d760efa23a2fc496c1d11d79484491
* Add matching_metadata to the allowed attributesAngus Salkeld2013-07-051-1/+0
| | | | Change-Id: Icbd68061a43d18dd27baa7ff68f9381a160cd545
* Move tests to ceilometerclient.Monty Taylor2013-06-3018-0/+1475
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