Skip to content

Commit

Permalink
Fix config generation for Neutron auth options
Browse files Browse the repository at this point in the history
Keystoneauth auth plugins by default return their own option objects.
To properly generate a sample config they have to be converted to oslo.config
option objects first.

Change-Id: Ifb1f63d2465aff72b0914989faa9f244a60a947c
Closes-Bug: #1553231
  • Loading branch information
pshchelo committed Mar 9, 2016
1 parent 3d7e403 commit ddd28ab
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nova/network/neutronv2/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ def list_opts():
# the config options for a few common ones
plugins = ['password', 'v2password', 'v3password']
for name in plugins:
for plugin_option in ks_loading.get_plugin_loader(name).get_options():
found = False
plugin = ks_loading.get_plugin_loader(name)
for plugin_option in ks_loading.get_auth_plugin_conf_options(plugin):
for option in opts:
if option.name == plugin_option.name:
found = True
break
if not found:
else:
opts.append(plugin_option)
opts.sort(key=lambda x: x.name)
return [(NEUTRON_GROUP, opts)]
Expand Down

0 comments on commit ddd28ab

Please sign in to comment.