Browse Source

neutron-ha-tool: add os_region_name parameter

This adds an os_region_name parameter which gets passed to
the neutron-ha-tool Python script, in order to support this
upstream change to the latter:

  58f12c5060

This was rescued from the unmerged pull request on the old repository:

  https://github.com/madkiss/openstack-resource-agents/pull/21

See also https://github.com/crowbar/barclamp-neutron/pull/217

(cherry picked from commit 7fa9b868e3)
Closes-Bug: #1508416
Change-Id: Iaee553c71ecce063e9272024e42590fc2e8aa515
Adam Spiers 4 years ago
parent
commit
a78003ee1c
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      ocf/neutron-ha-tool

+ 12
- 0
ocf/neutron-ha-tool View File

@@ -24,6 +24,7 @@
24 24
 # OCF instance parameters:
25 25
 #   OCF_RESKEY_binary
26 26
 #   OCF_RESKEY_os_auth_url
27
+#   OCF_RESKEY_os_region_name
27 28
 #   OCF_RESKEY_os_username
28 29
 #   OCF_RESKEY_os_password
29 30
 #   OCF_RESKEY_os_tenant_name
@@ -39,6 +40,7 @@
39 40
 
40 41
 OCF_RESKEY_binary_default="neutron-ha-tool"
41 42
 OCF_RESKEY_os_auth_url_default="http://localhost:5000/v2"
43
+OCF_RESKEY_os_region_name_default=""
42 44
 OCF_RESKEY_os_username_default="admin"
43 45
 OCF_RESKEY_os_password_defaut=""
44 46
 OCF_RESKEY_os_tenant_name_default="admin"
@@ -47,6 +49,7 @@ OCF_RESKEY_os_cacert_default=""
47 49
 
48 50
 : ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}}
49 51
 : ${OCF_RESKEY_os_auth_url=${OCF_RESKEY_os_auth_url_default}}
52
+: ${OCF_RESKEY_os_region_name=${OCF_RESKEY_os_region_name_default}}
50 53
 : ${OCF_RESKEY_os_tenant_name=${OCF_RESKEY_os_tenant_name_default}}
51 54
 : ${OCF_RESKEY_os_username=${OCF_RESKEY_os_username_default}}
52 55
 : ${OCF_RESKEY_os_password=${OCF_RESKEY_os_password_default}}
@@ -105,6 +108,14 @@ The URL pointing to the Keystone instance to use for authentication.
105 108
 <content type="string" default="${OCF_RESKEY_os_auth_url_default}" />
106 109
 </parameter>
107 110
 
111
+<parameter name="os_region_name" unique="0" required="0">
112
+<longdesc lang="en">
113
+The region name to use for authentication against keystone.
114
+</longdesc>
115
+<shortdesc lang="en">Keystone region name</shortdesc>
116
+<content type="string" default="${OCF_RESKEY_os_region_name_default}" />
117
+</parameter>
118
+
108 119
 <parameter name="os_password" unique="0" required="1">
109 120
 <longdesc lang="en">
110 121
 The password to use for authentication against keystone.
@@ -249,6 +260,7 @@ neutron_ha_tool_validate || exit $?
249 260
 
250 261
 # OPENSTACK env variables
251 262
 export OS_AUTH_URL=$OCF_RESKEY_os_auth_url
263
+export OS_REGION_NAME=$OCF_RESKEY_os_region_name
252 264
 export OS_TENANT_NAME=$OCF_RESKEY_os_tenant_name
253 265
 export OS_USERNAME=$OCF_RESKEY_os_username
254 266
 export OS_PASSWORD=$OCF_RESKEY_os_password

Loading…
Cancel
Save