Merge "Switch nova to leverage os_package_type fact"

This commit is contained in:
Jenkins 2015-11-10 17:20:39 +00:00 committed by Gerrit Code Review
commit d887e48813
3 changed files with 41 additions and 5 deletions

View File

@ -99,8 +99,8 @@ class nova::params {
# debian specific nova config
$root_helper = 'sudo nova-rootwrap'
$lock_path = '/var/lock/nova'
case $::operatingsystem {
'Debian': {
case $::os_package_type {
'debian': {
$spicehtml5proxy_package_name = 'nova-consoleproxy'
$spicehtml5proxy_service_name = 'nova-spicehtml5proxy'
$vncproxy_package_name = 'nova-consoleproxy'

View File

@ -47,7 +47,8 @@ describe 'nova::spicehtml5proxy' do
context 'on Ubuntu system' do
let :facts do
{ :osfamily => 'Debian',
:operatingsystem => 'Ubuntu' }
:operatingsystem => 'Ubuntu',
:os_package_type => 'ubuntu' }
end
let :platform_params do
@ -61,7 +62,8 @@ describe 'nova::spicehtml5proxy' do
context 'on Debian system' do
let :facts do
{ :osfamily => 'Debian',
:operatingsystem => 'Debian' }
:operatingsystem => 'Debian',
:os_package_type => 'debian' }
end
let :platform_params do
@ -72,6 +74,22 @@ describe 'nova::spicehtml5proxy' do
it_configures 'nova-spicehtml5proxy'
end
context 'on Ubuntu system with Debian packages' do
let :facts do
{ :osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
:os_package_type => 'debian' }
end
let :platform_params do
{ :spicehtml5proxy_package_name => 'nova-consoleproxy',
:spicehtml5proxy_service_name => 'nova-spicehtml5proxy' }
end
it_configures 'nova-spicehtml5proxy'
end
context 'on Redhat platforms' do
let :facts do
{ :osfamily => 'RedHat' }

View File

@ -56,7 +56,9 @@ describe 'nova::vncproxy' do
describe 'on debian OS' do
let :facts do
{ :osfamily => 'Debian', :operatingsystem => 'Debian' }
{ :osfamily => 'Debian',
:operatingsystem => 'Debian',
:os_package_type => 'debian' }
end
it { is_expected.to contain_package('nova-vncproxy').with(
:name => "nova-consoleproxy",
@ -69,6 +71,22 @@ describe 'nova::vncproxy' do
)}
end
describe 'on Ubuntu OS with Debian packages' do
let :facts do
{ :osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
:os_package_type => 'debian' }
end
it { is_expected.to contain_package('nova-vncproxy').with(
:name => "nova-consoleproxy",
:ensure => 'present'
)}
it { is_expected.to contain_service('nova-vncproxy').with(
:name => 'nova-novncproxy',
:hasstatus => true,
:ensure => 'running'
)}
end
describe 'on Redhatish platforms' do