summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xopenstack/common/rootwrap/cmd.py (renamed from bin/oslo-rootwrap)2
-rwxr-xr-xopenstack/common/rpc/zmq_receiver.py (renamed from bin/oslo-rpc-zmq-receiver)12
-rw-r--r--setup.py4
-rw-r--r--tests/unit/rpc/test_zmq.py2
-rw-r--r--update.py1
5 files changed, 6 insertions, 15 deletions
diff --git a/bin/oslo-rootwrap b/openstack/common/rootwrap/cmd.py
index 3acbe7d..92552f1 100755
--- a/bin/oslo-rootwrap
+++ b/openstack/common/rootwrap/cmd.py
@@ -61,7 +61,7 @@ def _exit_error(execname, message, errorcode, log=True):
sys.exit(errorcode)
-if __name__ == '__main__':
+def main():
# Split arguments, require at least a command
execname = sys.argv.pop(0)
if len(sys.argv) < 2:
diff --git a/bin/oslo-rpc-zmq-receiver b/openstack/common/rpc/zmq_receiver.py
index 94092b7..e74da22 100755
--- a/bin/oslo-rpc-zmq-receiver
+++ b/openstack/common/rpc/zmq_receiver.py
@@ -19,17 +19,8 @@ import eventlet
eventlet.monkey_patch()
import contextlib
-import os
import sys
-# If ../oslo/__init__.py exists, add ../ to Python search path, so that
-# it will override what happens to be installed in /usr/(local/)lib/python...
-POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
- os.pardir,
- os.pardir))
-if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'oslo', '__init__.py')):
- sys.path.insert(0, POSSIBLE_TOPDIR)
-
from oslo.config import cfg
from openstack.common import log as logging
@@ -48,6 +39,3 @@ def main():
with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor:
reactor.consume_in_thread()
reactor.wait()
-
-if __name__ == '__main__':
- main()
diff --git a/setup.py b/setup.py
index 6ee6d00..83c56fb 100644
--- a/setup.py
+++ b/setup.py
@@ -67,6 +67,10 @@ setuptools.setup(
entry_points={
"openstack.common.scheduler.filters": filters,
"openstack.common.tests.fakes.weights": weights,
+ "console_scripts": [
+ 'oslo-rootwrap = openstack.common.rootwrap.cmd:main',
+ 'oslo-rpc-zmq-receiver = openstack.common.rpc.zmq_receiver:main',
+ ]
},
namespace_packages=['openstack'],
)
diff --git a/tests/unit/rpc/test_zmq.py b/tests/unit/rpc/test_zmq.py
index 21345a9..564f15e 100644
--- a/tests/unit/rpc/test_zmq.py
+++ b/tests/unit/rpc/test_zmq.py
@@ -88,7 +88,7 @@ class _RpcZmqBaseTestCase(common.BaseRpcTestCase):
reactor.consume_in_thread()
else:
LOG.warning(_("Detected zmq-receiver socket."))
- LOG.warning(_("Assuming nova-rpc-zmq-receiver is running."))
+ LOG.warning(_("Assuming oslo-rpc-zmq-receiver is running."))
LOG.warning(_("Using system zmq receiver deamon."))
super(_RpcZmqBaseTestCase, self).setUp(
topic=topic, topic_nested=topic_nested)
diff --git a/update.py b/update.py
index 8d2882e..036bd68 100644
--- a/update.py
+++ b/update.py
@@ -196,7 +196,6 @@ def _copy_module(mod, base, dest_dir):
copy_pyfile(os.path.join(mod_path, s))
globs_to_copy = [
- os.path.join('bin', 'oslo-' + mod + '*'),
os.path.join('tools', mod + '*'),
os.path.join('etc', 'oslo', mod + '*.conf'),
]