From 6808becda11a7682c6c56cd3b2afd55601cf1590 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 12 Dec 2012 07:41:32 +0000 Subject: Move API extension opts to api.openstack.compute The osapi_compute_extension and osapi_compute_ext_list options are only used within individual modules under nova.api.openstack.compute. blueprint: scope-config-opts Change-Id: I682fa491dd1435814b73404d91df3387504c3e39 --- nova/api/openstack/compute/contrib/__init__.py | 11 +++++++++-- nova/api/openstack/compute/extensions.py | 11 +++++++++-- nova/config.py | 10 ---------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/nova/api/openstack/compute/contrib/__init__.py b/nova/api/openstack/compute/contrib/__init__.py index ec09ae941..7b21a0be8 100644 --- a/nova/api/openstack/compute/contrib/__init__.py +++ b/nova/api/openstack/compute/contrib/__init__.py @@ -25,9 +25,16 @@ from nova.api.openstack import extensions from nova.openstack.common import cfg from nova.openstack.common import log as logging - +ext_opts = [ + cfg.ListOpt('osapi_compute_ext_list', + default=[], + help='Specify list of extensions to load when using osapi_' + 'compute_extension option with nova.api.openstack.' + 'compute.contrib.select_extensions'), +] CONF = cfg.CONF -CONF.import_opt('osapi_compute_ext_list', 'nova.config') +CONF.register_opts(ext_opts) + LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/extensions.py b/nova/api/openstack/compute/extensions.py index d3c31daca..1d0738417 100644 --- a/nova/api/openstack/compute/extensions.py +++ b/nova/api/openstack/compute/extensions.py @@ -20,10 +20,17 @@ from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova.openstack.common.plugin import pluginmanager +ext_opts = [ + cfg.MultiStrOpt('osapi_compute_extension', + default=[ + 'nova.api.openstack.compute.contrib.standard_extensions' + ], + help='osapi compute extension to load'), +] +CONF = cfg.CONF +CONF.register_opts(ext_opts) LOG = logging.getLogger(__name__) -CONF = cfg.CONF -CONF.import_opt('osapi_compute_extension', 'nova.config') class ExtensionManager(base_extensions.ExtensionManager): diff --git a/nova/config.py b/nova/config.py index 937df3b5f..baaafe081 100644 --- a/nova/config.py +++ b/nova/config.py @@ -109,16 +109,6 @@ global_opts = [ cfg.ListOpt('enabled_apis', default=['ec2', 'osapi_compute', 'metadata'], help='a list of APIs to enable by default'), - cfg.ListOpt('osapi_compute_ext_list', - default=[], - help='Specify list of extensions to load when using osapi_' - 'compute_extension option with nova.api.openstack.' - 'compute.contrib.select_extensions'), - cfg.MultiStrOpt('osapi_compute_extension', - default=[ - 'nova.api.openstack.compute.contrib.standard_extensions' - ], - help='osapi compute extension to load'), cfg.StrOpt('osapi_compute_unique_server_name_scope', default='', help='When set, compute API will consider duplicate hostnames ' -- cgit