From c60a60614b9bd1182c85e6e9df0a84f60c5ee946 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Fri, 23 Aug 2013 16:30:12 +1000 Subject: [PATCH] Rename OS::Metering::Alarm to OS::Ceilometer::Alarm The other resources are named by project so this is to try and be more consistent. There is a mapping to allow the original name to work. Change-Id: If60cc577a5a770bdaada70c7eae1ae3fc1776056 --- etc/heat/environment.d/default.yaml | 1 + etc/heat/templates/AWS_CloudWatch_Alarm.yaml | 2 +- heat/engine/resources/ceilometer/alarm.py | 2 +- heat/tests/test_ceilometer_alarm.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/heat/environment.d/default.yaml b/etc/heat/environment.d/default.yaml index 678f888f4..1f4c848a6 100644 --- a/etc/heat/environment.d/default.yaml +++ b/etc/heat/environment.d/default.yaml @@ -5,3 +5,4 @@ resource_registry: # Choose your implementation of AWS::CloudWatch::Alarm #"AWS::CloudWatch::Alarm": "file:///etc/heat/templates/AWS_CloudWatch_Alarm.yaml" "AWS::CloudWatch::Alarm": "OS::Heat::CWLiteAlarm" + "OS::Metering::Alarm": "OS::Ceilometer::Alarm" diff --git a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml index 1f8fea96d..bfdf565e3 100644 --- a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml +++ b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml @@ -59,7 +59,7 @@ Mappings: Resources: __alarm__: - Type: OS::Metering::Alarm + Type: OS::Ceilometer::Alarm Properties: description: Ref: AlarmDescription diff --git a/heat/engine/resources/ceilometer/alarm.py b/heat/engine/resources/ceilometer/alarm.py index 646fd8d7b..487a56b75 100644 --- a/heat/engine/resources/ceilometer/alarm.py +++ b/heat/engine/resources/ceilometer/alarm.py @@ -130,5 +130,5 @@ class CeilometerAlarm(resource.Resource): def resource_mapping(): return { - 'OS::Metering::Alarm': CeilometerAlarm, + 'OS::Ceilometer::Alarm': CeilometerAlarm, } diff --git a/heat/tests/test_ceilometer_alarm.py b/heat/tests/test_ceilometer_alarm.py index 141df1fcc..9261720a2 100644 --- a/heat/tests/test_ceilometer_alarm.py +++ b/heat/tests/test_ceilometer_alarm.py @@ -44,7 +44,7 @@ alarm_template = ''' "Parameters" : {}, "Resources" : { "MEMAlarmHigh": { - "Type": "OS::Metering::Alarm", + "Type": "OS::Ceilometer::Alarm", "Properties": { "description": "Scale-up if MEM > 50% for 1 minute", "counter_name": "MemoryUtilization",