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: I710da4811f456410239efb1487e3407a42686a2b Closes-Bug: 1368686
This commit is contained in:

committed by
Gael Chamoulaud

parent
ac06cb7c96
commit
73d7599665
@@ -92,7 +92,9 @@ class neutron::keystone::auth (
|
||||
$real_public_port = $public_port
|
||||
}
|
||||
|
||||
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| title == 'neutron-server' |>
|
||||
if $configure_endpoint {
|
||||
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| title == 'neutron-server' |>
|
||||
}
|
||||
|
||||
if $configure_user_role {
|
||||
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| title == 'neutron-server' |>
|
||||
|
@@ -175,4 +175,17 @@ describe 'neutron::keystone::auth' do
|
||||
|
||||
end
|
||||
|
||||
describe 'when disabling endpoint configuration' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:password => 'neutron_password',
|
||||
:configure_endpoint => false
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to_not contain_keystone_endpoint('RegionOne/neutron') }
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user