Fix check for internal endpoint enablement

For cinder volume backend sections, ensure that enabling internal
endpoint usage for service access does not completely clear the
existing content of the section.

Change-Id: I383a0794e924db3c7f4ce47d1e3b88355c2475e4
Closes-Bug: 2052726
This commit is contained in:
James Page 2024-02-12 17:14:55 +00:00
parent 59efce8bc8
commit cfb228fc43
No known key found for this signature in database
GPG Key ID: BFECAECBA0E7D8C3
1 changed files with 1 additions and 1 deletions

View File

@ -387,7 +387,7 @@ class MultiBackendContext(OSContextGenerator):
vol_api_ctxt = VolumeAPIContext('glance-common')()
volume_catalog_info = vol_api_ctxt['volume_catalog_info']
for volume_type in volume_types:
if 'volume_type' not in ctxt['enabled_backend_configs']:
if volume_type not in ctxt['enabled_backend_configs']:
ctxt['enabled_backend_configs'][volume_type] = {}
ctxt['enabled_backend_configs'][volume_type].update(
{'cinder_catalog_info': volume_catalog_info})