From b6aab6658697016950309d1276fe0709be0c3fca Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 18 Nov 2013 16:33:40 +0100 Subject: [PATCH] Remove the collector submodule It's useless to have a submodule with just one service, simplify the hierarchy. Change-Id: I4c39ea74fc5cb59d487626b998eaed9c5cf30eff --- ceilometer/{collector/service.py => collector.py} | 0 ceilometer/collector/__init__.py | 0 ceilometer/publisher/udp.py | 2 +- .../tests/{collector/test_service.py => test_collector.py} | 7 ++----- etc/ceilometer/ceilometer.conf.sample | 2 +- setup.cfg | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) rename ceilometer/{collector/service.py => collector.py} (100%) delete mode 100644 ceilometer/collector/__init__.py rename ceilometer/tests/{collector/test_service.py => test_collector.py} (97%) diff --git a/ceilometer/collector/service.py b/ceilometer/collector.py similarity index 100% rename from ceilometer/collector/service.py rename to ceilometer/collector.py diff --git a/ceilometer/collector/__init__.py b/ceilometer/collector/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/ceilometer/publisher/udp.py b/ceilometer/publisher/udp.py index 537f9b9ba..9fe92fc6e 100644 --- a/ceilometer/publisher/udp.py +++ b/ceilometer/publisher/udp.py @@ -28,7 +28,7 @@ from ceilometer.openstack.common import log from ceilometer.openstack.common import network_utils from ceilometer import publisher -cfg.CONF.import_opt('udp_port', 'ceilometer.collector.service', +cfg.CONF.import_opt('udp_port', 'ceilometer.collector', group='collector') LOG = log.getLogger(__name__) diff --git a/ceilometer/tests/collector/test_service.py b/ceilometer/tests/test_collector.py similarity index 97% rename from ceilometer/tests/collector/test_service.py rename to ceilometer/tests/test_collector.py index 9f5bc49fa..e10a9e42b 100644 --- a/ceilometer/tests/collector/test_service.py +++ b/ceilometer/tests/test_collector.py @@ -15,9 +15,6 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -"""Tests for ceilometer/agent/service.py -""" - import socket import mock @@ -26,7 +23,7 @@ import msgpack from stevedore import extension from stevedore.tests import manager as test_manager -from ceilometer.collector import service +from ceilometer import collector from ceilometer.openstack.common.fixture import config from ceilometer import sample from ceilometer.tests import base as tests_base @@ -37,7 +34,7 @@ class TestCollector(tests_base.BaseTestCase): super(TestCollector, self).setUp() self.CONF = self.useFixture(config.Config()).conf self.CONF.set_override("connection", "log://", group='database') - self.srv = service.CollectorService('the-host', 'the-topic') + self.srv = collector.CollectorService('the-host', 'the-topic') self.counter = sample.Sample( name='foobar', type='bad', diff --git a/etc/ceilometer/ceilometer.conf.sample b/etc/ceilometer/ceilometer.conf.sample index 613172a47..bae6f727b 100644 --- a/etc/ceilometer/ceilometer.conf.sample +++ b/etc/ceilometer/ceilometer.conf.sample @@ -876,7 +876,7 @@ [collector] # -# Options defined in ceilometer.collector.service +# Options defined in ceilometer.collector # # address to bind the UDP socket todisabled if set to an empty diff --git a/setup.cfg b/setup.cfg index c2a026093..79fb300e4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -122,7 +122,7 @@ console_scripts = ceilometer-agent-notification = ceilometer.notification:agent ceilometer-dbsync = ceilometer.storage:dbsync ceilometer-expirer = ceilometer.storage:expirer - ceilometer-collector = ceilometer.collector.service:collector + ceilometer-collector = ceilometer.collector:collector ceilometer-alarm-evaluator = ceilometer.alarm.service:alarm_evaluator ceilometer-alarm-notifier = ceilometer.alarm.service:alarm_notifier