Make Keystone_endpoint match service by name/type
Since a chance in puppet-keystone (1], we now match an endpoint with a service name/type. [1] http://git.openstack.org/cgit/openstack/puppet-keystone/commit/?id=0a4e06abb0f5b3f324464ff5219d2885816311ce Change-Id: I64088fb3fa7615eef41e566d67bed79dd8b1463c Closes-Bug: #1528308
This commit is contained in:
parent
24ed319d05
commit
479098069f
|
@ -69,7 +69,7 @@ class vitrage::keystone::auth (
|
|||
if $configure_user_role {
|
||||
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'vitrage-server' |>
|
||||
}
|
||||
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| name == 'vitrage-server' |>
|
||||
Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service <| name == 'vitrage-server' |>
|
||||
|
||||
keystone::resource::service_identity { 'vitrage':
|
||||
configure_user => $configure_user,
|
||||
|
|
|
@ -26,13 +26,12 @@ describe 'vitrage::keystone::auth' do
|
|||
:roles => ['admin']
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_keystone_service('vitrage').with(
|
||||
it { is_expected.to contain_keystone_service('vitrage::root_cause_analysis_engine').with(
|
||||
:ensure => 'present',
|
||||
:type => 'root_cause_analysis_engine',
|
||||
:description => 'vitrage Root Cause Analysis engine Service'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitrage').with(
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitrage::root_cause_analysis_engine').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'http://127.0.0.1:8999/v1',
|
||||
:admin_url => 'http://127.0.0.1:8999/v1',
|
||||
|
@ -48,7 +47,7 @@ describe 'vitrage::keystone::auth' do
|
|||
:admin_url => 'http://10.10.10.12:81', }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitrage').with(
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitrage::root_cause_analysis_engine').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.10.10.10:80',
|
||||
:internal_url => 'http://10.10.10.11:81',
|
||||
|
@ -64,8 +63,8 @@ describe 'vitrage::keystone::auth' do
|
|||
|
||||
it { is_expected.to contain_keystone_user('vitragey') }
|
||||
it { is_expected.to contain_keystone_user_role('vitragey@services') }
|
||||
it { is_expected.to contain_keystone_service('vitragey') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitragey') }
|
||||
it { is_expected.to contain_keystone_service('vitragey::root_cause_analysis_engine') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitragey::root_cause_analysis_engine') }
|
||||
end
|
||||
|
||||
describe 'when overriding service name' do
|
||||
|
@ -77,8 +76,8 @@ describe 'vitrage::keystone::auth' do
|
|||
|
||||
it { is_expected.to contain_keystone_user('vitrage') }
|
||||
it { is_expected.to contain_keystone_user_role('vitrage@services') }
|
||||
it { is_expected.to contain_keystone_service('vitrage_service') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitrage_service') }
|
||||
it { is_expected.to contain_keystone_service('vitrage_service::root_cause_analysis_engine') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/vitrage_service::root_cause_analysis_engine') }
|
||||
end
|
||||
|
||||
describe 'when disabling user configuration' do
|
||||
|
@ -92,9 +91,8 @@ describe 'vitrage::keystone::auth' do
|
|||
|
||||
it { is_expected.not_to contain_keystone_user('vitrage') }
|
||||
it { is_expected.to contain_keystone_user_role('vitrage@services') }
|
||||
it { is_expected.to contain_keystone_service('vitrage').with(
|
||||
it { is_expected.to contain_keystone_service('vitrage::root_cause_analysis_engine').with(
|
||||
:ensure => 'present',
|
||||
:type => 'root_cause_analysis_engine',
|
||||
:description => 'vitrage Root Cause Analysis engine Service'
|
||||
) }
|
||||
|
||||
|
@ -112,9 +110,8 @@ describe 'vitrage::keystone::auth' do
|
|||
|
||||
it { is_expected.not_to contain_keystone_user('vitrage') }
|
||||
it { is_expected.not_to contain_keystone_user_role('vitrage@services') }
|
||||
it { is_expected.to contain_keystone_service('vitrage').with(
|
||||
it { is_expected.to contain_keystone_service('vitrage::root_cause_analysis_engine').with(
|
||||
:ensure => 'present',
|
||||
:type => 'root_cause_analysis_engine',
|
||||
:description => 'vitrage Root Cause Analysis engine Service'
|
||||
) }
|
||||
|
||||
|
|
Loading…
Reference in New Issue