summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-12-12 07:41:32 +0000
committerMark McLoughlin <markmc@redhat.com>2012-12-12 08:27:03 +0000
commit6808becda11a7682c6c56cd3b2afd55601cf1590 (patch)
tree41fc228bdf840ec6aa8c22a2b3f9605aca3d99d2 /nova/api
parent79d516fed18a9e265044bee1e89c3e47617b8a70 (diff)
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
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/__init__.py11
-rw-r--r--nova/api/openstack/compute/extensions.py11
2 files changed, 18 insertions, 4 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):