Migrate to aodh for OS::Ceilometer::Alarm
This changes:
1. use aodhclient to manage OS::Ceilometer::Alarm
resource, including create, update, delete, check, suspend,
resume and show.
2. rename OS::Ceilometer::Alarm to OS::Aodh::Alarm
3. considering to compatible with old templates with resource
OS::Ceilometer::Alarm, set resource_registry to map Ceilometer alarm
to Aodh alarm
Blueprint migrate-to-use-aodh-for-alarms
Change-Id: I6e2d14f15a345b927b53adc237cf2bf4010842f0
diff --git a/common/config.py b/common/config.py
index e0351d5..b3615d2 100644
--- a/common/config.py
+++ b/common/config.py
@@ -121,7 +121,7 @@
cfg.ListOpt('skip_scenario_test_list',
help="List of scenario test class or class.method "
"names to skip ex. NeutronLoadBalancerTest, "
- "CeilometerAlarmTest.test_alarm"),
+ "AodhAlarmTest.test_alarm"),
cfg.ListOpt('skip_test_stack_action_list',
help="List of stack actions in tests to skip "
"ex. ABANDON, ADOPT, SUSPEND, RESUME"),
diff --git a/scenario/templates/test_ceilometer_alarm.yaml b/scenario/templates/test_aodh_alarm.yaml
similarity index 96%
rename from scenario/templates/test_ceilometer_alarm.yaml
rename to scenario/templates/test_aodh_alarm.yaml
index 01bc790..9218f56 100644
--- a/scenario/templates/test_ceilometer_alarm.yaml
+++ b/scenario/templates/test_aodh_alarm.yaml
@@ -15,7 +15,7 @@
cooldown: 0
scaling_adjustment: 1
alarm:
- type: OS::Ceilometer::Alarm
+ type: OS::Aodh::Alarm
properties:
description: Scale-up if the average CPU > 50% for 1 minute
meter_name: test_meter
diff --git a/scenario/test_ceilometer_alarm.py b/scenario/test_aodh_alarm.py
similarity index 89%
rename from scenario/test_ceilometer_alarm.py
rename to scenario/test_aodh_alarm.py
index aa29861..90288a2 100644
--- a/scenario/test_ceilometer_alarm.py
+++ b/scenario/test_aodh_alarm.py
@@ -18,12 +18,12 @@
LOG = logging.getLogger(__name__)
-class CeilometerAlarmTest(scenario_base.ScenarioTestsBase):
- """Class is responsible for testing of ceilometer usage."""
+class AodhAlarmTest(scenario_base.ScenarioTestsBase):
+ """Class is responsible for testing of aodh usage."""
def setUp(self):
- super(CeilometerAlarmTest, self).setUp()
+ super(AodhAlarmTest, self).setUp()
self.template = self._load_template(__file__,
- 'test_ceilometer_alarm.yaml',
+ 'test_aodh_alarm.yaml',
'templates')
def check_instance_count(self, stack_identifier, expected):