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
This commit is contained in:
Thomas Bechtold 2016-08-15 16:57:21 +02:00 committed by Goutham Pacha Ravi
parent d43c8198a7
commit 5c95e5cc10
2 changed files with 11 additions and 3 deletions

View File

@ -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())

View File

@ -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].