From 8a4df57c37de292745a24679507faa67fa7d022a Mon Sep 17 00:00:00 2001 From: huangtianhua Date: Mon, 27 Jun 2016 11:09:45 +0800 Subject: [PATCH] Change namespace 'ceilometer' to 'aodh' Change namespace of some files to '*aodh*' instead of '*ceilometer*'. Blueprint migrate-to-use-aodh-for-alarms Change-Id: I2c4d565ded5f9f7146b23479acd2702f976b8833 --- doc/source/developing_guides/pluginguide.rst | 4 ++-- doc/source/getting_started/on_devstack.rst | 2 +- etc/heat/templates/AWS_CloudWatch_Alarm.yaml | 24 +++++++++---------- .../{ceilometer => aodh}/__init__.py | 0 .../openstack/{ceilometer => aodh}/alarm.py | 0 .../{ceilometer => aodh}/gnocchi/__init__.py | 0 .../{ceilometer => aodh}/gnocchi/alarm.py | 0 .../{ceilometer => aodh}/__init__.py | 0 .../test_alarm.py} | 2 +- .../test_gnocchi_alarm.py | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) rename heat/engine/resources/openstack/{ceilometer => aodh}/__init__.py (100%) rename heat/engine/resources/openstack/{ceilometer => aodh}/alarm.py (100%) rename heat/engine/resources/openstack/{ceilometer => aodh}/gnocchi/__init__.py (100%) rename heat/engine/resources/openstack/{ceilometer => aodh}/gnocchi/alarm.py (100%) rename heat/tests/openstack/{ceilometer => aodh}/__init__.py (100%) rename heat/tests/openstack/{ceilometer/test_ceilometer_alarm.py => aodh/test_alarm.py} (99%) rename heat/tests/openstack/{ceilometer => aodh}/test_gnocchi_alarm.py (99%) diff --git a/doc/source/developing_guides/pluginguide.rst b/doc/source/developing_guides/pluginguide.rst index 46f9d43cf5..b7981e25c4 100644 --- a/doc/source/developing_guides/pluginguide.rst +++ b/doc/source/developing_guides/pluginguide.rst @@ -481,8 +481,8 @@ Delete For this to work for a particular resource, the `entity` and `default_client_name` attributes must be overridden in the resource - implementation. For example, `entity` of Ceilometer Alarm should equals - to "alarms" and `default_client_name` to "ceilometer". + implementation. For example, `entity` of Aodh Alarm should equals + to "alarm" and `default_client_name` to "aodh". .. py:function:: handle_delete_snapshot(self, snapshot) diff --git a/doc/source/getting_started/on_devstack.rst b/doc/source/getting_started/on_devstack.rst index 8ea0469027..8167888246 100644 --- a/doc/source/getting_started/on_devstack.rst +++ b/doc/source/getting_started/on_devstack.rst @@ -50,7 +50,7 @@ heat processes will be launched in `screen` with the labels prefixed with `h-`. Configure DevStack to enable ceilometer and aodh (if using alarms) ------------------------------------------------------------------ -To use ceilometer alarms you need to enable ceilometer and aodh in devstack. +To use aodh alarms you need to enable ceilometer and aodh in devstack. Adding the following lines to `[[local|localrc]]` section of `local.conf` will enable the services:: diff --git a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml index f3ee6be6af..ccc10707d3 100644 --- a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml +++ b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml @@ -1,5 +1,5 @@ HeatTemplateFormatVersion: '2012-12-12' -Description: AWS::CloudWatch::Alarm using Ceilometer. +Description: AWS::CloudWatch::Alarm using Aodh. Parameters: AlarmDescription: Type: String @@ -47,16 +47,16 @@ Parameters: Mappings: ComparisonOperatorMap: - LessThanOrEqualToThreshold: {Ceilometer: le} - LessThanThreshold: {Ceilometer: lt} - GreaterThanThreshold: {Ceilometer: gt} - GreaterThanOrEqualToThreshold: {Ceilometer: ge} + LessThanOrEqualToThreshold: {Aodh: le} + LessThanThreshold: {Aodh: lt} + GreaterThanThreshold: {Aodh: gt} + GreaterThanOrEqualToThreshold: {Aodh: ge} StatisticMap: - SampleCount: {Ceilometer: count} - Average: {Ceilometer: avg} - Sum: {Ceilometer: sum} - Minimum: {Ceilometer: min} - Maximum: {Ceilometer: max} + SampleCount: {Aodh: count} + Average: {Aodh: avg} + Sum: {Aodh: sum} + Minimum: {Aodh: min} + Maximum: {Aodh: max} Resources: __alarm__: @@ -80,8 +80,8 @@ Resources: insufficient_data_actions: Ref: InsufficientDataActions statistic: - "Fn::FindInMap": [StatisticMap, {Ref: Statistic}, Ceilometer] + "Fn::FindInMap": [StatisticMap, {Ref: Statistic}, Aodh] comparison_operator: - "Fn::FindInMap": [ComparisonOperatorMap, {Ref: ComparisonOperator}, Ceilometer] + "Fn::FindInMap": [ComparisonOperatorMap, {Ref: ComparisonOperator}, Aodh] matching_metadata: "Fn::MemberListToMap": [Name, Value, {Ref: Dimensions}] diff --git a/heat/engine/resources/openstack/ceilometer/__init__.py b/heat/engine/resources/openstack/aodh/__init__.py similarity index 100% rename from heat/engine/resources/openstack/ceilometer/__init__.py rename to heat/engine/resources/openstack/aodh/__init__.py diff --git a/heat/engine/resources/openstack/ceilometer/alarm.py b/heat/engine/resources/openstack/aodh/alarm.py similarity index 100% rename from heat/engine/resources/openstack/ceilometer/alarm.py rename to heat/engine/resources/openstack/aodh/alarm.py diff --git a/heat/engine/resources/openstack/ceilometer/gnocchi/__init__.py b/heat/engine/resources/openstack/aodh/gnocchi/__init__.py similarity index 100% rename from heat/engine/resources/openstack/ceilometer/gnocchi/__init__.py rename to heat/engine/resources/openstack/aodh/gnocchi/__init__.py diff --git a/heat/engine/resources/openstack/ceilometer/gnocchi/alarm.py b/heat/engine/resources/openstack/aodh/gnocchi/alarm.py similarity index 100% rename from heat/engine/resources/openstack/ceilometer/gnocchi/alarm.py rename to heat/engine/resources/openstack/aodh/gnocchi/alarm.py diff --git a/heat/tests/openstack/ceilometer/__init__.py b/heat/tests/openstack/aodh/__init__.py similarity index 100% rename from heat/tests/openstack/ceilometer/__init__.py rename to heat/tests/openstack/aodh/__init__.py diff --git a/heat/tests/openstack/ceilometer/test_ceilometer_alarm.py b/heat/tests/openstack/aodh/test_alarm.py similarity index 99% rename from heat/tests/openstack/ceilometer/test_ceilometer_alarm.py rename to heat/tests/openstack/aodh/test_alarm.py index 8626c0e6f9..af503c7815 100644 --- a/heat/tests/openstack/ceilometer/test_ceilometer_alarm.py +++ b/heat/tests/openstack/aodh/test_alarm.py @@ -22,7 +22,7 @@ from heat.common import exception from heat.common import template_format from heat.engine.clients.os import aodh from heat.engine.clients.os import ceilometer -from heat.engine.resources.openstack.ceilometer import alarm +from heat.engine.resources.openstack.aodh import alarm from heat.engine import rsrc_defn from heat.engine import scheduler from heat.engine import stack as parser diff --git a/heat/tests/openstack/ceilometer/test_gnocchi_alarm.py b/heat/tests/openstack/aodh/test_gnocchi_alarm.py similarity index 99% rename from heat/tests/openstack/ceilometer/test_gnocchi_alarm.py rename to heat/tests/openstack/aodh/test_gnocchi_alarm.py index 58f2fcaa22..d7b68bd63d 100644 --- a/heat/tests/openstack/ceilometer/test_gnocchi_alarm.py +++ b/heat/tests/openstack/aodh/test_gnocchi_alarm.py @@ -17,7 +17,7 @@ import mox from heat.common import exception from heat.common import template_format from heat.engine.clients.os import aodh -from heat.engine.resources.openstack.ceilometer.gnocchi import ( +from heat.engine.resources.openstack.aodh.gnocchi import ( alarm as gnocchi) from heat.engine import scheduler from heat.tests import common