summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/heat/templates/AWS_CloudWatch_Alarm.yaml2
-rw-r--r--heat/engine/resources/ceilometer/alarm.py10
-rw-r--r--heat/engine/watchrule.py10
-rw-r--r--heat/tests/test_ceilometer_alarm.py4
-rw-r--r--requirements.txt2
5 files changed, 14 insertions, 14 deletions
diff --git a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml
index bfdf565e3..79f020dc5 100644
--- a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml
+++ b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml
@@ -63,7 +63,7 @@ Resources:
Properties:
description:
Ref: AlarmDescription
- counter_name:
+ meter_name:
Ref: MetricName
period:
Ref: Period
diff --git a/heat/engine/resources/ceilometer/alarm.py b/heat/engine/resources/ceilometer/alarm.py
index 60a2aeab2..9f08f65ac 100644
--- a/heat/engine/resources/ceilometer/alarm.py
+++ b/heat/engine/resources/ceilometer/alarm.py
@@ -33,10 +33,10 @@ class CeilometerAlarm(resource.Resource):
'Required': True,
'Description': _('Number of periods to evaluate over')
},
- 'counter_name': {
+ 'meter_name': {
'Type': 'String',
'Required': True,
- 'Description': _('Counter name watched by the alarm')
+ 'Description': _('Meter name watched by the alarm')
},
'period': {
'Type': 'String',
@@ -47,7 +47,7 @@ class CeilometerAlarm(resource.Resource):
'Type': 'String',
'Required': True,
'AllowedValues': ['count', 'avg', 'sum', 'min', 'max'],
- 'Description': _('Counter statistic to evaluate')
+ 'Description': _('Meter statistic to evaluate')
},
'threshold': {
'Type': 'String',
@@ -89,8 +89,8 @@ class CeilometerAlarm(resource.Resource):
},
'matching_metadata': {
'Type': 'Map',
- 'Description': _('Counter should match this resource metadata '
- '(key=value) additionally to the counter_name')
+ 'Description': _('Meter should match this resource metadata '
+ '(key=value) additionally to the meter_name')
}
}
diff --git a/heat/engine/watchrule.py b/heat/engine/watchrule.py
index b9316b8c3..e1a01c53e 100644
--- a/heat/engine/watchrule.py
+++ b/heat/engine/watchrule.py
@@ -268,14 +268,14 @@ class WatchRule(object):
from heat.engine import clients
clients = clients.Clients(self.context)
sample = {}
- sample['counter_type'] = 'gauge'
+ sample['meter_type'] = 'gauge'
for k, d in iter(data.items()):
if k == 'Namespace':
continue
- sample['counter_name'] = k
- sample['counter_volume'] = d['Value']
- sample['counter_unit'] = d['Unit']
+ sample['meter_name'] = k
+ sample['sample_volume'] = d['Value']
+ sample['meter_unit'] = d['Unit']
dims = d.get('Dimensions', {})
if isinstance(dims, list):
dims = dims[0]
@@ -357,7 +357,7 @@ def rule_can_use_sample(wr, stats_data):
if wr.state == WatchRule.SUSPENDED:
return False
if wr.state == WatchRule.CEILOMETER_CONTROLLED:
- metric = wr.rule['counter_name']
+ metric = wr.rule['meter_name']
rule_dims = {}
for k, v in iter(wr.rule.get('matching_metadata', {}).items()):
name = k.split('.')[-1]
diff --git a/heat/tests/test_ceilometer_alarm.py b/heat/tests/test_ceilometer_alarm.py
index 84ef61569..514279711 100644
--- a/heat/tests/test_ceilometer_alarm.py
+++ b/heat/tests/test_ceilometer_alarm.py
@@ -46,7 +46,7 @@ alarm_template = '''
"Type": "OS::Ceilometer::Alarm",
"Properties": {
"description": "Scale-up if MEM > 50% for 1 minute",
- "counter_name": "MemoryUtilization",
+ "meter_name": "MemoryUtilization",
"statistic": "avg",
"period": "60",
"evaluation_periods": "1",
@@ -187,7 +187,7 @@ class CeilometerAlarmTest(HeatTestCase):
rsrc = self.stack['MEMAlarmHigh']
snippet = copy.deepcopy(rsrc.parsed_template())
- snippet['Properties']['counter_name'] = 'temp'
+ snippet['Properties']['meter_name'] = 'temp'
updater = scheduler.TaskRunner(rsrc.update, snippet)
self.assertRaises(resource.UpdateReplace, updater)
diff --git a/requirements.txt b/requirements.txt
index 214915607..9a10a49b0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -18,7 +18,7 @@ WebOb>=1.2.3,<1.3
python-keystoneclient>=0.3.2
python-swiftclient>=1.2
python-neutronclient>=2.3.0,<3
-python-ceilometerclient>=1.0.3
+python-ceilometerclient>=1.0.5
python-cinderclient>=1.0.4
PyYAML>=3.1.0
paramiko>=1.8.0