diff --git a/ceilometer/cmd/__init__.py b/ceilometer/cmd/__init__.py index 99efcc467..e69de29bb 100644 --- a/ceilometer/cmd/__init__.py +++ b/ceilometer/cmd/__init__.py @@ -1,22 +0,0 @@ -# -*- encoding: utf-8 -*- -# -# Copyright 2014 OpenStack Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import eventlet -# NOTE(jd) We need to monkey patch the socket and select module for, -# at least, oslo.messaging, otherwise everything's blocked on its -# first read() or select(), thread need to be patched too, because -# oslo.messaging use threading.local -eventlet.monkey_patch(socket=True, select=True, thread=True, time=True) diff --git a/ceilometer/cmd/eventlet/__init__.py b/ceilometer/cmd/eventlet/__init__.py new file mode 100644 index 000000000..99efcc467 --- /dev/null +++ b/ceilometer/cmd/eventlet/__init__.py @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +# +# Copyright 2014 OpenStack Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import eventlet +# NOTE(jd) We need to monkey patch the socket and select module for, +# at least, oslo.messaging, otherwise everything's blocked on its +# first read() or select(), thread need to be patched too, because +# oslo.messaging use threading.local +eventlet.monkey_patch(socket=True, select=True, thread=True, time=True) diff --git a/ceilometer/cmd/agent_notification.py b/ceilometer/cmd/eventlet/agent_notification.py similarity index 100% rename from ceilometer/cmd/agent_notification.py rename to ceilometer/cmd/eventlet/agent_notification.py diff --git a/ceilometer/cmd/alarm.py b/ceilometer/cmd/eventlet/alarm.py similarity index 100% rename from ceilometer/cmd/alarm.py rename to ceilometer/cmd/eventlet/alarm.py diff --git a/ceilometer/cmd/collector.py b/ceilometer/cmd/eventlet/collector.py similarity index 100% rename from ceilometer/cmd/collector.py rename to ceilometer/cmd/eventlet/collector.py diff --git a/ceilometer/cmd/polling.py b/ceilometer/cmd/eventlet/polling.py similarity index 100% rename from ceilometer/cmd/polling.py rename to ceilometer/cmd/eventlet/polling.py diff --git a/ceilometer/cmd/sample.py b/ceilometer/cmd/eventlet/sample.py similarity index 100% rename from ceilometer/cmd/sample.py rename to ceilometer/cmd/eventlet/sample.py diff --git a/ceilometer/cmd/storage.py b/ceilometer/cmd/eventlet/storage.py similarity index 100% rename from ceilometer/cmd/storage.py rename to ceilometer/cmd/eventlet/storage.py diff --git a/ceilometer/opts.py b/ceilometer/opts.py index 5060c7329..62c22429f 100644 --- a/ceilometer/opts.py +++ b/ceilometer/opts.py @@ -20,8 +20,7 @@ import ceilometer.alarm.service import ceilometer.api import ceilometer.api.app import ceilometer.api.controllers.v2.alarms -import ceilometer.cmd.alarm -import ceilometer.cmd.polling +import ceilometer.cmd.eventlet.polling import ceilometer.collector import ceilometer.compute.discovery import ceilometer.compute.notifications @@ -68,7 +67,7 @@ def list_opts(): ('DEFAULT', itertools.chain(ceilometer.agent.base.OPTS, ceilometer.api.app.OPTS, - ceilometer.cmd.polling.CLI_OPTS, + ceilometer.cmd.eventlet.polling.CLI_OPTS, ceilometer.compute.notifications.OPTS, ceilometer.compute.util.OPTS, ceilometer.compute.virt.inspector.OPTS, diff --git a/setup.cfg b/setup.cfg index a377db358..761a61960 100644 --- a/setup.cfg +++ b/setup.cfg @@ -328,18 +328,18 @@ paste.filter_factory = console_scripts = ceilometer-api = ceilometer.cmd.api:main - ceilometer-agent-central = ceilometer.cmd.polling:main_central - ceilometer-agent-compute = ceilometer.cmd.polling:main_compute - ceilometer-polling = ceilometer.cmd.polling:main - ceilometer-agent-notification = ceilometer.cmd.agent_notification:main - ceilometer-agent-ipmi = ceilometer.cmd.polling:main_ipmi - ceilometer-send-sample = ceilometer.cmd.sample:send_sample - ceilometer-dbsync = ceilometer.cmd.storage:dbsync - ceilometer-expirer = ceilometer.cmd.storage:expirer - ceilometer-rootwrap = oslo_rootwrap.cmd:main - ceilometer-collector = ceilometer.cmd.collector:main - ceilometer-alarm-evaluator = ceilometer.cmd.alarm:evaluator - ceilometer-alarm-notifier = ceilometer.cmd.alarm:notifier + ceilometer-agent-central = ceilometer.cmd.eventlet.polling:main_central + ceilometer-agent-compute = ceilometer.cmd.eventlet.polling:main_compute + ceilometer-polling = ceilometer.cmd.eventlet.polling:main + ceilometer-agent-notification = ceilometer.cmd.eventlet.agent_notification:main + ceilometer-agent-ipmi = ceilometer.cmd.eventlet.polling:main_ipmi + ceilometer-send-sample = ceilometer.cmd.eventlet.sample:send_sample + ceilometer-dbsync = ceilometer.cmd.eventlet.storage:dbsync + ceilometer-expirer = ceilometer.cmd.eventlet.storage:expirer + ceilometer-rootwrap = oslo_rootwrap.cmd.eventlet:main + ceilometer-collector = ceilometer.cmd.eventlet.collector:main + ceilometer-alarm-evaluator = ceilometer.cmd.eventlet.alarm:evaluator + ceilometer-alarm-notifier = ceilometer.cmd.eventlet.alarm:notifier ceilometer.dispatcher = database = ceilometer.dispatcher.database:DatabaseDispatcher