Merge "Debian/Ubuntu: The staging driver package is not available"

This commit is contained in:
Zuul 2022-07-11 09:21:08 +00:00 committed by Gerrit Code Review
commit bdf6b66ae1
2 changed files with 12 additions and 10 deletions

View File

@ -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.')
} }
} }

View File

@ -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