diff --git a/ceilometer/pipeline.py b/ceilometer/pipeline.py index 37c8209033..1d22525614 100644 --- a/ceilometer/pipeline.py +++ b/ceilometer/pipeline.py @@ -871,13 +871,7 @@ class PollingManager(ConfigManagerBase): """ super(PollingManager, self).__init__(conf) - try: - cfg = self.load_config(cfg_file) - except (TypeError, IOError): - LOG.warning('Using the pipeline configuration for polling ' - 'is deprecated. %s should ' - 'be used instead.', cfg_file) - cfg = self.load_config(conf.pipeline_cfg_file) + cfg = self.load_config(cfg_file) self.sources = [] if 'sources' not in cfg: raise PollingException("sources required", cfg) diff --git a/ceilometer/tests/unit/agent/agentbase.py b/ceilometer/tests/unit/agent/agentbase.py index 3683c8f23a..ee0aead396 100644 --- a/ceilometer/tests/unit/agent/agentbase.py +++ b/ceilometer/tests/unit/agent/agentbase.py @@ -19,13 +19,10 @@ import abc import copy import datetime -import os -import tempfile import mock import six from stevedore import extension -import yaml from ceilometer.agent import plugin_base from ceilometer import pipeline @@ -362,33 +359,6 @@ class BaseAgentManagerTestCase(base.BaseTestCase): self.addCleanup(mgr.terminate) mgr.create_polling_task.assert_called_once_with() - def test_agent_manager_start_fallback(self): - pipeline_cfg = { - 'sources': [{ - 'name': 'test_pipeline', - 'interval': 60, - 'meters': ['test'], - 'resources': ['test://'], - 'sinks': ['test_sink']}], - 'sinks': [{ - 'name': 'test_sink', - 'transformers': [], - 'publishers': ["test"]}] - } - tmp_cfg = tempfile.NamedTemporaryFile(mode='w', delete=False) - tmp_cfg.write(yaml.safe_dump(pipeline_cfg)) - tmp_cfg.close() - self.CONF.set_override('pipeline_cfg_file', tmp_cfg.name) - self.CONF.set_override('cfg_file', None, group='polling') - - mgr = self.create_manager() - mgr.extensions = self.mgr.extensions - mgr.create_polling_task = mock.MagicMock() - mgr.run() - self.addCleanup(mgr.terminate) - self.addCleanup(os.unlink, tmp_cfg.name) - mgr.create_polling_task.assert_called_once_with() - def test_manager_exception_persistency(self): self.polling_cfg['sources'].append({ 'name': 'test_polling_1', diff --git a/releasenotes/notes/pipeline-fallback-polling-3d962a0fff49ccdd.yaml b/releasenotes/notes/pipeline-fallback-polling-3d962a0fff49ccdd.yaml new file mode 100644 index 0000000000..a1d7c5d383 --- /dev/null +++ b/releasenotes/notes/pipeline-fallback-polling-3d962a0fff49ccdd.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The deprecated support of configure polling in the `pipeline.yaml` file has + been removed. Ceilometer now only uses the `polling.yaml` file for polling + configuration.