Merge "Fix API/Registry ensure for Ubuntu"

This commit is contained in:
Jenkins 2015-04-10 15:26:20 +00:00 committed by Gerrit Code Review
commit 067ba2150a
3 changed files with 20 additions and 4 deletions

View File

@ -7,6 +7,11 @@
# [*keystone_password*]
# (required) Password used to authentication.
#
# [*package_ensure*]
# (optional) Ensure state for package. On RedHat platforms this
# setting is ignored and the setting from the glance class is used
# because there is only one glance package. Defaults to 'present'.
#
# [*verbose*]
# (optional) Rather to log the glance api service at verbose level.
# Default: false
@ -184,6 +189,7 @@
#
class glance::api(
$keystone_password,
$package_ensure = 'present',
$verbose = false,
$debug = false,
$bind_host = '0.0.0.0',
@ -236,6 +242,7 @@ class glance::api(
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
ensure_packages([$glance::params::api_package_name],
{
ensure => $package_ensure,
tag => ['openstack'],
}
)

View File

@ -5,7 +5,8 @@
# === parameters:
#
# [*package_ensure*]
# (Optional) ensure state for package.
# (Optional) Ensure state for package. On Ubuntu this setting
# is ignored since Ubuntu has separate API and registry packages.
# Defaults to 'present'
#
class glance(

View File

@ -427,9 +427,17 @@ describe 'glance::api' do
end
let(:params) { default_params }
it { is_expected.to contain_package('glance-api').with(
:tag => ['openstack'],
)}
# We only test this on Debian platforms, since on RedHat there isn't a
# separate package for glance API.
['present', 'latest'].each do |package_ensure|
context "with package_ensure '#{package_ensure}'" do
let(:params) { default_params.merge({ :package_ensure => package_ensure }) }
it { is_expected.to contain_package('glance-api').with(
:ensure => package_ensure,
:tag => ['openstack']
)}
end
end
end
describe 'on RedHat platforms' do