diff --git a/heat-config/bin/heat-config-notify b/heat-config/bin/heat-config-notify index 30eb8c4..b2b35f2 100755 --- a/heat-config/bin/heat-config-notify +++ b/heat-config/bin/heat-config-notify @@ -139,7 +139,8 @@ def main(argv=sys.argv, stdin=sys.stdin): password=iv['deploy_password'], project_id=iv['deploy_project_id']) endpoint = ks.service_catalog.url_for( - service_type='messaging', endpoint_type='publicURL') + service_type='messaging', endpoint_type='publicURL', + region_name=iv.get('deploy_region_name')) conf = { 'auth_opts': { @@ -162,7 +163,8 @@ def main(argv=sys.argv, stdin=sys.stdin): password=iv['deploy_password'], project_id=iv['deploy_project_id']) endpoint = ks.service_catalog.url_for( - service_type='orchestration', endpoint_type='publicURL') + service_type='orchestration', endpoint_type='publicURL', + region_name=iv.get('deploy_region_name')) log.debug('Signalling to %s' % endpoint) heat = heatclient.Client( '1', endpoint, token=ks.auth_token) diff --git a/heat-config/os-apply-config/etc/os-collect-config.conf b/heat-config/os-apply-config/etc/os-collect-config.conf index 3a9ab36..0206dd7 100644 --- a/heat-config/os-apply-config/etc/os-collect-config.conf +++ b/heat-config/os-apply-config/etc/os-collect-config.conf @@ -41,6 +41,7 @@ password = {{password}} project_id = {{project_id}} stack_id = {{stack_id}} resource_name = {{resource_name}} +region_name = {{region_name}} {{/heat}} {{#zaqar}} @@ -50,6 +51,7 @@ user_id = {{user_id}} password = {{password}} project_id = {{project_id}} queue_id = {{queue_id}} +region_name = {{region_name}} {{#use_websockets}} use_websockets = {{.}} {{/use_websockets}} diff --git a/tests/test_heat_config_notify.py b/tests/test_heat_config_notify.py index a037934..fdea721 100644 --- a/tests/test_heat_config_notify.py +++ b/tests/test_heat_config_notify.py @@ -68,6 +68,9 @@ class HeatConfigNotifyTest(common.RunScriptTest): }, { 'name': 'deploy_resource_name', 'value': 'the_resource' + }, { + 'name': 'deploy_region_name', + 'value': 'RegionOne' }], 'config': 'five' } @@ -237,7 +240,8 @@ class HeatConfigNotifyTest(common.RunScriptTest): password='password', project_id='bbbb') ks.service_catalog.url_for.assert_called_once_with( - service_type='orchestration', endpoint_type='publicURL') + service_type='orchestration', endpoint_type='publicURL', + region_name='RegionOne') heatclient.Client.assert_called_once_with( '1', 'mock://192.0.2.3/heat', token=ks.auth_token)