From 75a80ca0b51193465e1241e863e5a78245347943 Mon Sep 17 00:00:00 2001 From: Ildiko Vancsa Date: Fri, 3 Apr 2015 09:57:37 +0200 Subject: [PATCH] Use old name of 'hardware.ipmi.node.temperature' Use old name of the 'hardware.ipmi.node.temperature' as currently there is no proper deprecation process for meters. DocImpact Partially Closes-Bug: #1439766 Change-Id: Ic71bcda4008f1b4090e0d9c8908201440abb02a4 --- ceilometer/ipmi/pollsters/node.py | 6 +++++- ceilometer/tests/agent/test_manager.py | 2 +- setup.cfg | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ceilometer/ipmi/pollsters/node.py b/ceilometer/ipmi/pollsters/node.py index cc833ebab..63b973712 100644 --- a/ceilometer/ipmi/pollsters/node.py +++ b/ceilometer/ipmi/pollsters/node.py @@ -95,7 +95,11 @@ class _Base(plugin_base.PollsterBase): class InletTemperaturePollster(_Base): - NAME = "hardware.ipmi.node.inlet_temperature" + # Note(ildikov): The new meter name should be + # "hardware.ipmi.node.inlet_temperature". As currently there + # is no meter deprecation support in the code, we should use the + # old name in order to avoid confusion. + NAME = "hardware.ipmi.node.temperature" TYPE = sample.TYPE_GAUGE UNIT = "C" diff --git a/ceilometer/tests/agent/test_manager.py b/ceilometer/tests/agent/test_manager.py index 767d453fe..ff928ae16 100644 --- a/ceilometer/tests/agent/test_manager.py +++ b/ceilometer/tests/agent/test_manager.py @@ -76,7 +76,7 @@ class TestManager(base.BaseTestCase): err_msg = 'Skip loading extension for hardware.ipmi.node.%s' pollster_names = [ - 'power', 'inlet_temperature', 'outlet_temperature', + 'power', 'temperature', 'outlet_temperature', 'airflow', 'cups', 'cpu_util', 'mem_util', 'io_util'] calls = [mock.call(err_msg % n) for n in pollster_names] LOG.error.assert_has_calls(calls=calls, diff --git a/setup.cfg b/setup.cfg index 16cce4a9a..5c18a062b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -150,7 +150,7 @@ ceilometer.poll.compute = ceilometer.poll.ipmi = hardware.ipmi.node.power = ceilometer.ipmi.pollsters.node:PowerPollster - hardware.ipmi.node.inlet_temperature = ceilometer.ipmi.pollsters.node:InletTemperaturePollster + hardware.ipmi.node.temperature = ceilometer.ipmi.pollsters.node:InletTemperaturePollster hardware.ipmi.node.outlet_temperature = ceilometer.ipmi.pollsters.node:OutletTemperaturePollster hardware.ipmi.node.airflow = ceilometer.ipmi.pollsters.node:AirflowPollster hardware.ipmi.node.cups = ceilometer.ipmi.pollsters.node:CUPSIndexPollster