Refactor management of ironic-inspector-dnsmasq package
Change-Id: I114e55d97043140596cbc187aa6d31e3e14c306b
This commit is contained in:
parent
b1ea700ba8
commit
ae48810911
@ -424,8 +424,17 @@ Use ironic::inspector::ironic::endpoint_override instead.')
|
||||
|
||||
# Install package
|
||||
if $::ironic::params::inspector_package {
|
||||
package { $::ironic::params::inspector_package:
|
||||
package { 'ironic-inspector':
|
||||
ensure => $package_ensure,
|
||||
name => $::ironic::params::inspector_package,
|
||||
tag => ['openstack', 'ironic-inspector-package'],
|
||||
}
|
||||
}
|
||||
|
||||
if $::ironic::params::inspector_dnsmasq_package {
|
||||
package { 'ironic-inspector-dnsmasq':
|
||||
ensure => $package_ensure,
|
||||
name => $::ironic::params::inspector_dnsmasq_package,
|
||||
tag => ['openstack', 'ironic-inspector-package'],
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,8 @@ class ironic::params {
|
||||
$api_service = 'openstack-ironic-api'
|
||||
$conductor_package = 'openstack-ironic-conductor'
|
||||
$conductor_service = 'openstack-ironic-conductor'
|
||||
$inspector_package = ['openstack-ironic-inspector', 'openstack-ironic-inspector-dnsmasq']
|
||||
$inspector_package = 'openstack-ironic-inspector'
|
||||
$inspector_dnsmasq_package = 'openstack-ironic-inspector-dnsmasq'
|
||||
$inspector_service = 'openstack-ironic-inspector'
|
||||
$inspector_dnsmasq_service = 'openstack-ironic-inspector-dnsmasq'
|
||||
$staging_drivers_package = 'openstack-ironic-staging-drivers'
|
||||
@ -78,6 +79,7 @@ class ironic::params {
|
||||
$conductor_service = 'ironic-conductor'
|
||||
$conductor_package = 'ironic-conductor'
|
||||
$inspector_package = 'ironic-inspector'
|
||||
$inspector_dnsmasq_package = false
|
||||
$inspector_service = 'ironic-inspector'
|
||||
# it seems like there is not currently a builtin dnsmasq in the debian packaging
|
||||
# https://packages.debian.org/source/experimental/ironic-inspector
|
||||
|
@ -85,11 +85,22 @@ describe 'ironic::inspector' do
|
||||
if platform_params.has_key?(:inspector_package)
|
||||
is_expected.to contain_package('ironic-inspector').with(
|
||||
:ensure => p[:package_ensure],
|
||||
:name => platform_params[:inspector_package],
|
||||
:tag => ['openstack', 'ironic-inspector-package'],
|
||||
)
|
||||
is_expected.to contain_package('ironic-inspector').that_requires('Anchor[ironic-inspector::install::begin]')
|
||||
is_expected.to contain_package('ironic-inspector').that_notifies('Anchor[ironic-inspector::install::end]')
|
||||
end
|
||||
|
||||
if platform_params.has_key?(:inspector_dnsmasq_package)
|
||||
is_expected.to contain_package('ironic-inspector-dnsmasq').with(
|
||||
:ensure => p[:package_ensure],
|
||||
:name => platform_params[:inspector_dnsmasq_package],
|
||||
:tag => ['openstack', 'ironic-inspector-package'],
|
||||
)
|
||||
is_expected.to contain_package('ironic-inspector-dnsmasq').that_requires('Anchor[ironic-inspector::install::begin]')
|
||||
is_expected.to contain_package('ironic-inspector-dnsmasq').that_notifies('Anchor[ironic-inspector::install::end]')
|
||||
end
|
||||
end
|
||||
|
||||
it 'ensure ironic inspector service is running' do
|
||||
@ -361,7 +372,9 @@ describe 'ironic::inspector' do
|
||||
{ :inspector_package => 'ironic-inspector',
|
||||
:inspector_service => 'ironic-inspector' }
|
||||
when 'RedHat'
|
||||
{ :inspector_service => 'ironic-inspector' }
|
||||
{ :inspector_package => 'openstack-ironic-inspector',
|
||||
:inspector_dnsmasq_package => 'openstack-ironic-inspector-dnsmasq',
|
||||
:inspector_service => 'ironic-inspector' }
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user