From 706a1370056ffccc2c8811fc1ac0679944564ece Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 15 Feb 2013 22:30:16 +0000 Subject: Use oslo-config-2013.1b4 The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc --- bin/nova-all | 2 +- bin/nova-api | 2 +- bin/nova-baremetal-manage | 2 +- bin/nova-cells | 3 ++- bin/nova-cert | 3 ++- bin/nova-clear-rabbit-queues | 3 ++- bin/nova-compute | 3 ++- bin/nova-conductor | 3 ++- bin/nova-console | 3 ++- bin/nova-consoleauth | 3 ++- bin/nova-dhcpbridge | 3 ++- bin/nova-manage | 3 ++- bin/nova-network | 3 ++- bin/nova-novncproxy | 3 ++- bin/nova-rpc-zmq-receiver | 2 +- bin/nova-scheduler | 3 ++- bin/nova-spicehtml5proxy | 3 ++- 17 files changed, 30 insertions(+), 17 deletions(-) (limited to 'bin') diff --git a/bin/nova-all b/bin/nova-all index 2553f6487..5fb1748e8 100755 --- a/bin/nova-all +++ b/bin/nova-all @@ -33,6 +33,7 @@ eventlet.monkey_patch(os=False) import os import sys +from oslo.config import cfg possible_topdir = os.path.normpath(os.path.join(os.path.abspath( sys.argv[0]), os.pardir, os.pardir)) @@ -42,7 +43,6 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): from nova import config from nova.objectstore import s3server -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-api b/bin/nova-api index d957f3e58..d21d955cf 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -29,6 +29,7 @@ eventlet.monkey_patch(os=False) import os import sys +from oslo.config import cfg possible_topdir = os.path.normpath(os.path.join(os.path.abspath( sys.argv[0]), os.pardir, os.pardir)) @@ -37,7 +38,6 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-baremetal-manage b/bin/nova-baremetal-manage index 35fb83f72..42200e5e1 100755 --- a/bin/nova-baremetal-manage +++ b/bin/nova-baremetal-manage @@ -58,6 +58,7 @@ import gettext import os import sys +from oslo.config import cfg # If ../nova/__init__.py exists, add ../ to Python search path, so that # it will override what happens to be installed in /usr/(local/)lib/python... @@ -70,7 +71,6 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): gettext.install('nova', unicode=1) from nova import config -from nova.openstack.common import cfg from nova.openstack.common import cliutils from nova.openstack.common import log as logging from nova import version diff --git a/bin/nova-cells b/bin/nova-cells index a7e16ef53..bb955e9ec 100755 --- a/bin/nova-cells +++ b/bin/nova-cells @@ -24,6 +24,8 @@ eventlet.monkey_patch() import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -33,7 +35,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-cert b/bin/nova-cert index 113b06510..d309cc028 100755 --- a/bin/nova-cert +++ b/bin/nova-cert @@ -23,6 +23,8 @@ eventlet.monkey_patch() import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -33,7 +35,6 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-clear-rabbit-queues b/bin/nova-clear-rabbit-queues index e31758769..3e8b8e56d 100755 --- a/bin/nova-clear-rabbit-queues +++ b/bin/nova-clear-rabbit-queues @@ -27,6 +27,8 @@ import gettext import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -39,7 +41,6 @@ gettext.install('nova', unicode=1) from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova.openstack.common import rpc diff --git a/bin/nova-compute b/bin/nova-compute index d99a21051..26d81d8cc 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -33,6 +33,8 @@ import os import sys import traceback +from oslo.config import cfg + # If ../nova/__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]), @@ -45,7 +47,6 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): from nova import config import nova.db.api from nova import exception -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-conductor b/bin/nova-conductor index 5d9e355dd..30d426f42 100755 --- a/bin/nova-conductor +++ b/bin/nova-conductor @@ -23,6 +23,8 @@ eventlet.monkey_patch() import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -33,7 +35,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-console b/bin/nova-console index 011855a19..c567f28b1 100755 --- a/bin/nova-console +++ b/bin/nova-console @@ -24,6 +24,8 @@ eventlet.monkey_patch() import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -34,7 +36,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service diff --git a/bin/nova-consoleauth b/bin/nova-consoleauth index 9a6016326..776ee9b35 100755 --- a/bin/nova-consoleauth +++ b/bin/nova-consoleauth @@ -24,6 +24,8 @@ eventlet.monkey_patch() import os import sys +from oslo.config import cfg + possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir)) @@ -33,7 +35,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): from nova import config from nova.consoleauth import manager -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service diff --git a/bin/nova-dhcpbridge b/bin/nova-dhcpbridge index 33df97b55..c00578821 100755 --- a/bin/nova-dhcpbridge +++ b/bin/nova-dhcpbridge @@ -25,6 +25,8 @@ import gettext import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -39,7 +41,6 @@ from nova import config from nova import context from nova import db from nova.network import rpcapi as network_rpcapi -from nova.openstack.common import cfg from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import rpc diff --git a/bin/nova-manage b/bin/nova-manage index 22549a50d..e3b0ec6f7 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -59,6 +59,8 @@ import netaddr import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -77,7 +79,6 @@ from nova import context from nova import db from nova.db import migration from nova import exception -from nova.openstack.common import cfg from nova.openstack.common import cliutils from nova.openstack.common.db.sqlalchemy import session as db_session from nova.openstack.common import importutils diff --git a/bin/nova-network b/bin/nova-network index 03472371c..d0ee61ed9 100755 --- a/bin/nova-network +++ b/bin/nova-network @@ -25,6 +25,8 @@ eventlet.monkey_patch() import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -35,7 +37,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-novncproxy b/bin/nova-novncproxy index 617e2411d..45f272ada 100755 --- a/bin/nova-novncproxy +++ b/bin/nova-novncproxy @@ -24,9 +24,10 @@ noVNC consoles. Leverages websockify.py by Joel Martin import os import sys +from oslo.config import cfg + from nova import config from nova.console import websocketproxy -from nova.openstack.common import cfg opts = [ diff --git a/bin/nova-rpc-zmq-receiver b/bin/nova-rpc-zmq-receiver index f89b0b3ba..13cd05df6 100755 --- a/bin/nova-rpc-zmq-receiver +++ b/bin/nova-rpc-zmq-receiver @@ -22,6 +22,7 @@ import contextlib import os import sys +from oslo.config import cfg import zmq # If ../nova/__init__.py exists, add ../ to Python search path, so that @@ -34,7 +35,6 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): from nova import config from nova import exception -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova.openstack.common import rpc from nova.openstack.common.rpc import impl_zmq diff --git a/bin/nova-scheduler b/bin/nova-scheduler index 507ff3d5a..ec024d853 100755 --- a/bin/nova-scheduler +++ b/bin/nova-scheduler @@ -26,6 +26,8 @@ import gettext import os import sys +from oslo.config import cfg + # If ../nova/__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]), @@ -37,7 +39,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): gettext.install('nova', unicode=1) from nova import config -from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/bin/nova-spicehtml5proxy b/bin/nova-spicehtml5proxy index 405092942..23d250ca3 100755 --- a/bin/nova-spicehtml5proxy +++ b/bin/nova-spicehtml5proxy @@ -24,9 +24,10 @@ SPICE HTML5 consoles. Leverages websockify.py by Joel Martin import os import sys +from oslo.config import cfg + from nova import config from nova.console import websocketproxy -from nova.openstack.common import cfg opts = [ -- cgit