Fix wrong vif driver by default
Some changes have been done in Nova to have generic drivers: http://tinyurl.com/VifDriver This patchs aims to change default driver. Closes-bug #1259139 Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com> Change-Id: I38ab21b7a3ae0f5b9ec4f08f5e30d2da58381cf1
This commit is contained in:
@@ -4,16 +4,21 @@
|
|||||||
# This will use virtio for VM guests and the
|
# This will use virtio for VM guests and the
|
||||||
# specified driver for the VIF
|
# specified driver for the VIF
|
||||||
#
|
#
|
||||||
# === Parameters:
|
# === Parameters
|
||||||
#
|
#
|
||||||
# [*libvirt_vif_driver*]
|
# [*libvirt_vif_driver*]
|
||||||
# (optional) The vif driver to configure the VIFs
|
# (optional) The libvirt VIF driver to configure the VIFs.
|
||||||
# Defaults to 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver'
|
# Defaults to 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver'.
|
||||||
#
|
#
|
||||||
|
|
||||||
class nova::compute::neutron (
|
class nova::compute::neutron (
|
||||||
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver'
|
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if $libvirt_vif_driver == 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver' {
|
||||||
|
fail('nova.virt.libvirt.vif.LibvirtOpenVswitchDriver as vif_driver is removed from Icehouse')
|
||||||
|
}
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/libvirt_vif_driver': value => $libvirt_vif_driver;
|
'DEFAULT/libvirt_vif_driver': value => $libvirt_vif_driver;
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
describe 'nova::compute::neutron' do
|
describe 'nova::compute::neutron' do
|
||||||
|
|
||||||
it { should contain_nova_config('DEFAULT/libvirt_vif_driver').with_value('nova.virt.libvirt.vif.LibvirtOpenVswitchDriver')}
|
it { should contain_nova_config('DEFAULT/libvirt_vif_driver').with_value('nova.virt.libvirt.vif.LibvirtGenericVIFDriver')}
|
||||||
|
|
||||||
context 'when overriding params' do
|
context 'when overriding params' do
|
||||||
let :params do
|
let :params do
|
||||||
@@ -10,4 +10,13 @@ describe 'nova::compute::neutron' do
|
|||||||
it { should contain_nova_config('DEFAULT/libvirt_vif_driver').with_value('foo')}
|
it { should contain_nova_config('DEFAULT/libvirt_vif_driver').with_value('foo')}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when overriding with a removed libvirt_vif_driver param' do
|
||||||
|
let :params do
|
||||||
|
{:libvirt_vif_driver => 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver' }
|
||||||
|
end
|
||||||
|
it 'should fails to configure libvirt_vif_driver with old OVS driver' do
|
||||||
|
expect { subject }.to raise_error(Puppet::Error, /nova.virt.libvirt.vif.LibvirtOpenVswitchDriver as vif_driver is removed from Icehouse/)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user