diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 710dc3ff5..a49571287 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -60,6 +60,7 @@ class neutron::keystone::auth ( ) { Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'neutron-server' |> + Keystone_endpoint["${region}/${auth_name}"] ~> Service <| name == 'neutron-server' |> if ! $public_port { $real_public_port = $port diff --git a/spec/classes/neutron_keystone_auth_spec.rb b/spec/classes/neutron_keystone_auth_spec.rb index c5a6b5f12..9e0111b3f 100644 --- a/spec/classes/neutron_keystone_auth_spec.rb +++ b/spec/classes/neutron_keystone_auth_spec.rb @@ -36,6 +36,25 @@ describe 'neutron::keystone::auth' do end + describe 'when configuring neutron-server' do + let :pre_condition do + "class { 'neutron::server': auth_password => 'test' }" + end + + let :facts do + { :osfamily => 'Debian' } + end + + let :params do + { + :password => 'neutron_password', + :tenant => 'foobar' + } + end + + it { should contain_keystone_endpoint('RegionOne/neutron').with_notify('Service[neutron-server]') } + end + describe 'when overriding public_protocol, public_port and public address' do let :params do