Blame SOURCES/bz2083081-bz2083086-bz2083090-bz2083092-openstack-agents-set-domain-parameters-default.patch

38c30a
From bb5cfa172ca58cd8adcedcaca92bde54d0645661 Mon Sep 17 00:00:00 2001
38c30a
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
38c30a
Date: Thu, 14 Jul 2022 10:55:19 +0200
38c30a
Subject: [PATCH] openstack-agents: set domain parameter's default to Default
38c30a
 and fix missing parameter name in ocf_exit_reason
38c30a
38c30a
---
38c30a
 heartbeat/openstack-common.sh | 10 +++++++---
38c30a
 1 file changed, 7 insertions(+), 3 deletions(-)
38c30a
38c30a
diff --git a/heartbeat/openstack-common.sh b/heartbeat/openstack-common.sh
38c30a
index b6eec09c..14d290bd 100644
38c30a
--- a/heartbeat/openstack-common.sh
38c30a
+++ b/heartbeat/openstack-common.sh
38c30a
@@ -1,6 +1,10 @@
38c30a
+OCF_RESKEY_user_domain_name_default="Default"
38c30a
+OCF_RESKEY_project_domain_name_default="Default"
38c30a
 OCF_RESKEY_openstackcli_default="/usr/bin/openstack"
38c30a
 OCF_RESKEY_insecure_default="false"
38c30a
 
38c30a
+: ${OCF_RESKEY_user_domain_name=${OCF_RESKEY_user_domain_name_default}}
38c30a
+: ${OCF_RESKEY_project_domain_name=${OCF_RESKEY_project_domain_name_default}}
38c30a
 : ${OCF_RESKEY_openstackcli=${OCF_RESKEY_openstackcli_default}}
38c30a
 : ${OCF_RESKEY_insecure=${OCF_RESKEY_insecure_default}}
38c30a
 
38c30a
@@ -64,7 +68,7 @@ Keystone Project.
38c30a
 Keystone User Domain Name.
38c30a
 </longdesc>
38c30a
 <shortdesc lang="en">Keystone User Domain Name</shortdesc>
38c30a
-<content type="string" />
38c30a
+<content type="string" default="${OCF_RESKEY_user_domain_name_default}" />
38c30a
 </parameter>
38c30a
 
38c30a
 <parameter name="project_domain_name" required="0">
38c30a
@@ -72,7 +76,7 @@ Keystone User Domain Name.
38c30a
 Keystone Project Domain Name.
38c30a
 </longdesc>
38c30a
 <shortdesc lang="en">Keystone Project Domain Name</shortdesc>
38c30a
-<content type="string" />
38c30a
+<content type="string" default="${OCF_RESKEY_project_domain_name_default}" />
38c30a
 </parameter>
38c30a
 
38c30a
 <parameter name="openstackcli">
38c30a
@@ -133,7 +137,7 @@ get_config() {
38c30a
 			exit $OCF_ERR_CONFIGURED
38c30a
 		fi
38c30a
 		if [ -z "$OCF_RESKEY_project_domain_name" ]; then
38c30a
-			ocf_exit_reason " not set"
38c30a
+			ocf_exit_reason "project_domain_name not set"
38c30a
 			exit $OCF_ERR_CONFIGURED
38c30a
 		fi
38c30a
 
38c30a
-- 
38c30a
2.36.1
38c30a