c8d4b61e6456fe060d8631af4936f4b4b66554b5
[openstack-build/neutron-build.git] / xenial / debian / patches / Return_oslo_config_Opts_to_config_generator.patch
1 Description: Return oslo_config Opts to config generator
2  We shouldn't be returning keystoneauth Opts to the oslo_config
3  generator. Whilst it mostly works these objects are not interchangable
4  and it can result in problems. You can see this by entries such as:
5  .
6   # Warning: Failed to format sample for tenant_name
7   # isinstance() arg 2 must be a class, type, or tuple of classes
8     and types
9  .
10  in the currently generated config files.
11  .
12  Keystoneauth provides a function that returns oslo_config options so
13  fetch, process and return those instead.
14 Author: Jamie Lennox <jamielennox@gmail.com>
15 Date: Mon, 14 Mar 2016 23:05:29 +0000 (+1100)
16 X-Git-Url: https://review.openstack.org/gitweb?p=openstack%2Fneutron.git;a=commitdiff_plain;h=c3db0707eff70f381913643891ba4e148977407d
17 Change-Id: Ie3fad2381467b19189cbb332c41cea8b6cf6e264
18 Bug-Ubuntu: https://bugs.launchpad.net/neutron/+bug/1548433
19 Origin: upstream, https://review.openstack.org/#/c/292640/
20 Last-Update: 2016-03-22
21 ---
22
23 diff --git a/neutron/opts.py b/neutron/opts.py
24 index 4166811..23e4796 100644
25 --- a/neutron/opts.py
26 +++ b/neutron/opts.py
27 @@ -295,7 +295,7 @@ def list_auth_opts():
28      # the config options for a few common ones
29      plugins = ['password', 'v2password', 'v3password']
30      for name in plugins:
31 -        for plugin_option in ks_loading.get_plugin_loader(name).get_options():
32 +        for plugin_option in ks_loading.get_auth_plugin_conf_options(name):
33              if all(option.name != plugin_option.name for option in opt_list):
34                  opt_list.append(plugin_option)
35      opt_list.sort(key=operator.attrgetter('name'))