| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
oslo.utils is released and corresponding code in oslo-incubator has
been removed.
Change-Id: Ic3a13380809a8b00c979e5ac405b4084f486a31d
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: I0aee668d9a19da76bb01646c87b3cd17418822e5
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
In the process of unification of the clients code we should
reuse common functionality from Oslo.
bp common-client-library-2
Change-Id: I0e027c33ee42b6de032d33269caeea33e7837f40
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently, the "--resource-metadata" in ceilometer sample-create command
is not easy to use. For compatibility, this patch just provides an
explicit help string for the parameter.
Change-Id: I6d68d5b653c3b33808cba6f9a781301fba9b44e3
Closes-Bug: #1324759
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In the Ceilometer storage backends implementation we are specially
sorting the alarm history points in the following way:
the first one by the timestamp should be the last one in the list.
The Python client itself provides the information in this way, but
the table printed had the opposite one, so this was fixed.
Change-Id: If39bb5868e360f37ed76c12b55fc71eade331f47
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make QueryManager.query arguments optional.
At this point we are forced to speicify all filter, orderby, limit
arguments as well to save order. So for example if I would like to get
only 20 records I have to write something like:
ceilometer.query_sample.query(None, None, 20)
instead of
ceilometer.query_sample.query(limit=20)
As this doesn't break backward compatibility it shouldn't be a
big deal to merge it.
Change-Id: I5d589b27cafabd22204585a76f107125b2f3c7bd
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The word "Copyright" alone is sufficient to claim copyright, the ©
need not be present.[1]
As per PEP 263, a Python file with non-ASCII characters must have a
line with "coding: <some-encoding>". Python files containing only
7-bit ASCII characters need no such line.[2]
This commit removes unnecessary Unicode copyright symbols and
unnecessary encoding lines.
[1]: http://www.copyright.gov/circs/circ03.pdf
[2]: http://legacy.python.org/dev/peps/pep-0263/
Change-Id: I6b43cc5ecfd0440e06b0aebd91ebb574b7f37a91
|
| |\ \ \ |
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
According to https://wiki.openstack.org/wiki/Python3 dict.iteritems()
should be replaced with six.iteritems(dict).
Change-Id: I52cc0e89c030d7b6bfc735239638b513410933c5
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
split_by_op was returning data against which further error checking was
then required. This change moves that error handling inside the method
and simplifies the regular expression so that it splits (greedily) on
the first operator it finds. If the split is not possible, it is
a ValueError. If the field or value are empty, that is a ValueError.
Both split_by_op and split_by_datatype were doing a findall() where
a match() and split() do the right job and more efficiently.
Regular expression compilation has been moved to the module level
to insure they need only be compiled once. Operator keys must be
sorted by length to ensure the point at which the split happens is
most greedy. Using a split keeps the regex short and removes any
statements about the left and right hand sides of the operator.
Tests added to cover the method more completely, including testing
for corner cases such as single character field or values or
operators showing up in unexpected locations. 'string' variable
renamed to 'query' and 'query_value' to avoid confusion. Named parameters
on string substitution for clarity.
Note that the tests which do self.assertRaises could more explicitly
check the exception with self.assertRaisesRegexp but that would
break compatibility with Python 2.6.
Change-Id: Icd815ff65aba9eae3f76afee3bb33e85d85bea72
Closes-Bug: #1314544
|
| |/
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
It should be ID instead of id - like in nearly all
other help strings. Also add missing "." to end of string and
use plural for one string.
Change-Id: I14c8c622978b206e092e56741ad5cc6885b2d118
Co-Authored-By: Summer Long <slong@redhat.com>
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
Replace insufficient_data to insufficient data in parameter
"--state" of alarm-create/alarm-combination-create/alarm-threshold-create
help sting.
Change-Id: Ica0ea14d19a3a6cac9491d5cbdc3be23b5c91b60
Closes-bug: #1290230
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| | |
command ceilometer trait-description-list is unavailable.
Change-Id: Ib6d03b11194d6a0bef190c815d948649ada6c260
Closes-Bug: #1284548
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We already support 'type' attribute for query, but the docstring for
build_url and cli_to_array don't refer to it.
And the urlencode with doseq=True will force filter parameters grouped
by name, so the sample in build_url docstring should be corrected too.
Change-Id: I2b526d9e23175b5378ea36e0a532052269c7f0c4
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The groupby parameter for statistics now handle single string as a
parameter. It fixes the bug where every characters of the string where
interpreted as a groupby value.
Change-Id: Ia763741d7ad5717be381b0ac2f0acb57e9f46cac
Closes-Bug: #1291935
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: Ie41d9a0be73a525ae105262fb5859960bf9f9df6
|
| |\ \ \ \
| |/ / / |
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: I3305d679d128562f7794a5cf460093981a601f7c
|
| |\ \ \ \ |
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \
| |_|/ /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adds command name instead of deprecated command to help message.
Change-Id: Ib6cbbcd24bbf015cf3656be9cbdf7de25d4d9cf7
|