Use new oslo.config api to generate configuration-group help
oslo.config recently updated its api to allow discovery of
help attached to configuration groups [1][2]. This patch
changes the list_opts function to use the new api and allow
for automatic generation of help on configuration groups.
[1] https://bugs.launchpad.net/oslo.config/+bug/1395819
[2] https://review.openstack.org/#/c/242472/
Depends-On: I3cbdaa7e5dfb75d4c9eb687e68d3a35e61550d1b
Change-Id: I8eabf52236bf571d42d3021f2485c1898cddd31a
diff --git a/tempest/config.py b/tempest/config.py
index 515f736..a365e17 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1244,7 +1244,10 @@
generator to discover the options exposed to users.
"""
ext_plugins = plugins.TempestTestPluginManager()
- opt_list = [(getattr(g, 'name', None), o) for g, o in _opts]
+ # Make a shallow copy of the options list that can be
+ # extended by plugins. Send back the group object
+ # to allow group help text to be generated.
+ opt_list = [(g, o) for g, o in _opts]
opt_list.extend(ext_plugins.get_plugin_options_list())
return opt_list