Merge "Fix API/Registry ensure for Ubuntu"
This commit is contained in:
commit
067ba2150a
|
@ -7,6 +7,11 @@
|
||||||
# [*keystone_password*]
|
# [*keystone_password*]
|
||||||
# (required) Password used to authentication.
|
# (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*]
|
# [*verbose*]
|
||||||
# (optional) Rather to log the glance api service at verbose level.
|
# (optional) Rather to log the glance api service at verbose level.
|
||||||
# Default: false
|
# Default: false
|
||||||
|
@ -184,6 +189,7 @@
|
||||||
#
|
#
|
||||||
class glance::api(
|
class glance::api(
|
||||||
$keystone_password,
|
$keystone_password,
|
||||||
|
$package_ensure = 'present',
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
|
@ -236,6 +242,7 @@ class glance::api(
|
||||||
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
|
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],
|
||||||
{
|
{
|
||||||
|
ensure => $package_ensure,
|
||||||
tag => ['openstack'],
|
tag => ['openstack'],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
# === parameters:
|
# === parameters:
|
||||||
#
|
#
|
||||||
# [*package_ensure*]
|
# [*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'
|
# Defaults to 'present'
|
||||||
#
|
#
|
||||||
class glance(
|
class glance(
|
||||||
|
|
|
@ -427,9 +427,17 @@ describe 'glance::api' do
|
||||||
end
|
end
|
||||||
let(:params) { default_params }
|
let(:params) { default_params }
|
||||||
|
|
||||||
it { is_expected.to contain_package('glance-api').with(
|
# We only test this on Debian platforms, since on RedHat there isn't a
|
||||||
:tag => ['openstack'],
|
# 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
|
end
|
||||||
|
|
||||||
describe 'on RedHat platforms' do
|
describe 'on RedHat platforms' do
|
||||||
|
|
Loading…
Reference in New Issue