<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-ceilometerclient.git/ceilometerclient/common/utils.py, branch 2.2.0</title>
<subtitle>opendev.org: openstack/python-ceilometerclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/'/>
<entry>
<title>Drop use of 'oslo' namespace package</title>
<updated>2015-06-03T14:37:50+00:00</updated>
<author>
<name>Doug Hellmann</name>
<email>doug@doughellmann.com</email>
</author>
<published>2015-05-06T19:02:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=1212640c86015b777a2d4f4fb2b5f4007ee750f9'/>
<id>1212640c86015b777a2d4f4fb2b5f4007ee750f9</id>
<content type='text'>
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: I1f539cf9f5d6f48e10cac381c13eeb5fa314abd4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: I1f539cf9f5d6f48e10cac381c13eeb5fa314abd4
</pre>
</div>
</content>
</entry>
<entry>
<title>Use oslo_utils instead of deprecated oslo.utils</title>
<updated>2015-05-11T14:22:46+00:00</updated>
<author>
<name>Dina Belova</name>
<email>dbelova@mirantis.com</email>
</author>
<published>2015-01-12T11:07:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=4aad219818518f1eb5cc0847c9f7e96e7244e149'/>
<id>4aad219818518f1eb5cc0847c9f7e96e7244e149</id>
<content type='text'>
Change-Id: Ie4c55f33d18294924701032031cf78539ee3b23b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ie4c55f33d18294924701032031cf78539ee3b23b
</pre>
</div>
</content>
</entry>
<entry>
<title>Support unicode for alarm</title>
<updated>2015-02-06T01:14:13+00:00</updated>
<author>
<name>ZhiQiang Fan</name>
<email>zhiqiang.fan@huawei.com</email>
</author>
<published>2015-01-19T06:52:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=f1f452405a80884c7a9cd78cad4aa4d73e290745'/>
<id>f1f452405a80884c7a9cd78cad4aa4d73e290745</id>
<content type='text'>
We're using ceilometer.common.utils.print_dict() for displaying alarm,
but assume only contain ascii characters, which will cause UnicodeEncodeError
when alarm's name or description has unicode characters.

The oslo-incubator.cliutils.print_dict() is more friendly to unicode,
but it has no sort option, and has different line wrap strategy. Since
the upstream improvement can be low progress, this patch adds unicode
support based on current code.

Change-Id: Ia58d5813c6f80cb8b44bf7636e1efc0cdd6e6d5b
Closes-Bug: #1412300
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're using ceilometer.common.utils.print_dict() for displaying alarm,
but assume only contain ascii characters, which will cause UnicodeEncodeError
when alarm's name or description has unicode characters.

The oslo-incubator.cliutils.print_dict() is more friendly to unicode,
but it has no sort option, and has different line wrap strategy. Since
the upstream improvement can be low progress, this patch adds unicode
support based on current code.

Change-Id: Ia58d5813c6f80cb8b44bf7636e1efc0cdd6e6d5b
Closes-Bug: #1412300
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Sample API support</title>
<updated>2015-02-05T03:17:02+00:00</updated>
<author>
<name>ZhiQiang Fan</name>
<email>aji.zqfan@gmail.com</email>
</author>
<published>2014-11-02T02:25:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=1831bc1160f65e13e1bc0a8b72bbe2a1f4c8dfd0'/>
<id>1831bc1160f65e13e1bc0a8b72bbe2a1f4c8dfd0</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow all pep8 checks</title>
<updated>2015-01-12T10:55:29+00:00</updated>
<author>
<name>Dina Belova</name>
<email>dbelova@mirantis.com</email>
</author>
<published>2015-01-12T10:52:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=00f9e3f3a032caef21be6e4d50749e3ab403ba56'/>
<id>00f9e3f3a032caef21be6e4d50749e3ab403ba56</id>
<content type='text'>
Fix H405 pep8 issue. H904 issue check was ignored, although
there were no places in client code violating this rule.

Change-Id: If3b84eb8abb03511d7f77cabfa2955f472a60f23
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix H405 pep8 issue. H904 issue check was ignored, although
there were no places in client code violating this rule.

