Skip to content

Commit

Permalink
Merge "Do not set special_service_provider on RHEL7."
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Apr 28, 2014
2 parents eb4a56c + ae014c9 commit 7aa47a2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
7 changes: 7 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
'Fedora', 'RedHat': {
$special_service_provider = undef
}
'RedHat': {
if ($::operatingsystemrelease < 7) {
$special_service_provider = 'init'
} else {
$special_service_provider = undef
}
}
default: {
$special_service_provider = 'init'
}
Expand Down
17 changes: 16 additions & 1 deletion spec/classes/nova_compute_libvirt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@

describe 'on rhel platforms' do
let :facts do
{ :operatingsystem => 'RedHat', :osfamily => 'RedHat' }
{ :operatingsystem => 'RedHat', :osfamily => 'RedHat',
:operatingsystemrelease => 6.5 }
end

describe 'with default parameters' do
Expand All @@ -130,6 +131,20 @@
:provider => nil
) }

describe 'on rhel 7' do
let :facts do
super().merge(:operatingsystemrelease => 7.0)
end

it { should contain_service('libvirt').with(
:provider => nil
)}

it { should contain_service('messagebus').with(
:provider => nil
)}
end

it { should contain_nova_config('DEFAULT/compute_driver').with_value('libvirt.LibvirtDriver')}
it { should contain_nova_config('libvirt/virt_type').with_value('kvm')}
it { should contain_nova_config('DEFAULT/vncserver_listen').with_value('127.0.0.1')}
Expand Down

0 comments on commit 7aa47a2

Please sign in to comment.