Debian/Ubuntu: The staging driver package is not available
... so the deployment should fail the user explicitly requires it. Change-Id: Ibd0fe69f2a2d0defb648d06e8098712f84de45e6
This commit is contained in:
parent
e905d9585e
commit
a92e08ecc2
|
@ -15,10 +15,13 @@ class ironic::drivers::staging (
|
||||||
include ironic::deps
|
include ironic::deps
|
||||||
include ironic::params
|
include ironic::params
|
||||||
|
|
||||||
package { 'ironic-staging-drivers':
|
if $::ironic::params::staging_drivers_package {
|
||||||
ensure => $package_ensure,
|
package { 'ironic-staging-drivers':
|
||||||
name => $::ironic::params::staging_drivers_package,
|
ensure => $package_ensure,
|
||||||
tag => ['openstack', 'ironic-support-package'],
|
name => $::ironic::params::staging_drivers_package,
|
||||||
|
tag => ['openstack', 'ironic-support-package'],
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fail('This distribution does not provide the staging driver package.')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,18 +41,17 @@ describe 'ironic::drivers::staging' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: use OSDefaults.get_supported_os when ironic-staging-drivers is
|
|
||||||
# packaged for Debian and Ubuntu
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
:supported_os => [ { 'operatingsystem' => 'CentOS',
|
:supported_os => OSDefaults.get_supported_os
|
||||||
'operatingsystemrelease' => [ '7' ] } ]
|
|
||||||
}).each do |os,facts|
|
}).each do |os,facts|
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge!(OSDefaults.get_facts())
|
facts.merge!(OSDefaults.get_facts())
|
||||||
end
|
end
|
||||||
|
|
||||||
it_configures 'ironic-staging-drivers'
|
if facts[:osfamily] == 'RedHat'
|
||||||
|
it_configures 'ironic-staging-drivers'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue