Set region_name for [keystone_authtoken]

region_name_for_services ensures that heat will talk to the right
services like nova/neutron, but for the token validation we need to also
set region_name for the keystone_authtoken section.

Change-Id: I62974e661cb82e52d721c97c27c586f98eee970c
Closes-Bug: #1558673
This commit is contained in:
Matt Fischer 2016-03-17 10:55:17 -06:00
parent 3cf2002fda
commit bd2cd8997c
2 changed files with 3 additions and 0 deletions

View File

@ -471,6 +471,7 @@ class heat(
'DEFAULT/enable_stack_abandon': value => $enable_stack_abandon;
'DEFAULT/enable_stack_adopt': value => $enable_stack_adopt;
'ec2authtoken/auth_uri': value => $keystone_ec2_uri;
'keystone_authtoken/region_name': value => $region_name;
'keystone_authtoken/admin_tenant_name': value => $keystone_tenant;
'keystone_authtoken/admin_user': value => $keystone_user;
'keystone_authtoken/admin_password': value => $keystone_password, secret => true;

View File

@ -325,12 +325,14 @@ describe 'heat' do
it 'has region_name set when specified' do
is_expected.to contain_heat_config('DEFAULT/region_name_for_services').with_value('East')
is_expected.to contain_heat_config('keystone_authtoken/region_name').with_value('East')
end
end
shared_examples_for 'without region_name set' do
it 'doesnt have region_name set by default' do
is_expected.to contain_heat_config('DEFAULT/region_name_for_services').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('keystone_authtoken/region_name').with_value('<SERVICE DEFAULT>')
end
end