Merge "Make Keystone_endpoint match service by name/type"
This commit is contained in:
commit
d5b2757363
@ -189,7 +189,7 @@ class neutron::keystone::auth (
|
||||
$real_service_name = pick($service_name, $auth_name)
|
||||
|
||||
if $configure_endpoint {
|
||||
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| title == 'neutron-server' |>
|
||||
Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service <| title == 'neutron-server' |>
|
||||
}
|
||||
|
||||
if $configure_user_role {
|
||||
|
@ -26,13 +26,12 @@ describe 'neutron::keystone::auth' do
|
||||
:roles => ['admin']
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_keystone_service('neutron').with(
|
||||
it { is_expected.to contain_keystone_service('neutron::network').with(
|
||||
:ensure => 'present',
|
||||
:type => 'network',
|
||||
:description => 'Neutron Networking Service'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron').with(
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron::network').with(
|
||||
:ensure => 'present',
|
||||
:public_url => "http://127.0.0.1:9696",
|
||||
:admin_url => "http://127.0.0.1:9696",
|
||||
@ -59,7 +58,7 @@ describe 'neutron::keystone::auth' do
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron').with_notify(['Service[neutron-server]']) }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron::network').with_notify(['Service[neutron-server]']) }
|
||||
end
|
||||
|
||||
describe 'with endpoint URL parameters' do
|
||||
@ -72,7 +71,7 @@ describe 'neutron::keystone::auth' do
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron').with(
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron::network').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.10.10.10:80',
|
||||
:internal_url => 'https://10.10.10.11:81',
|
||||
@ -95,7 +94,7 @@ describe 'neutron::keystone::auth' do
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron').with(
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron::network').with(
|
||||
:ensure => 'present',
|
||||
:public_url => "https://10.10.10.10:80",
|
||||
:internal_url => "https://10.10.10.11:81",
|
||||
@ -116,9 +115,9 @@ describe 'neutron::keystone::auth' do
|
||||
|
||||
it { is_expected.to contain_keystone_user_role('neutrony@services') }
|
||||
|
||||
it { is_expected.to contain_keystone_service('neutrony') }
|
||||
it { is_expected.to contain_keystone_service('neutrony::network') }
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutrony') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutrony::network') }
|
||||
|
||||
end
|
||||
|
||||
@ -133,8 +132,8 @@ describe 'neutron::keystone::auth' do
|
||||
|
||||
it { is_expected.to contain_keystone_user('neutron') }
|
||||
it { is_expected.to contain_keystone_user_role('neutron@services') }
|
||||
it { is_expected.to contain_keystone_service('neutron_service') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron_service') }
|
||||
it { is_expected.to contain_keystone_service('neutron_service::network') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/neutron_service::network') }
|
||||
|
||||
end
|
||||
|
||||
@ -151,9 +150,8 @@ describe 'neutron::keystone::auth' do
|
||||
|
||||
it { is_expected.to contain_keystone_user_role('neutron@services') }
|
||||
|
||||
it { is_expected.to contain_keystone_service('neutron').with(
|
||||
it { is_expected.to contain_keystone_service('neutron::network').with(
|
||||
:ensure => 'present',
|
||||
:type => 'network',
|
||||
:description => 'Neutron Networking Service'
|
||||
) }
|
||||
|
||||
@ -173,9 +171,8 @@ describe 'neutron::keystone::auth' do
|
||||
|
||||
it { is_expected.not_to contain_keystone_user_role('neutron@services') }
|
||||
|
||||
it { is_expected.to contain_keystone_service('neutron').with(
|
||||
it { is_expected.to contain_keystone_service('neutron::network').with(
|
||||
:ensure => 'present',
|
||||
:type => 'network',
|
||||
:description => 'Neutron Networking Service'
|
||||
) }
|
||||
|
||||
@ -190,7 +187,7 @@ describe 'neutron::keystone::auth' do
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to_not contain_keystone_endpoint('RegionOne/neutron') }
|
||||
it { is_expected.to_not contain_keystone_endpoint('RegionOne/neutron::network') }
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user