Merge "Expose keystoneclient's session and auth plugin loading parameters"
This commit is contained in:
commit
09ee56cbba
@ -6,6 +6,7 @@ namespace = nova.api
|
|||||||
namespace = nova.cells
|
namespace = nova.cells
|
||||||
namespace = nova.compute
|
namespace = nova.compute
|
||||||
namespace = nova.network
|
namespace = nova.network
|
||||||
|
namespace = nova.network.neutronv2
|
||||||
namespace = nova.scheduler
|
namespace = nova.scheduler
|
||||||
namespace = nova.virt
|
namespace = nova.virt
|
||||||
namespace = nova.openstack.common.memorycache
|
namespace = nova.openstack.common.memorycache
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import copy
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@ -135,8 +136,8 @@ deprecations = {'cafile': [cfg.DeprecatedOpt('ca_certificates_file',
|
|||||||
'timeout': [cfg.DeprecatedOpt('url_timeout',
|
'timeout': [cfg.DeprecatedOpt('url_timeout',
|
||||||
group=NEUTRON_GROUP)]}
|
group=NEUTRON_GROUP)]}
|
||||||
|
|
||||||
session.Session.register_conf_options(CONF, NEUTRON_GROUP,
|
_neutron_options = session.Session.register_conf_options(
|
||||||
deprecated_opts=deprecations)
|
CONF, NEUTRON_GROUP, deprecated_opts=deprecations)
|
||||||
auth.register_conf_options(CONF, NEUTRON_GROUP)
|
auth.register_conf_options(CONF, NEUTRON_GROUP)
|
||||||
|
|
||||||
|
|
||||||
@ -151,6 +152,25 @@ _SESSION = None
|
|||||||
_ADMIN_AUTH = None
|
_ADMIN_AUTH = None
|
||||||
|
|
||||||
|
|
||||||
|
def list_opts():
|
||||||
|
list = copy.deepcopy(_neutron_options)
|
||||||
|
list.insert(0, auth.get_common_conf_options()[0])
|
||||||
|
# NOTE(dims): There are a lot of auth plugins, we just generate
|
||||||
|
# the config options for a few common ones
|
||||||
|
plugins = ['password', 'v2password', 'v3password']
|
||||||
|
for name in plugins:
|
||||||
|
for plugin_option in auth.get_plugin_class(name).get_options():
|
||||||
|
found = False
|
||||||
|
for option in list:
|
||||||
|
if option.name == plugin_option.name:
|
||||||
|
found = True
|
||||||
|
break
|
||||||
|
if not found:
|
||||||
|
list.append(plugin_option)
|
||||||
|
list.sort(key=lambda x: x.name)
|
||||||
|
return [(NEUTRON_GROUP, list)]
|
||||||
|
|
||||||
|
|
||||||
def reset_state():
|
def reset_state():
|
||||||
global _ADMIN_AUTH
|
global _ADMIN_AUTH
|
||||||
global _SESSION
|
global _SESSION
|
||||||
|
@ -32,6 +32,7 @@ oslo.config.opts =
|
|||||||
nova.cells = nova.cells.opts:list_opts
|
nova.cells = nova.cells.opts:list_opts
|
||||||
nova.compute = nova.compute.opts:list_opts
|
nova.compute = nova.compute.opts:list_opts
|
||||||
nova.network = nova.network.opts:list_opts
|
nova.network = nova.network.opts:list_opts
|
||||||
|
nova.network.neutronv2 = nova.network.neutronv2.api:list_opts
|
||||||
nova.scheduler = nova.scheduler.opts:list_opts
|
nova.scheduler = nova.scheduler.opts:list_opts
|
||||||
nova.virt = nova.virt.opts:list_opts
|
nova.virt = nova.virt.opts:list_opts
|
||||||
nova.openstack.common.memorycache = nova.openstack.common.memorycache:list_opts
|
nova.openstack.common.memorycache = nova.openstack.common.memorycache:list_opts
|
||||||
|
Loading…
Reference in New Issue
Block a user