Merge "Only set special_service_provider on RHEL."

This commit is contained in:
Jenkins 2013-04-11 16:50:08 +00:00 committed by Gerrit Code Review
commit fbcbe65851
2 changed files with 44 additions and 3 deletions

View File

@ -33,10 +33,17 @@ class nova::params {
$tgt_service_name = 'tgtd'
$vncproxy_service_name = 'openstack-nova-novncproxy'
$volume_service_name = 'openstack-nova-volume'
$special_service_provider = 'init'
# redhat specific config defaults
$root_helper = 'sudo nova-rootwrap'
$lock_path = '/var/lib/nova/tmp'
case $::operatingsystem {
'RedHat': {
$special_service_provider = 'init'
}
default: {
$special_service_provider = undef
}
}
}
'Debian': {
# package names

View File

@ -76,7 +76,7 @@ describe 'nova::compute::libvirt' do
describe 'on rhel platforms' do
let :facts do
{ :osfamily => 'RedHat' }
{ :operatingsystem => 'RedHat', :osfamily => 'RedHat' }
end
describe 'with default parameters' do
@ -98,7 +98,8 @@ describe 'nova::compute::libvirt' do
it { should contain_service('messagebus').with(
:ensure => 'running',
:enable => true,
:before => 'Service[libvirt]'
:before => 'Service[libvirt]',
:provider => 'init'
) }
it { should contain_nova_config('compute_driver').with_value('libvirt.LibvirtDriver')}
@ -140,5 +141,38 @@ describe 'nova::compute::libvirt' do
raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0'/) }
end
end
describe 'with default parameters on Fedora' do
let :facts do
{ :operatingsystem => 'Fedora', :osfamily => 'RedHat' }
end
it { should include_class('nova::params')}
it { should contain_package('libvirt').with(
:name => 'libvirt',
:ensure => 'present'
) }
it { should contain_service('libvirt').with(
:name => 'libvirtd',
:ensure => 'running',
:provider => nil,
:require => 'Package[libvirt]',
:before => 'Service[nova-compute]'
)}
it { should contain_service('messagebus').with(
:ensure => 'running',
:enable => true,
:before => 'Service[libvirt]',
:provider => nil
) }
it { should contain_nova_config('compute_driver').with_value('libvirt.LibvirtDriver')}
it { should contain_nova_config('libvirt_type').with_value('kvm')}
it { should contain_nova_config('connection_type').with_value('libvirt')}
it { should contain_nova_config('vncserver_listen').with_value('127.0.0.1')}
end
end
end