From 08686d1d9c9816f207fbd0ec003e2804f7c91539 Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Wed, 23 Jul 2025 15:03:38 +0200 Subject: [PATCH] Handle the cloud parameter as a dict in application_credential module Closes-Bug: 2117712 Change-Id: I258f4f6f35ed00b1ac0d719f17e5704c1bfe22f8 --- plugins/modules/application_credential.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/modules/application_credential.py b/plugins/modules/application_credential.py index 5b623c0d..57386de1 100644 --- a/plugins/modules/application_credential.py +++ b/plugins/modules/application_credential.py @@ -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)