Browse Source

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
changes/80/334280/5
huangtianhua 5 years ago
parent
commit
8a4df57c37
  1. 4
      doc/source/developing_guides/pluginguide.rst
  2. 2
      doc/source/getting_started/on_devstack.rst
  3. 24
      etc/heat/templates/AWS_CloudWatch_Alarm.yaml
  4. 0
      heat/engine/resources/openstack/aodh/__init__.py
  5. 0
      heat/engine/resources/openstack/aodh/alarm.py
  6. 0
      heat/engine/resources/openstack/aodh/gnocchi/__init__.py
  7. 0
      heat/engine/resources/openstack/aodh/gnocchi/alarm.py
  8. 0
      heat/tests/openstack/aodh/__init__.py
  9. 2
      heat/tests/openstack/aodh/test_alarm.py
  10. 2
      heat/tests/openstack/aodh/test_gnocchi_alarm.py

4
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)

2
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::

24
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}]

0
heat/engine/resources/openstack/ceilometer/__init__.py → heat/engine/resources/openstack/aodh/__init__.py

0
heat/engine/resources/openstack/ceilometer/alarm.py → heat/engine/resources/openstack/aodh/alarm.py

0
heat/engine/resources/openstack/ceilometer/gnocchi/__init__.py → heat/engine/resources/openstack/aodh/gnocchi/__init__.py

0
heat/engine/resources/openstack/ceilometer/gnocchi/alarm.py → heat/engine/resources/openstack/aodh/gnocchi/alarm.py

0
heat/tests/openstack/ceilometer/__init__.py → heat/tests/openstack/aodh/__init__.py

2
heat/tests/openstack/ceilometer/test_ceilometer_alarm.py → 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

2
heat/tests/openstack/ceilometer/test_gnocchi_alarm.py → 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
Loading…
Cancel
Save