From 5c95e5cc10e0798d191ea33af8cc43fce2a6ae19 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 15 Aug 2016 16:57:21 +0200 Subject: [PATCH] Fix sample config generation for cinder, nova and neutron opts While generating a sample config with "tox -egenconfig", some options for the Nova, Cinder and Neutron client are not added to the [nova], [cinder] and [neutron] section. I.e. "api_insecure" is not available for all sections. Register the config options under the correct group while generating the sample config. Closes-Bug: #1613303 Change-Id: If54fd42f7a06c159bcb6df5f684dc1211a9b91e9 --- manila/opts.py | 9 ++++++--- ...ug-1613303-fix-config-generator-18b9f9be40d7eee6.yaml | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/bug-1613303-fix-config-generator-18b9f9be40d7eee6.yaml diff --git a/manila/opts.py b/manila/opts.py index 870077005c..902f82a830 100644 --- a/manila/opts.py +++ b/manila/opts.py @@ -91,13 +91,11 @@ _global_opt_lists = [ manila.common.config.debug_opts, manila.common.config.global_opts, manila.compute._compute_opts, - manila.compute.nova.nova_opts, manila.db.api.db_opts, [manila.db.base.db_driver_opt], manila.exception.exc_log_opts, manila.network.linux.interface.OPTS, manila.network.network_opts, - manila.network.neutron.api.neutron_opts, manila.network.neutron.neutron_network_plugin. neutron_single_network_plugin_opts, manila.network.nova_network_plugin.nova_single_network_plugin_opts, @@ -149,13 +147,18 @@ _global_opt_lists = [ manila.share.hook.hook_options, manila.share.manager.share_manager_opts, manila.volume._volume_opts, - manila.volume.cinder.cinder_opts, manila.wsgi.eventlet_opts, manila.wsgi.socket_opts, ] _opts = [ (None, list(itertools.chain(*_global_opt_lists))), + (manila.volume.cinder.CINDER_GROUP, + list(itertools.chain(manila.volume.cinder.cinder_opts))), + (manila.compute.nova.NOVA_GROUP, + list(itertools.chain(manila.compute.nova.nova_opts))), + (manila.network.neutron.api.NEUTRON_GROUP, + list(itertools.chain(manila.network.neutron.api.neutron_opts))), ] _opts.extend(oslo_concurrency.opts.list_opts()) diff --git a/releasenotes/notes/bug-1613303-fix-config-generator-18b9f9be40d7eee6.yaml b/releasenotes/notes/bug-1613303-fix-config-generator-18b9f9be40d7eee6.yaml new file mode 100644 index 0000000000..808fcddf9f --- /dev/null +++ b/releasenotes/notes/bug-1613303-fix-config-generator-18b9f9be40d7eee6.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Fixed the generation of options in the correct option groups. Using the + config generator (``tox -e genconfig``), [cinder], [nova] and [neutron] + options are now generated in the right groups instead of [default].