diff options
author | Zane Bitter <zbitter@redhat.com> | 2019-05-29 14:25:21 -0400 |
---|---|---|
committer | Rabi Mishra <ramishra@redhat.com> | 2019-05-30 14:23:17 +0000 |
commit | bc6b4d9e7ea16f3d499d42f8b1a83983e5231fb2 (patch) | |
tree | e28f154fc2ed2290af7b0faca5fd9a1a5a897c3e | |
parent | a4fc781e7bccd9a0a7d27d32c167c9e2c056df10 (diff) | |
download | heat-bc6b4d9e7ea16f3d499d42f8b1a83983e5231fb2.tar.gz |
Fix regression with SW deployments when region not configured
The region name eventually has to pass through an os-collect-config.conf
file, the format of which is unable to distinguish between the JSON null
(equivalent to None in Python) and the string "null".
This means that Story 2002781 caused a regression for users who didn't
have the region_name_for_services config option explicitly set in
heat.conf.
To avoid this, only specify the region when we know what it is.
Change-Id: I23493b1c477d082c478f87167de2c1859ba5ace7
Story: #2005797
Task: 33527
Task: 33528
(cherry picked from commit d580565abff2997002eff856535bdfd2ddb44da7)
-rw-r--r-- | heat/engine/resources/openstack/heat/software_deployment.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/heat/engine/resources/openstack/heat/software_deployment.py b/heat/engine/resources/openstack/heat/software_deployment.py index 66fc4c374..3ce7da643 100644 --- a/heat/engine/resources/openstack/heat/software_deployment.py +++ b/heat/engine/resources/openstack/heat/software_deployment.py @@ -416,9 +416,11 @@ class SoftwareDeployment(signal_responder.SignalResponder): yield swc_io.InputConfig( name=self.DEPLOY_PROJECT_ID, value=creds['project_id'], description=_('ID of project for API authentication')) - yield swc_io.InputConfig( - name=self.DEPLOY_REGION_NAME, value=creds['region_name'], - description=_('Region name for API authentication')) + if creds['region_name']: + yield swc_io.InputConfig( + name=self.DEPLOY_REGION_NAME, + value=creds['region_name'], + description=_('Region name for API authentication')) if self._signal_transport_zaqar(): yield swc_io.InputConfig( name=self.DEPLOY_QUEUE_ID, |