Fix catalog compilation when not configuring endpoint

Previously when you set $configure_endpoint to false and did not have a
keystone_endpoint resource with the same name as is defined by
neutron::keystone::auth, the catalog would not be compiled. This was
because a relationship was being established where one resource in the
relationship didn't exist. This changes this so that the relationship
involving the Keystone endpoint is only defined if $configure_endpoint
is set to true.

Change-Id: I1ee51f33ffd1bf20578cd56120ee5be8e6fa0133
Co-Authored-By: Risto Laurikainen <risto.laurikainen@csc.fi>
Co-Authored-By: Gael Chamoulaud <gchamoul@redhat.com>
Closes-Bug: 1368686
(cherry picked from commit 39867dcd31)
This commit is contained in:
Emilien Macchi 2015-06-10 15:24:07 -04:00
parent 48641e0409
commit 93bb2f6d40
2 changed files with 12 additions and 2 deletions

View File

@ -195,8 +195,10 @@ class trove::keystone::auth (
$real_service_name = pick($service_name, $auth_name)
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'trove-server' |>
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| name == 'trove-server' |>
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'trove-server' |>
Keystone_endpoint<| title == "${region}/${real_service_name}" |>
~> Service <| name == 'trove-server' |>
keystone::resource::service_identity { 'trove':
configure_user => true,

View File

@ -130,4 +130,12 @@ describe 'trove::keystone::auth' do
it { is_expected.to contain_keystone_endpoint('RegionOne/trove_service') }
end
describe 'when disabling endpoint configuration' do
let :params do
{ :configure_endpoint => false,
:password => 'trove_password' }
end
it { is_expected.to_not contain_keystone_endpoint('RegionOne/neutron') }
end
end