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
This commit is contained in:
parent
357e8f0db2
commit
39867dcd31
@ -196,7 +196,9 @@ 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_endpoint<| title == "${region}/${real_service_name}" |>
|
||||
~> Service <| name == 'trove-server' |>
|
||||
|
||||
keystone::resource::service_identity { 'trove':
|
||||
configure_user => true,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user