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: Id31829908be2818ba5afe121caf79d97300dd20f Closes-Bug: #1528308
This commit is contained in:
parent
266b3b78ad
commit
eaf21d19ee
@ -71,7 +71,7 @@ class zaqar::keystone::auth (
|
||||
if $configure_user_role {
|
||||
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'zaqar-server' |>
|
||||
}
|
||||
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| name == 'zaqar-server' |>
|
||||
Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service <| name == 'zaqar-server' |>
|
||||
|
||||
keystone::resource::service_identity { 'zaqar':
|
||||
configure_user => $configure_user,
|
||||
|
@ -26,13 +26,12 @@ describe 'zaqar::keystone::auth' do
|
||||
:roles => ['admin']
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_keystone_service('zaqar').with(
|
||||
it { is_expected.to contain_keystone_service('zaqar::queue').with(
|
||||
:ensure => 'present',
|
||||
:type => 'queue',
|
||||
:description => 'zaqar queue service'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqar').with(
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqar::queue').with(
|
||||
:ensure => 'present',
|
||||
:public_url => "http://127.0.0.1:8888/",
|
||||
:admin_url => "http://127.0.0.1:8888/",
|
||||
@ -49,7 +48,7 @@ describe 'zaqar::keystone::auth' do
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqar').with(
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqar::queue').with(
|
||||
:ensure => 'present',
|
||||
:public_url => "https://10.10.10.10:8080/",
|
||||
:internal_url => "http://10.10.10.10:8080/",
|
||||
@ -65,8 +64,8 @@ describe 'zaqar::keystone::auth' do
|
||||
|
||||
it { is_expected.to contain_keystone_user('zaqary') }
|
||||
it { is_expected.to contain_keystone_user_role('zaqary@services') }
|
||||
it { is_expected.to contain_keystone_service('zaqary') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqary') }
|
||||
it { is_expected.to contain_keystone_service('zaqary::queue') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqary::queue') }
|
||||
end
|
||||
|
||||
describe 'when overriding service name' do
|
||||
@ -78,8 +77,8 @@ describe 'zaqar::keystone::auth' do
|
||||
|
||||
it { is_expected.to contain_keystone_user('zaqar') }
|
||||
it { is_expected.to contain_keystone_user_role('zaqar@services') }
|
||||
it { is_expected.to contain_keystone_service('zaqar_service') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqar_service') }
|
||||
it { is_expected.to contain_keystone_service('zaqar_service::queue') }
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/zaqar_service::queue') }
|
||||
end
|
||||
|
||||
describe 'when disabling user configuration' do
|
||||
@ -93,9 +92,8 @@ describe 'zaqar::keystone::auth' do
|
||||
|
||||
it { is_expected.not_to contain_keystone_user('zaqar') }
|
||||
it { is_expected.to contain_keystone_user_role('zaqar@services') }
|
||||
it { is_expected.to contain_keystone_service('zaqar').with(
|
||||
it { is_expected.to contain_keystone_service('zaqar::queue').with(
|
||||
:ensure => 'present',
|
||||
:type => 'queue',
|
||||
:description => 'zaqar queue service'
|
||||
) }
|
||||
|
||||
@ -113,9 +111,8 @@ describe 'zaqar::keystone::auth' do
|
||||
|
||||
it { is_expected.not_to contain_keystone_user('zaqar') }
|
||||
it { is_expected.not_to contain_keystone_user_role('zaqar@services') }
|
||||
it { is_expected.to contain_keystone_service('zaqar').with(
|
||||
it { is_expected.to contain_keystone_service('zaqar::queue').with(
|
||||
:ensure => 'present',
|
||||
:type => 'queue',
|
||||
:description => 'zaqar queue service'
|
||||
) }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user