summaryrefslogtreecommitdiff
path: root/ceilometerclient
Commit message (Collapse)AuthorAgeFilesLines
* Ensure statistics aggregates are ordered with parameterized first1.0.10Eoghan Glynn2014-04-012-7/+13
| | | | | | | | | | | | | Fixes bug 1298528 Due to WSME re-ordering of query parameters, in the mixed case any parameterized aggregates must be specified in the URL first, prior to any unparameterized aggregates. Otherwise the aggregate parameter will be associated with the wrong aggregate function. Change-Id: Ib2c76d03a4fc91d13074a03caade2c776d2309b3
* Implementation of statistics aggregatorsMichał Jastrzębski2014-03-274-15/+257
| | | | | | | | | | | | | | This corresponds to do API calls on: /v2/meters/meter-name/statistics?aggregate.func=func-name Usage: aggregates = [{'func': 'cardinality', 'param': 'resource_id'}]) client.statistics.list(meter_name="instance", aggregates=aggregates) CLI: ceilometer statistics -m instance -a "cardinality<-resource_id" Change-Id: I0096668585a5c7e7985973f07049eb91f44413fe
* Merge "Adds alarm time constraint support to ceilometer CLI"Jenkins2014-03-266-7/+249
|\
| * Adds alarm time constraint support to ceilometer CLIUros Jovanovic2014-03-266-7/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time constraints can be specified for create and update families of commands with the following format: --time-constraint name=constraint1;start='0 11 * * *';duration=300 This switch can be specified multiple times in the case of multiple time constraints. With update commands, time constraints are updated by name, e.g. --time-constraint name=constraint1;duration=500 updates the constraint 'constraint1' with a new duration 500. Time constraints can be removed with update commands using the switch --remove-time-constraint=constraint1,constraint2 . Example of display outputs: > ceilometer alarm-list +--------------------------------------+-------+-------------------+---------+------------+----------------------------+--------------------------------------------------------------+ | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | +--------------------------------------+-------+-------------------+---------+------------+----------------------------+--------------------------------------------------------------+ | 2ead776d-2fc7-47a2-b0bb-0f88dcefa457 | test2 | insufficient data | True | False | cpu == 50.0 during 1 x 60s | cons1 at 0 11 * * * for 300s, cons2 at 0 23 * * * for 600s | +--------------------------------------+-------+-------------------+---------+------------+----------------------------+--------------------------------------------------------------+ > ceilometer alarm-show -a +---------------------------+-----------------------------------------------------------------------+ | Property | Value | +---------------------------+-----------------------------------------------------------------------+ | alarm_actions | [] | | alarm_id | 2ead776d-2fc7-47a2-b0bb-0f88dcefa457 | | comparison_operator | eq | | description | Alarm when cpu is eq a avg of 50.0 over 60 seconds | | enabled | True | | evaluation_periods | 1 | | exclude_outliers | False | | insufficient_data_actions | [] | | meter_name | cpu | | name | test2 | | ok_actions | [] | | period | 60 | | project_id | 962f75ad22c24cbf99d40d7b82718505 | | query | | | repeat_actions | False | | state | insufficient data | | statistic | avg | | threshold | 50.0 | | time_constraints | [{name: cons1, | | | description: Time constraint at 0 11 * * * lasting for 300 seconds, | | | start: 0 11 * * *, | | | duration: 300}, | | | {name: cons2, | | | description: Time constraint at 0 23 * * * lasting for 600 seconds, | | | start: 0 23 * * *, | | | duration: 600}] | | type | threshold | | user_id | 76f335df8e2f4c7e9e8185e26ea85759 | +---------------------------+-----------------------------------------------------------------------+ > ceilometer alarm-history -a 2ead776d-2fc7-47a2-b0bb-0f88dcefa457 +----------+----------------------------+--------------------------------------------------------------------------------+ | Type | Timestamp | Detail | +----------+----------------------------+--------------------------------------------------------------------------------+ | creation | 2014-03-06T07:41:35.362050 | name: test2 | | | | description: Alarm when cpu is eq a avg of 50.0 over 60 seconds | | | | type: threshold | | | | rule: cpu == 50.0 during 1 x 60s | | | | time_constraints: cons1 at 0 11 * * * for 300s, cons2 at 0 23 * * * for 600s | +----------+----------------------------+--------------------------------------------------------------------------------+ Change-Id: I3953276537b4526e46e5e6d229d6fa154f8ab0fc Closes-Bug: #1288246
* | Merge "Add complex query support for alarm history"Jenkins2014-03-255-3/+158
|\ \
| * | Add complex query support for alarm historyIldiko Vancsa2014-03-185-3/+158
| | | | | | | | | | | | Change-Id: Ie41d9a0be73a525ae105262fb5859960bf9f9df6
* | | Merge "Add complex query support for alarms"Jenkins2014-03-256-11/+187
|\ \ \ | |/ /
| * | Add complex query support for alarmsBalazs Gibizer2014-03-186-11/+187
| | | | | | | | | | | | Change-Id: I3305d679d128562f7794a5cf460093981a601f7c
* | | Merge "Deprecate 'alarm-update'"Jenkins2014-03-211-1/+1
|\ \ \
| * | | Deprecate 'alarm-update'liu-sheng2014-03-131-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | Like deprecating alarm-create, we can use alarm-threshold-update and alarm-combination-update instead of alarm-update. So, mark alarm-update as 'Deprecated'. Change-Id: I8c9718d76e40729dc6094611a055c904e27619ba
* | | Merge "fix help message of deprecated command"Jenkins2014-03-201-1/+1
|\ \ \
| * | | fix help message of deprecated commandfujioka yuuichi2014-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Adds command name instead of deprecated command to help message. Change-Id: Ib6cbbcd24bbf015cf3656be9cbdf7de25d4d9cf7
* | | | Merge "Checking the type of auth_token, and fixing it if necessary"Jenkins2014-03-202-6/+64
|\ \ \ \ | |_|_|/ |/| | |
| * | | Checking the type of auth_token, and fixing it if necessaryMarc Solanas2014-03-132-6/+64
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new Client object by calling the get_client function, if the ceilometer_url is not passed as a parameter, but the token is passed, the auth_token is converted to a lambda function. However, when both the ceilometer_url and the auth_token are passed, this conversion does not take place. This fix checks if the auth_token is a lambda function or not. If it is not, it creates a new lambda function which returns the token. Without this check, if a token was passed as a string, the python client would throw and error, when trying to call self.auth_token() in ceilomenterclient/common/http.py. Change-Id: I3e564fcf17ce497546b75f0ab8c7ca0f6f2099df Closes-Bug: #1254186
* | | Add complex query support for samplesBalazs Gibizer2014-03-125-3/+207
|/ / | | | | | | Change-Id: I88c4eb6fa32514100187dbbca9777c7a5974fac6
* | Merge "py3kcompat: remove in python-ceilometerclient"Jenkins2014-02-266-76/+12
|\ \
| * | py3kcompat: remove in python-ceilometerclientJia Dong2014-02-216-76/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Everything is already in six>=1.4.0 and we already depend on such a version. There's no reason to keep this file. So remove py3kcompat from python-ceilometerclient. Change-Id: Ide6876e7a60377cb3843816d1d9ab2c589bc8f1b Closes-Bug: #1280033
* | | Merge "Improve help strings"Jenkins2014-02-202-73/+79
|\ \ \
| * | | Improve help stringsAndreas Jaeger2014-02-032-73/+79
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Fix a typo in a comment in v2 client"Jenkins2014-02-191-1/+1
|\ \ \
| * | | Fix a typo in a comment in v2 clientBalazs Gibizer2014-02-191-1/+1
| | |/ | |/| | | | | | | Change-Id: I835af00af62046e9a391a08e675bc6eeb7267824
* | | test_url_generation_with_proxy: do not use contextlib.nested()Cyril Roelandt2014-02-171-14/+9
|/ / | | | | | | | | | | | | This method does not exist in Python 3, use the "@mock.patch.object" decorator instead. Change-Id: Ic45fea1553320c61be284a9397b54fd32f7d30ef
* | Merge "Remove unused mock in v2/test_shell.py"Jenkins2014-02-151-1/+0
|\ \
| * | Remove unused mock in v2/test_shell.pyliu-sheng2014-02-111-1/+0
| | | | | | | | | | | | Change-Id: Ia2dd362bf30b527145635b1afd9c10bd0c2556b7
* | | Ensure url sent to proxy don't have redundant /Mehdi Abaakouk2014-02-132-1/+28
|/ / | | | | | | | | | | | | | | | | | | | | When a proxy is set, the url requested to the proxy have a double // after the domain, but for ceilometer this kind of url is not valid. So, this patch ensures the url have only one / Closes-bug: #1274981 Change-Id: Id6fc5cf7ab7a3866bc23af7102785a9cede593fe
* | Merge "Sync with Oslo"Jenkins2014-02-119-40/+26
|\ \
| * | Sync with OsloCyril Roelandt2014-02-109-40/+26
| |/ | | | | | | | | | | | | | | | | This fixes a bunch os Python3-related issues, linked to iteritems(), urllib, encoding, etc. This is now up-to-date with 6827012438c7c88e0f54803f33c612684cf34e86 in Oslo. Change-Id: Id8c265d76abfd8ede5575d3903f612ad1ea46643
* | Python 3: fix format_nested_list_of_dict()Cyril Roelandt2014-02-101-1/+1
|/ | | | | | | | In this function, we mean to add actual values, not a map object. In Python 2, map() did not return a map object, so this worked as expected, but not in Python3. Change-Id: Icc6467b7846d62c189765fdfd9dce1e30db7eb55
* Merge "Modify ceilometer client cmd line help info"1.0.9Jenkins2014-01-281-2/+2
|\
| * Modify ceilometer client cmd line help infoJia Dong2014-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | The optional argument "--insufficient-data-action" is described as "... URL to invoke when state transitions to insufficient_data...", it was " URL to invoke when state transitions to unkown. " Closes-Bug: #1260343 Change-Id: I34db56bb22b693e752a971f81d7b8467bfc6c4c5
* | Merge "Remove unused import for print_function"Jenkins2014-01-281-2/+0
|\ \
| * | Remove unused import for print_functionZhiQiang Fan2014-01-281-2/+0
| |/ | | | | | | | | | | | | | | A minor fix to https://review.openstack.org/#/c/69234/ which forgets to remove the unused 'from __future__ import print_function' after remove all print function. Change-Id: Iedc925a66fa4dec209cf34ce28b45f768f7bc81d
* | Merge "Update client to display data type of traits"Jenkins2014-01-283-7/+37
|\ \
| * | Update client to display data type of traitsJohn Herndon2014-01-243-7/+37
| | | | | | | | | | | | | | | | | | fixes bug 1268032 Change-Id: I47dfd3208fb3f7e5e5e2b33bd9b00c688d8283cd
* | | Merge "Raise traceback on error when using CLI and -debug"Jenkins2014-01-282-3/+30
|\ \ \ | |_|/ |/| |
| * | Raise traceback on error when using CLI and -debugChmouel Boudjnah2014-01-192-3/+30
| | | | | | | | | | | | | | | | | | | | | 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-272-8/+0
|\ \ \
| * | | Remove ununsed httplib2 requirementChmouel Boudjnah2014-01-272-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not needed anymore since the logging is handled by six.moves/httplib. Change-Id: I4de3cfd8d8d3c08b38e39fde12172bdb4de0cea0 Closes-Bug: 1272986
* | | | Merge "Remove print debugs statements."Jenkins2014-01-271-4/+0
|\ \ \ \ | | |/ / | |/| |
| * | | Remove print debugs statements.Chmouel Boudjnah2014-01-181-4/+0
| |/ / | | | | | | | | | Change-Id: I78a885ba98363ca309598294bc84604d05a55446
* | | Merge "return sample info when creating sample with CLI"Jenkins2014-01-272-1/+70
|\ \ \
| * | | return sample info when creating sample with CLIls11752014-01-232-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will return nothing after creating a sample successfully with ceilometer CLI. The information of the sample created should be return, like other creating commands, such as "ceilometer alarm-create". Change-Id: I60229fefa91de83e4b715cf4f92d3650e0a0d162 Closes-bug: #1267713
* | | | Merge "Using common methods from oslo cliutils"Jenkins2014-01-272-27/+15
|\ \ \ \
| * | | | Using common methods from oslo cliutilsJia Dong2014-01-242-27/+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
* | | | | Merge "Fix typos picked up by misspellings"Jenkins2014-01-272-2/+2
|\ \ \ \ \
| * | | | | Fix typos picked up by misspellingsZhiQiang Fan2014-01-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Joe Gordon has introduced a module named misspellings which can check typo automatically. $ pip install misspellings $ git ls-files | grep -v locale | misspellings -f - Change-Id: I9eca2e097b03468651814fa563e4380fd573205e ref: http://lists.openstack.org/pipermail/openstack-dev/2013-December/020975.html
* | | | | | Merge "Avoid discarding alarm-threshold-create --query option"Jenkins2014-01-243-3/+55
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Avoid discarding alarm-threshold-create --query optionEoghan Glynn2014-01-233-3/+55
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1271913 The query is crucial to the alarm evaluator statistics query being well-formed, so must not be discarded. Change-Id: I5ff8dcb420b932fc58dfef3dadfcbc4a4dc5cf66
* | | | | Merge "Add support for groupby in statistics for API v2"Jenkins2014-01-243-3/+62
|\ \ \ \ \
| * | | | | Add support for groupby in statistics for API v2Enol Fernandez2014-01-173-3/+62
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the groupby parameter to list method of Statistics and a new option "-g/--groupby" for the shell. Change-Id: I41cfa076bf73f8c01d4ee71cd70008ea231556c8 Closes-Bug: #1270094