Merge "Add openstack tag to glance packages"

This commit is contained in:
Jenkins 2015-02-09 21:17:17 +00:00 committed by Gerrit Code Review
commit 4ccd0981a1
8 changed files with 29 additions and 9 deletions

View File

@ -234,7 +234,11 @@ class glance::api(
}
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
ensure_packages([$glance::params::api_package_name])
ensure_packages([$glance::params::api_package_name],
{
tag => ['openstack'],
}
)
}
Package[$glance::params::api_package_name] -> File['/etc/glance/']

View File

@ -13,6 +13,7 @@ class glance::client (
package { 'python-glanceclient':
ensure => $ensure,
name => $::glance::params::client_package_name,
tag => ['openstack'],
}
}

View File

@ -21,6 +21,7 @@ class glance(
package { $glance::params::api_package_name :
ensure => $package_ensure,
name => $::glance::params::package_name,
tag => ['openstack'],
}
}
}

View File

@ -154,7 +154,11 @@ class glance::registry(
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
ensure_packages( [$glance::params::registry_package_name],
{ ensure => $package_ensure })
{
ensure => $package_ensure,
tag => ['openstack'],
}
)
}
Package[$glance::params::registry_package_name] -> File['/etc/glance/']

View File

@ -424,7 +424,9 @@ describe 'glance::api' do
end
let(:params) { default_params }
it {should contain_package('glance-api')}
it { should contain_package('glance-api').with(
:tag => ['openstack'],
)}
end
describe 'on RedHat platforms' do
@ -433,7 +435,9 @@ describe 'glance::api' do
end
let(:params) { default_params }
it { should contain_package('openstack-glance')}
it { should contain_package('openstack-glance').with(
:tag => ['openstack'],
)}
end
describe 'on unknown platforms' do

View File

@ -6,7 +6,8 @@ describe 'glance::client' do
it { should contain_class('glance::params') }
it { should contain_package('python-glanceclient').with(
:name => 'python-glanceclient',
:ensure => 'present'
:ensure => 'present',
:tag => ['openstack'],
)
}
end

View File

@ -342,8 +342,11 @@ describe 'glance::registry' do
# separate package for glance registry.
['present', 'latest'].each do |package_ensure|
context "with package_ensure '#{package_ensure}'" do
let(:params) { default_params.merge({ :package_ensure => package_ensure })}
it {should contain_package('glance-registry').with_ensure(package_ensure)}
let(:params) { default_params.merge({ :package_ensure => package_ensure }) }
it { should contain_package('glance-registry').with(
:ensure => package_ensure,
:tag => ['openstack']
)}
end
end
end

View File

@ -40,7 +40,7 @@ describe 'glance' do
end
let(:params) { default_params }
it {should_not contain_package('glance')}
it { should_not contain_package('glance') }
end
describe 'on RedHat platforms' do
@ -49,7 +49,9 @@ describe 'glance' do
end
let(:params) { default_params }
it { should contain_package('openstack-glance')}
it { should contain_package('openstack-glance').with(
:tag => ['openstack'],
)}
end
end