From db6564bb748446785217e5de852ac9a6946ea481 Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Thu, 14 Sep 2017 10:17:40 +0200 Subject: [PATCH] Add another hack from NOVA_GROUP to generate_cinder_opts.py generate_cinder_opts.py doesn't really handle indirect variables in group names, so add manual handlig of NOVA_GROUP. Change-Id: I30a4666a058ebbf108fd42028fb0c39e5cb8bcae Closes-Bug: #1717008 --- cinder/opts.py | 12 ++++++------ tools/config/generate_cinder_opts.py | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cinder/opts.py b/cinder/opts.py index fad6c4d67d0..f467e2f91fb 100644 --- a/cinder/opts.py +++ b/cinder/opts.py @@ -288,12 +288,6 @@ def list_opts(): itertools.chain( cinder_keymgr_confkeymgr.key_mgr_opts, )), - ('nova_group', - itertools.chain( - cinder_compute_nova.nova_opts, - cinder_compute_nova.nova_session_opts, - cinder_compute_nova.nova_auth_opts, - )), ('backend_defaults', itertools.chain( cinder_volume_driver.volume_opts, @@ -402,4 +396,10 @@ def list_opts(): cinder_volume_drivers_zte_zteks.zte_opts, cinder_volume_manager.volume_backend_opts, )), + ('nova', + itertools.chain( + cinder_compute_nova.nova_opts, + cinder_compute_nova.nova_session_opts, + cinder_compute_nova.nova_auth_opts, + )), ] diff --git a/tools/config/generate_cinder_opts.py b/tools/config/generate_cinder_opts.py index fa58f582c2d..dc56672f11f 100644 --- a/tools/config/generate_cinder_opts.py +++ b/tools/config/generate_cinder_opts.py @@ -18,6 +18,7 @@ import subprocess import textwrap from cinder.volume import configuration +from cinder.compute import nova OrderedDict = collections.OrderedDict @@ -215,6 +216,8 @@ if __name__ == "__main__": if (group_name.endswith('SHARED_CONF_GROUP') or group_name.lower() == 'backend_defaults'): group_name = configuration.SHARED_CONF_GROUP + if (group_name == 'NOVA_GROUP'): + group_name = nova.NOVA_GROUP if group_name in registered_opts_dict: line = key + "." + formatted_opt