summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMehdi Abaakouk <sileht@redhat.com>2015-09-23 15:17:29 +0200
committerMehdi Abaakouk <sileht@redhat.com>2015-09-23 15:17:29 +0200
commitfa21fc6bf5d246a13507ddc0b68e5677796ec582 (patch)
tree5d9b7090432c308a7b17ac2dc7e07dab58268476
parent0582e9f7e0b60e3e9bd51070bef8ca4e23423a15 (diff)
downloadpython-ceilometerclient-fa21fc6bf5d246a13507ddc0b68e5677796ec582.tar.gz
Add statistic in rule information
This change displays the 'statistic' of an threshold rule. When the detail of rule is asked. Change-Id: I59d5a9603b7666da87d734a95c0ada758ae24ad3 Closes-bug: #1498901
-rw-r--r--ceilometerclient/v2/shell.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ceilometerclient/v2/shell.py b/ceilometerclient/v2/shell.py
index d16797a..9bf6176 100644
--- a/ceilometerclient/v2/shell.py
+++ b/ceilometerclient/v2/shell.py
@@ -299,11 +299,12 @@ def _display_alarm_list(alarms, sortby=None):
def _display_rule(type, rule):
if type == 'threshold':
- return ('%(meter_name)s %(comparison_operator)s '
+ return ('%(statistic)s(%(meter_name)s) %(comparison_operator)s '
'%(threshold)s during %(evaluation_periods)s x %(period)ss' %
{
'meter_name': rule['meter_name'],
'threshold': rule['threshold'],
+ 'statistic': rule['statistic'],
'evaluation_periods': rule['evaluation_periods'],
'period': rule['period'],
'comparison_operator': OPERATORS_STRING.get(