Change-Id: If3b84eb8abb03511d7f77cabfa2955f472a60f23
</pre>
</div>
</content>
</entry>
<entry>
<title>Alarm TimeConstraint display incorrect</title>
<updated>2014-11-25T22:44:51+00:00</updated>
<author>
<name>Rohit Jaiswal</name>
<email>rohit.jaiswal@hp.com</email>
</author>
<published>2014-11-21T19:58:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=5fd0b4102a6a8f4e510534e67d0db4d9ab9639bc'/>
<id>5fd0b4102a6a8f4e510534e67d0db4d9ab9639bc</id>
<content type='text'>
Added test case for print_dict function

Change-Id: I3ab8a4e25f946b409ede2a598a5b9cf8593a044e
Closes-Bug: #1395110
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added test case for print_dict function

Change-Id: I3ab8a4e25f946b409ede2a598a5b9cf8593a044e
Closes-Bug: #1395110
</pre>
</div>
</content>
</entry>
<entry>
<title>switch to oslo.utils</title>
<updated>2014-09-29T19:38:56+00:00</updated>
<author>
<name>gordon chung</name>
<email>gord@live.ca</email>
</author>
<published>2014-09-29T15:29:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=5aa2a69f36c1738d9cc24470e81651732f180859'/>
<id>5aa2a69f36c1738d9cc24470e81651732f180859</id>
<content type='text'>
oslo.utils is released and corresponding code in oslo-incubator has
been removed.

Change-Id: Ic3a13380809a8b00c979e5ac405b4084f486a31d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
oslo.utils is released and corresponding code in oslo-incubator has
been removed.

Change-Id: Ic3a13380809a8b00c979e5ac405b4084f486a31d
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix hacking rules: H302,H305,H307,H402</title>
<updated>2014-06-11T09:32:16+00:00</updated>
<author>
<name>ZhiQiang Fan</name>
<email>zhiqiang.fan@huawei.com</email>
</author>
<published>2014-06-11T08:32:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=55227d6d32deb49b9a8728d217eece9d4ecfeedc'/>
<id>55227d6d32deb49b9a8728d217eece9d4ecfeedc</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix exception handling of CLI</title>
<updated>2014-05-23T03:02:18+00:00</updated>
<author>
<name>liu-sheng</name>
<email>liusheng@huawei.com</email>
</author>
<published>2014-05-21T08:40:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=cb11c9bb3dd9781e6b3066c0db04667c8175db31'/>
<id>cb11c9bb3dd9781e6b3066c0db04667c8175db31</id>
<content type='text'>
Because exc.Unauthorized exception has been removed for commit
"Remove out-dated exceptions"(https://review.openstack.org/#/c/93852/).
but it still in use in ceilometerclient.shell.CeilometerShell#main().
This patch replace exc.Unauthorized with exc.HTTPUnauthorized.
And other three places of exc.NotFound are in use too.

Change-Id: I3e010db20cb6f6636126cceed5c62a9817213739
Closes-bug: #1321649
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because exc.Unauthorized exception has been removed for commit
"Remove out-dated exceptions"(https://review.openstack.org/#/c/93852/).
but it still in use in ceilometerclient.shell.CeilometerShell#main().
This patch replace exc.Unauthorized with exc.HTTPUnauthorized.
And other three places of exc.NotFound are in use too.

Change-Id: I3e010db20cb6f6636126cceed5c62a9817213739
Closes-bug: #1321649
</pre>
</div>
</content>
</entry>
<entry>
<title>Adds alarm time constraint support to ceilometer CLI</title>
<updated>2014-03-26T08:24:56+00:00</updated>
<author>
<name>Uros Jovanovic</name>
<email>uros.jovanovic@gmail.com</email>
</author>
<published>2014-03-05T18:49:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=7146571b702579fa1367598ab278ca2f8ec1e156'/>
<id>7146571b702579fa1367598ab278ca2f8ec1e156</id>
<content type='text'>
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:

&gt; 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 |
+--------------------------------------+-------+-------------------+---------+------------+----------------------------+--------------------------------------------------------------+

&gt; 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                                      |
+---------------------------+-----------------------------------------------------------------------+

&gt; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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:

&gt; 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 |
+--------------------------------------+-------+-------------------+---------+------------+----------------------------+--------------------------------------------------------------+

&gt; 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                                      |
+---------------------------+-----------------------------------------------------------------------+

&gt; 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
</pre>
</div>
</content>
</entry>
</feed>
