summaryrefslogtreecommitdiff
path: root/ceilometerclient/v2
Commit message (Collapse)AuthorAgeFilesLines
* Fix to disable meter-links on resource-list CLIRohit Jaiswal2015-11-061-1/+4
| | | | | | | | | | | | | | This adds an optional param to resource-list CLI to disable meter-links. By default its False to generate meter links for backward compatibility. This is a cherry-pick from master patch that enables meter-links on resource-list CLI. Change-Id: I308b94c8a57833cf30b4815ecec2ff9a50e91af6 Closes-Bug: #1508708 (cherry picked from commit e4a62a20b1d072969e842c38b2885a46a20fc54c)
* do not generate meter links on resource-list1.1.1gordon chung2015-09-151-2/+3
| | | | | | | | | | meter links are not accessible via resource_list and add significant overhead to query. we shouldn't generate these anymore. this patch is slightly different from master as this does not disable meter_links by default to maintain existing functionality. Change-Id: Ib20f410a70171aa09e4ebbbb748a5ce495fc6a43 Closes-Bug: #1493400
* support specify user-id when create sample and alarmZhiQiang Fan2015-04-211-0/+9
| | | | | | | | | | | The change of I9ba984f804aecee5b63e5a86e699733040dee245 enables us to specify os-user-id in CLI, but it shadows the user-id when creating sample and alarm, this patch fixes it as what we've done for project-id. Change-Id: Ic3ce5dc8e1aea49b3e41fe495be4921fbf85ea5a ref-change: I0ce2416dccd61eb50584799e6df0b8c45d44cdda (cherry picked from commit f72dc0c38951c898fc139cee6446ef0f125fde10)
* Enable specified project_id in CLI commandsZhiQiang Fan2015-04-161-8/+30
| | | | | | | | | | | | | | | | | After we port to oslo-incubator.apiclient, the project_id can no longer be specified for alarm-{,threhsold,combination}-{create,update} and sample-create, this is because client.AuthPlugin registers a CLI argument named --os-project-id which will shadow the project-id argument. Since os-project-id is used for Keystone V3 API, we should not remove it from AuthPlugin, so this patch moves the dest of project_id to {alarm,sample}_project_id, and adds a decorator to restore shadowed project_id field when we call v2 client. Change-Id: I0ce2416dccd61eb50584799e6df0b8c45d44cdda Closes-Bug: #1393489 (cherry picked from commit 0c23c62cef6f1388d26c04d6cf0e74153db0a0b5)
* alarm: Use new gnocchi aggregation APIMehdi Abaakouk2015-04-151-15/+82
| | | | | | | | | | | | | Since https://review.openstack.org/#/c/163462/ and https://review.openstack.org/#/c/162649/4 in gnocchi, all kind of aggregations have been moved in the same URI namespace (/v1/aggregation/...) and we can use complex query to make aggregation across multiples metrics. This change sync the ceilometerclient alarm shell to match these changes. Change-Id: I5717a4604af5505dfb8c56463e2bdb86c59e41ce (cherry picked from commit db48aa28b169fa8df01020d54a20e644c9a0b7df)
* Corrected the errors in sample-show and sample-createLianhao Lu2015-02-121-2/+2
| | | | | | | | | Patchset I67152c636526dad3ec27e06058ff73ad969ae2b9 broke the sample-show and sample-create when introducing the new sample API support. This patch fixes those. Change-Id: I3e36df61cf672b44c376c4a18dc808d565315bf6 Closes-Bug: #1421040
* Merge "Allow create/update gnocchi alarm rule"Jenkins2015-02-091-0/+146
|\
| * Allow create/update gnocchi alarm ruleMehdi Abaakouk2015-02-061-0/+146
| | | | | | | | Change-Id: Id1c6832c2db32c5cce0e31cd0022a86508630a7e
* | Merge "Don't enforce a kind of alarm rules"Jenkins2015-02-091-4/+4
|\ \ | |/
| * Don't enforce a kind of alarm rulesMehdi Abaakouk2015-02-061-4/+4
| | | | | | | | | | | | | | | | | | Now, the alarm rules are extendable with stevedore in ceilometer API, so we should not enforce the list of supported alarm rule. This change does that. Change-Id: I06067bdd02cf88f6fd4cd060bdfa310ded504e65
* | Merge "add --no-traits for event-list"Jenkins2015-02-051-0/+5
|\ \
| * | add --no-traits for event-listZhiQiang Fan2015-02-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we print traits list for each event when run event-list command, but that is a lot of information. After system run for a few days, the event-list command prints so much that it is not convenient to know the whole event-list even with less command. This patch adds a simple argument called --no-traits, it is False by default, event-list will not print traits if this argument is specified. Since this argument is boolean type, no need to assign a value, if it is specified, then it is actived. Change-Id: Ib69209fef5967a18f094f2d4665fa189e4ca3e6a
* | | Merge "Add Sample API support"Jenkins2015-02-053-11/+77
|\ \ \
| * | | Add Sample API supportZhiQiang Fan2015-02-053-11/+77
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Sample API has been implemented in Ceilometer for a long time, but CLI is lack of such support, this patch implements Sample CLI. Implements blueprint cli-samples-api Change-Id: I67152c636526dad3ec27e06058ff73ad969ae2b9 DocImpact
* | | Merge "Remove trailing space before , in the help string of --time-constraint"Jenkins2015-02-051-1/+1
|\ \ \ | |/ / |/| |
| * | Remove trailing space before , in the help string of --time-constraintChristian Berendt2015-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Instead of 'with a cron expression , whereas its duration' it should be 'with a cron expression, whereas its duration'. Change-Id: Id545045dd4b25b5cbd2d79933851adab4963dada
* | | Add severity field to alarm CLIPradeep Kilambi2015-01-262-7/+12
| |/ |/| | | | | | | Change-Id: I699bea4859d4f0a5832ced5ba74ba7fb26c122ef Partially-Implements: blueprint ceilometer-alarm-level
* | Merge "Triple double-quoted strings should be used for docstrings"Jenkins2015-01-201-26/+26
|\ \
| * | Triple double-quoted strings should be used for docstringsLena Novokshonova2015-01-121-26/+26
| | | | | | | | | | | | Change-Id: Ib563a9817f6f24ce0d72fe7a8ba96cb6e35c4e46
* | | Merge "Allow all pep8 checks"Jenkins2015-01-202-22/+20
|\ \ \ | |/ /
| * | Allow all pep8 checksDina Belova2015-01-122-22/+20
| | | | | | | | | | | | | | | | | | | | | Fix H405 pep8 issue. H904 issue check was ignored, although there were no places in client code violating this rule. Change-Id: If3b84eb8abb03511d7f77cabfa2955f472a60f23
* | | Merge "Fix H105 pep8 error"Jenkins2015-01-201-2/+0
|\ \ \ | |/ / | | / | |/ |/|
| * Fix H105 pep8 errorDina Belova2015-01-121-2/+0
| | | | | | | | Change-Id: I4587bc2d57c35eef772fbaf3483dfb58c3ae9309
* | Merge "Fix improper parameter setup for cacert and client certs"Jenkins2015-01-161-15/+3
|\ \
| * | Fix improper parameter setup for cacert and client certsSrinivas Sakhamuri2015-01-151-15/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Remove redundant parentheses (except openstack.common)"Jenkins2015-01-131-1/+1
|\ \
| * | Remove redundant parentheses (except openstack.common)Dina Belova2014-12-101-1/+1
| | | | | | | | | | | | Change-Id: I594234648a37d283559a0365969a7fe3609079f8
* | | event-list should sort by timestamp, not idZhiQiang Fan2015-01-131-1/+2
| |/ |/| | | | | | | | | | | | | | | | | Currently, event-list output will be sorted by message id, that is because table field 0 is the default sort field. But sort by id makes no sense, and REST API returns events by timestamp order, so let's keep consistent with upstream. Change-Id: I524b05ed5ff9db34430afd722991d02545c263cb Closes-Bug: #1406622
* | Support ceilometer-url and os-endpointZhiQiang Fan2015-01-081-1/+0
| | | | | | | | | | | | | | | | | | 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
* | Merge "Enable --os-insecure CLI option"Jenkins2015-01-071-1/+6
|\ \
| * | Enable --os-insecure CLI optionZhiQiang Fan2014-12-061-1/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | --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
* | Make methods static where it's possibleDina Belova2014-12-101-1/+2
|/ | | | Change-Id: If6c1fa05044e65ec1e72a3e5f63e6db826469a2d
* Fix timeout argument not treated as integerZhiQiang Fan2014-11-141-5/+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-1/+1
| | | | | | | oslo.utils is released and corresponding code in oslo-incubator has been removed. Change-Id: Ic3a13380809a8b00c979e5ac405b4084f486a31d
* Merge "Fix a help string nit for statistics command"1.0.11Jenkins2014-09-211-1/+1
|\
| * Fix a help string nit for statistics commandliu-sheng2014-09-091-1/+1
| | | | | | | | Change-Id: I0aee668d9a19da76bb01646c87b3cd17418822e5
* | Merge "Reduce redundant parameter of some commands in CLI"Jenkins2014-09-201-13/+45
|\ \
| * | Reduce redundant parameter of some commands in CLIls11752014-09-191-13/+45
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Verify alarm found before modifying"Jenkins2014-09-131-1/+5
|\ \
| * | Verify alarm found before modifyingEric Pendergrass2014-08-291-1/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current behavior is to retrieve alarm by id and conduct operations on the object. If the tenant doesn't own the alarm or isn't admin, the user will receive the message: 'NoneType' object has no attribute 'to_dict' Above message doesn't provide any useful diagnostic information and indicates a programming error since an unexpected None-type is encountered and not handled. This change verifies the alarm is found before using the object. If alarm not found it prints the same message for a not found Alarm as other PUT operations like alarm-state-set: Alarm not found: <alarm_id>. This message is more useful for diagnosis and gets rid of the uncaught None-type error. Change-Id: I66abcd4498b24ac7cadcf29fe3ced3fcda08458c Closes-Bug: #1348387
* | Fix sample-create in v2 api callsChris Dent2014-09-101-1/+1
|/ | | | | | | | | | | | | A dict embedded in a list is the expected input. In 47934c777c50897b649793e0960eebdaad322c45 the list was lost, this puts it back. Note that the _exact_ date of this failure was identified by existing Rally jobs which started failing in early August. That made searching the commit logs straightforward. Change-Id: I37e794de7a23b8ce8e67a086732af5a19f182409 Closes-Bug: #1367867
* Merge "Check if the alarm has time constraints field before displaying"Jenkins2014-08-281-23/+24
|\
| * Check if the alarm has time constraints field before displayingNejc Saje2014-08-251-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the bug that broke the alarms CLI if the alarm didn't have a time constraints field. Reduces code duplication of alarm printing code, so now all the alarm printing code is actually tested. Renames some auxiliary methods for more clarity. Change-Id: Ib691b4a5a6cf5ae133cd0a5576f90e4d0d189a92 Closes-bug: #1316390
* | Use HTTPClient from common Oslo codeekudryashova2014-07-314-14/+31
| | | | | | | | | | | | | | | | | | 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 "Avoid empty entity field in uri path"Jenkins2014-07-241-15/+24
|\ \ | |/ |/|
| * Avoid empty entity field in uri pathZhiQiang Fan2014-05-271-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, empty entity field is accepted but will fail when call cli, it is because the empty field leads to incorrect rest api uri, which will get 404 error. This patch checks some required entity fields, which will present in uri path, and raises CommandError if they are empty. Note the other required fields will not cause the same problem, so they are not checked. Change-Id: I59411b760ff7457064b386911e868518b3057e3a Closes-Bug: #1313679
* | Merge "Fix alarm-threshold-update --query option"Jenkins2014-06-251-0/+1
|\ \
| * | Fix alarm-threshold-update --query optionZhiQiang Fan2014-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, alarm-threshold-update command can not update its query field, because the dest value is removed accidently so the query is not put under threshold_rule dict. This patch simply adds it back. Change-Id: I2eeaf8cbb26f506e097dafdcb6d0eae4ad7fec3e Closes-Bug: #1313676
* | | Merge "Add methods to resource classes"Jenkins2014-06-244-3/+28
|\ \ \
| * | | Add methods to resource classesArtur Svechnikov2014-06-164-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resource classes of managers should have methods like delete() and get(). Basicly base.Resource class has method get(), which uses id attribute, but classes Alarm, Event, etc. have no this attribute. Added intercept getting of id in the resource classes. Also added catch of HTTPNotFound for alarm get() because it affects correct functionality of scenario tests. Closes-Bug: #1312146 Change-Id: Ie598b73c64dece2185955467936dc6544a8a3dc7