Merge "Stop collecting glance services by name"

This commit is contained in:
Jenkins 2015-12-03 12:51:09 +00:00 committed by Gerrit Code Review
commit f923a169e3
2 changed files with 26 additions and 7 deletions

View File

@ -182,7 +182,7 @@ class glance::keystone::auth(
$real_service_name = pick($service_name, $auth_name)
if $configure_endpoint {
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| name == 'glance-api' |>
Keystone_endpoint["${region}/${real_service_name}"] ~> Service<| title == 'glance-api' |>
Keystone_endpoint["${region}/${real_service_name}"] -> Glance_image<||>
}
@ -203,8 +203,8 @@ class glance::keystone::auth(
}
if $configure_user_role {
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'glance-registry' |>
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'glance-api' |>
Keystone_user_role["${auth_name}@${tenant}"] ~> Service<| title == 'glance-registry' |>
Keystone_user_role["${auth_name}@${tenant}"] ~> Service<| title == 'glance-api' |>
}
}

View File

@ -3,9 +3,7 @@ require 'spec_helper_acceptance'
describe 'glance class' do
context 'default parameters' do
it 'should work with no errors' do
pp= <<-EOS
pp= <<-EOS
include ::openstack_integration
include ::openstack_integration::repos
include ::openstack_integration::mysql
@ -41,8 +39,29 @@ describe 'glance class' do
is_public => 'yes',
source => 'http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img',
}
EOS
EOS
it 'should configure the glance endpoint before the glance-api service uses it' do
pp2 = pp + "Service['glance-api'] -> Keystone_endpoint['RegionOne/glance']"
expect(apply_manifest(pp2, :expect_failures => true, :noop => true).stderr).to match(/Found 1 dependency cycle/i)
end
it 'should configure the glance user before the glance-api service uses it' do
pp2 = pp + "Service['glance-api'] -> Keystone_user_role['glance@services']"
expect(apply_manifest(pp2, :expect_failures => true, :noop => true).stderr).to match(/Found 1 dependency cycle/i)
end
it 'should configure the glance user before the glance-registry service uses it' do
pp2 = pp + "Service['glance-registry'] -> Keystone_user_role['glance@services']"
expect(apply_manifest(pp2, :expect_failures => true, :noop => true).stderr).to match(/Found 1 dependency cycle/i)
end
it 'should configure the glance-api service before using it to provision glance_images' do
pp2 = pp + "Glance_image['test_image'] -> Service['glance-api']"
expect(apply_manifest(pp2, :expect_failures => true, :noop => true).stderr).to match(/Found 1 dependency cycle/i)
end
it 'should work with no errors' do
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)