
This change enables support for modular libvirt daemon configurations. NOTE: As of now, this change doesn't handle any modular daemons socket configuration. Change-Id: I90c3dd7bd63f9f54e43eee7bc2f58d165ca80e57
62 lines
1.7 KiB
Ruby
62 lines
1.7 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'nova::compute::libvirt::services' do
|
|
|
|
shared_examples_for 'nova compute libvirt services' do
|
|
|
|
context 'with default parameters' do
|
|
it 'deploys libvirt packages and services' do
|
|
is_expected.to contain_package('libvirt')
|
|
is_expected.to contain_service('libvirt')
|
|
end
|
|
end
|
|
|
|
context 'with overridden parameters' do
|
|
let :params do
|
|
{
|
|
:libvirt_service_name => false,
|
|
:modular_libvirt => false,
|
|
}
|
|
end
|
|
|
|
it 'disable libvirt service' do
|
|
is_expected.not_to contain_package('libvirt')
|
|
is_expected.not_to contain_service('libvirt')
|
|
end
|
|
end
|
|
|
|
context 'with default parameters and modular-libvirt true' do
|
|
let :params do
|
|
{
|
|
:modular_libvirt => true
|
|
}
|
|
end
|
|
|
|
it 'deploys libvirt packages and services with modular-libvirt' do
|
|
is_expected.to contain_package('libvirt')
|
|
is_expected.to contain_package('virtqemu')
|
|
is_expected.to contain_package('virtsecret')
|
|
is_expected.to contain_package('virtstorage')
|
|
is_expected.to contain_package('virtnodedev')
|
|
is_expected.to contain_service('virtlogd')
|
|
is_expected.to contain_service('virtproxyd')
|
|
is_expected.to contain_service('virtnodedevd')
|
|
is_expected.to contain_service('virtsecretd')
|
|
is_expected.to contain_service('virtstoraged')
|
|
is_expected.to contain_service('virtqemud')
|
|
end
|
|
end
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge!(OSDefaults.get_facts())
|
|
end
|
|
it_configures 'nova compute libvirt services'
|
|
end
|
|
end
|
|
end
|