From a1d3519dcc3515d082a3eba8a3e1ca4d6f96e46f Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 16 Aug 2019 00:53:03 +0100 Subject: [PATCH] Rename 'nova.common.config' module to 'nova.middleware' There was only one sub-module in 'nova.common' but its presence interferes with tab complete for the majority of people that want 'nova/compute'. Just move that sub-module to its own top-level module and be done. Change-Id: Iee886d915577f347e1ee4f54133ae0f87ae75841 Signed-off-by: Stephen Finucane --- nova/common/__init__.py | 0 nova/config.py | 4 ++-- nova/{common/config.py => middleware.py} | 2 +- setup.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 nova/common/__init__.py rename nova/{common/config.py => middleware.py} (97%) diff --git a/nova/common/__init__.py b/nova/common/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nova/config.py b/nova/config.py index b5064b4783..4be8e34239 100644 --- a/nova/config.py +++ b/nova/config.py @@ -18,9 +18,9 @@ from oslo_log import log from oslo_utils import importutils -from nova.common import config import nova.conf from nova.db.sqlalchemy import api as sqlalchemy_api +from nova import middleware from nova import rpc from nova import version @@ -49,7 +49,7 @@ def parse_args(argv, default_config_files=None, configure_db=True, rpc.set_defaults(control_exchange='nova') if profiler: profiler.set_defaults(CONF) - config.set_middleware_defaults() + middleware.set_defaults() CONF(argv[1:], project='nova', diff --git a/nova/common/config.py b/nova/middleware.py similarity index 97% rename from nova/common/config.py rename to nova/middleware.py index 5dd60ea7f7..717fecd4ef 100644 --- a/nova/common/config.py +++ b/nova/middleware.py @@ -15,7 +15,7 @@ from oslo_middleware import cors -def set_middleware_defaults(): +def set_defaults(): """Update default configuration options for oslo.middleware.""" cors.set_defaults( allow_headers=['X-Auth-Token', diff --git a/setup.cfg b/setup.cfg index ff4549fefc..d4ba172069 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,7 @@ oslo.config.opts = nova.conf = nova.conf.opts:list_opts oslo.config.opts.defaults = - nova.conf = nova.common.config:set_middleware_defaults + nova.conf = nova.middleware:set_defaults oslo.policy.enforcer = nova = nova.policy:get_enforcer