Merge "Use os_package_type for libvirt service name"
This commit is contained in:
commit
d5d73d795b
@ -89,13 +89,13 @@ class nova::params {
|
|||||||
$compute_service_name = 'nova-compute'
|
$compute_service_name = 'nova-compute'
|
||||||
$conductor_service_name = 'nova-conductor'
|
$conductor_service_name = 'nova-conductor'
|
||||||
$consoleauth_service_name = 'nova-consoleauth'
|
$consoleauth_service_name = 'nova-consoleauth'
|
||||||
$libvirt_service_name = 'libvirt-bin'
|
|
||||||
$network_service_name = 'nova-network'
|
$network_service_name = 'nova-network'
|
||||||
$objectstore_service_name = 'nova-objectstore'
|
$objectstore_service_name = 'nova-objectstore'
|
||||||
$scheduler_service_name = 'nova-scheduler'
|
$scheduler_service_name = 'nova-scheduler'
|
||||||
$vncproxy_service_name = 'nova-novncproxy'
|
$vncproxy_service_name = 'nova-novncproxy'
|
||||||
$serialproxy_service_name = 'nova-serialproxy'
|
$serialproxy_service_name = 'nova-serialproxy'
|
||||||
$tgt_service_name = 'tgt'
|
$tgt_service_name = 'tgt'
|
||||||
|
$nova_log_group = 'adm'
|
||||||
# debian specific nova config
|
# debian specific nova config
|
||||||
$root_helper = 'sudo nova-rootwrap'
|
$root_helper = 'sudo nova-rootwrap'
|
||||||
$lock_path = '/var/lock/nova'
|
$lock_path = '/var/lock/nova'
|
||||||
@ -106,7 +106,7 @@ class nova::params {
|
|||||||
$vncproxy_package_name = 'nova-consoleproxy'
|
$vncproxy_package_name = 'nova-consoleproxy'
|
||||||
# Use default provider on Debian
|
# Use default provider on Debian
|
||||||
$special_service_provider = undef
|
$special_service_provider = undef
|
||||||
$nova_log_group = 'nova'
|
$libvirt_service_name = 'libvirtd'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
$spicehtml5proxy_package_name = 'nova-spiceproxy'
|
$spicehtml5proxy_package_name = 'nova-spiceproxy'
|
||||||
@ -114,7 +114,7 @@ class nova::params {
|
|||||||
$vncproxy_package_name = 'nova-novncproxy'
|
$vncproxy_package_name = 'nova-novncproxy'
|
||||||
# some of the services need to be started form the special upstart provider
|
# some of the services need to be started form the special upstart provider
|
||||||
$special_service_provider = 'upstart'
|
$special_service_provider = 'upstart'
|
||||||
$nova_log_group = 'adm'
|
$libvirt_service_name = 'libvirt-bin'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,7 @@ describe 'nova::compute::libvirt' do
|
|||||||
"include nova\ninclude nova::compute"
|
"include nova\ninclude nova::compute"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'on debian platforms' do
|
shared_examples 'debian-nova-compute-libvirt' do
|
||||||
let :facts do
|
|
||||||
{ :osfamily => 'Debian' }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'with default parameters' do
|
describe 'with default parameters' do
|
||||||
|
|
||||||
it { is_expected.to contain_class('nova::params')}
|
it { is_expected.to contain_class('nova::params')}
|
||||||
@ -149,11 +145,11 @@ describe 'nova::compute::libvirt' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
describe 'on rhel platforms' do
|
shared_examples 'redhat-nova-compute-libvirt' do
|
||||||
let :facts do
|
before do
|
||||||
{ :operatingsystem => 'RedHat', :osfamily => 'RedHat',
|
facts.merge!({ :operatingsystem => 'RedHat', :osfamily => 'RedHat',
|
||||||
:operatingsystemrelease => 6.5,
|
:operatingsystemrelease => 6.5,
|
||||||
:operatingsystemmajrelease => '6' }
|
:operatingsystemmajrelease => '6' })
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with default parameters' do
|
describe 'with default parameters' do
|
||||||
@ -188,9 +184,11 @@ describe 'nova::compute::libvirt' do
|
|||||||
) }
|
) }
|
||||||
|
|
||||||
describe 'on rhel 7' do
|
describe 'on rhel 7' do
|
||||||
let :facts do
|
before do
|
||||||
super().merge(:operatingsystemrelease => 7.0)
|
facts.merge!({
|
||||||
super().merge(:operatingsystemmajrelease => '7')
|
:operatingsystemrelease => 7.0,
|
||||||
|
:operatingsystemmajrelease => '7'
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_service('libvirt').with(
|
it { is_expected.to contain_service('libvirt').with(
|
||||||
@ -282,8 +280,8 @@ describe 'nova::compute::libvirt' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe 'with default parameters on Fedora' do
|
describe 'with default parameters on Fedora' do
|
||||||
let :facts do
|
before do
|
||||||
{ :operatingsystem => 'Fedora', :osfamily => 'RedHat' }
|
facts.merge!({ :operatingsystem => 'Fedora', :osfamily => 'RedHat' })
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_class('nova::params')}
|
it { is_expected.to contain_class('nova::params')}
|
||||||
@ -314,4 +312,41 @@ describe 'nova::compute::libvirt' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'on Debian platforms' do
|
||||||
|
let (:facts) do
|
||||||
|
{
|
||||||
|
:osfamily => 'Debian',
|
||||||
|
:operatingsystem => 'Debian',
|
||||||
|
:os_package_family => 'debian'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it_behaves_like 'debian-nova-compute-libvirt'
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'on Debian platforms' do
|
||||||
|
let (:facts) do
|
||||||
|
{
|
||||||
|
:osfamily => 'Debian',
|
||||||
|
:operatingsystem => 'Ubuntu',
|
||||||
|
:os_package_family => 'ubuntu'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it_behaves_like 'debian-nova-compute-libvirt'
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'on RedHat platforms' do
|
||||||
|
let (:facts) do
|
||||||
|
{
|
||||||
|
:osfamily => 'RedHat',
|
||||||
|
:os_package_type => 'rpm'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it_behaves_like 'redhat-nova-compute-libvirt'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user