Tag all Sahara packages

Some users wish to override the default package provider by their own.

Tag all packages with the 'openstack' to allow mass resource attributes
override using resource collectors.

Change-Id: Ic662043bcd19a930a47a6716be051561fceef5d7
Closes-bug: #1391209
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2015-03-29 16:37:59 +02:00
parent 5daa68f89c
commit 303e514db0
3 changed files with 12 additions and 2 deletions

View File

@ -17,5 +17,6 @@ class sahara::client (
package { 'python-saharaclient':
ensure => $package_ensure,
name => $::sahara::params::client_package_name,
tag => 'openstack',
}
}

View File

@ -120,6 +120,7 @@ class sahara(
package { 'sahara':
ensure => $package_ensure,
name => $::sahara::params::package_name,
tag => 'openstack',
}
Package['sahara'] -> Sahara_config<||>

View File

@ -8,14 +8,22 @@ describe 'sahara::client' do
shared_examples_for 'sahara client' do
context 'with default parameters' do
it { is_expected.to contain_package('python-saharaclient').with_ensure('present') }
it { is_expected.to contain_package('python-saharaclient').with(
:ensure => 'present',
:tag => 'openstack',
)
}
end
context 'with package_ensure parameter provided' do
let :params do
{ :package_ensure => false }
end
it { is_expected.to contain_package('python-saharaclient').with_ensure('false') }
it { is_expected.to contain_package('python-saharaclient').with(
:ensure => false,
:tag => 'openstack',
)
}
end
end