Merge "Allow overriding ensure for glance-registry"
This commit is contained in:
commit
30d215a784
@ -7,6 +7,11 @@
|
||||
# [*keystone_password*]
|
||||
# (required) The keystone password for administrative user
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) Ensure state for package. Defaults to 'present'. On RedHat
|
||||
# platforms this setting is ignored and the setting from the glance class is
|
||||
# used because there is only one glance package.
|
||||
#
|
||||
# [*verbose*]
|
||||
# (optional) Enable verbose logs (true|false). Defaults to false.
|
||||
#
|
||||
@ -106,6 +111,7 @@
|
||||
#
|
||||
class glance::registry(
|
||||
$keystone_password,
|
||||
$package_ensure = 'present',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$bind_host = '0.0.0.0',
|
||||
@ -142,7 +148,8 @@ class glance::registry(
|
||||
}
|
||||
|
||||
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
|
||||
ensure_packages([$glance::params::registry_package_name])
|
||||
ensure_packages( [$glance::params::registry_package_name],
|
||||
{ ensure => $package_ensure })
|
||||
}
|
||||
|
||||
Package[$glance::params::registry_package_name] -> File['/etc/glance/']
|
||||
|
@ -296,9 +296,15 @@ describe 'glance::registry' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
let(:params) { default_params }
|
||||
|
||||
it {should contain_package('glance-registry')}
|
||||
# We only test this on Debian platforms, since on RedHat there isn't a
|
||||
# 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)}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'on RedHat platforms' do
|
||||
|
Loading…
Reference in New Issue
Block a user