Handle the cloud parameter as a dict in application_credential module

Closes-Bug: 2117712
Change-Id: I258f4f6f35ed00b1ac0d719f17e5704c1bfe22f8
This commit is contained in:
Vincent Lequertier
2025-07-23 15:03:38 +02:00
parent f584c54dfd
commit 08686d1d9c
+5 -1
View File
@@ -298,7 +298,11 @@ class IdentityApplicationCredentialModule(OpenStackModule):
return creds
def _get_cloud_config(self, creds):
cloud_region = openstack.config.OpenStackConfig().get_one(self.cloud)
if isinstance(self.cloud, str):
cloud_region = openstack.config.OpenStackConfig().get_one(self.cloud)
# If the cloud parameter is not a string, try to send it to kwargs
else:
cloud_region = openstack.config.OpenStackConfig().get_one(**self.cloud)
conf = cloud_region.config
cloud_config = copy.deepcopy(conf)