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
This commit is contained in:
Gyorgy Szombathelyi 2017-09-14 10:17:40 +02:00
parent 966a1fdb2b
commit db6564bb74
2 changed files with 9 additions and 6 deletions

View File

@ -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,
)),
]

View File

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