OVN: Deprecate the vif_type option
... because it was already deprecated in networking-ovn and has no effect now[1]. [1] 5be7dfeb637984f75937a21b994c1375dfa77d87 Change-Id: I3139cc238036ec681d4eda18bb0aebc9f1404c4e
This commit is contained in:
parent
4f09774c6b
commit
1ba7a40514
@ -116,7 +116,6 @@ class neutron::plugins::ml2::ovn(
|
|||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$ovsdb_connection_timeout = $::os_service_default,
|
$ovsdb_connection_timeout = $::os_service_default,
|
||||||
$neutron_sync_mode = $::os_service_default,
|
$neutron_sync_mode = $::os_service_default,
|
||||||
$vif_type = $::os_service_default,
|
|
||||||
$ovn_metadata_enabled = $::os_service_default,
|
$ovn_metadata_enabled = $::os_service_default,
|
||||||
$dvr_enabled = $::os_service_default,
|
$dvr_enabled = $::os_service_default,
|
||||||
$dns_servers = $::os_service_default,
|
$dns_servers = $::os_service_default,
|
||||||
@ -124,6 +123,7 @@ class neutron::plugins::ml2::ovn(
|
|||||||
$ovn_emit_need_to_frag = $::os_service_default,
|
$ovn_emit_need_to_frag = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$ovn_l3_mode = undef,
|
$ovn_l3_mode = undef,
|
||||||
|
$vif_type = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include neutron::deps
|
include neutron::deps
|
||||||
@ -133,8 +133,8 @@ class neutron::plugins::ml2::ovn(
|
|||||||
warning('The ovn_l3_mode parameter has been deprecated and has no effect')
|
warning('The ovn_l3_mode parameter has been deprecated and has no effect')
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! ( $vif_type in ['ovs', 'vhostuser', $::os_service_default] ) {
|
if $vif_type != undef {
|
||||||
fail( 'Invalid value for vif_type parameter' )
|
warning('The vif_type parameter has been deprecated and has no effect')
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! ( $neutron_sync_mode in ['off', 'log', 'repair', $::os_service_default] ) {
|
if ! ( $neutron_sync_mode in ['off', 'log', 'repair', $::os_service_default] ) {
|
||||||
@ -159,7 +159,6 @@ class neutron::plugins::ml2::ovn(
|
|||||||
'ovn/ovn_sb_ca_cert' : value => $ovn_sb_ca_cert;
|
'ovn/ovn_sb_ca_cert' : value => $ovn_sb_ca_cert;
|
||||||
'ovn/ovsdb_connection_timeout' : value => $ovsdb_connection_timeout;
|
'ovn/ovsdb_connection_timeout' : value => $ovsdb_connection_timeout;
|
||||||
'ovn/neutron_sync_mode' : value => $neutron_sync_mode;
|
'ovn/neutron_sync_mode' : value => $neutron_sync_mode;
|
||||||
'ovn/vif_type' : value => $vif_type;
|
|
||||||
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
|
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
|
||||||
'ovn/enable_distributed_floating_ip' : value => $dvr_enabled;
|
'ovn/enable_distributed_floating_ip' : value => $dvr_enabled;
|
||||||
'ovn/dns_servers' : value => join(any2array($dns_servers), ',');
|
'ovn/dns_servers' : value => join(any2array($dns_servers), ',');
|
||||||
@ -170,5 +169,6 @@ class neutron::plugins::ml2::ovn(
|
|||||||
# TODO(tkajinam): Remove this when removing the deprecated parameters
|
# TODO(tkajinam): Remove this when removing the deprecated parameters
|
||||||
neutron_plugin_ml2 {
|
neutron_plugin_ml2 {
|
||||||
'ovn/ovn_l3_mode' : ensure => absent;
|
'ovn/ovn_l3_mode' : ensure => absent;
|
||||||
|
'ovn/vif_type' : ensure => absent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``neutron::plugins::ml2::ovn::vif_type`` parameter has been deprecated
|
||||||
|
and has no effect.
|
@ -21,7 +21,6 @@ describe 'neutron::plugins::ml2::ovn' do
|
|||||||
:ovn_sb_ca_cert => 'sb_ca_cert',
|
:ovn_sb_ca_cert => 'sb_ca_cert',
|
||||||
:ovsdb_connection_timeout => '60',
|
:ovsdb_connection_timeout => '60',
|
||||||
:neutron_sync_mode => 'log',
|
:neutron_sync_mode => 'log',
|
||||||
:vif_type => 'ovs',
|
|
||||||
:dvr_enabled => false,
|
:dvr_enabled => false,
|
||||||
:dns_servers => ['8.8.8.8', '10.10.10.10'],
|
:dns_servers => ['8.8.8.8', '10.10.10.10'],
|
||||||
:ovn_emit_need_to_frag => false,
|
:ovn_emit_need_to_frag => false,
|
||||||
@ -49,7 +48,6 @@ describe 'neutron::plugins::ml2::ovn' do
|
|||||||
should contain_neutron_plugin_ml2('ovn/ovn_sb_ca_cert').with_value(params[:ovn_sb_ca_cert])
|
should contain_neutron_plugin_ml2('ovn/ovn_sb_ca_cert').with_value(params[:ovn_sb_ca_cert])
|
||||||
should contain_neutron_plugin_ml2('ovn/ovsdb_connection_timeout').with_value(params[:ovsdb_connection_timeout])
|
should contain_neutron_plugin_ml2('ovn/ovsdb_connection_timeout').with_value(params[:ovsdb_connection_timeout])
|
||||||
should contain_neutron_plugin_ml2('ovn/neutron_sync_mode').with_value(params[:neutron_sync_mode])
|
should contain_neutron_plugin_ml2('ovn/neutron_sync_mode').with_value(params[:neutron_sync_mode])
|
||||||
should contain_neutron_plugin_ml2('ovn/vif_type').with_value(params[:vif_type])
|
|
||||||
should contain_neutron_plugin_ml2('ovn/enable_distributed_floating_ip').with_value(params[:dvr_enabled])
|
should contain_neutron_plugin_ml2('ovn/enable_distributed_floating_ip').with_value(params[:dvr_enabled])
|
||||||
should contain_neutron_plugin_ml2('ovn/dns_servers').with_value(params[:dns_servers].join(','))
|
should contain_neutron_plugin_ml2('ovn/dns_servers').with_value(params[:dns_servers].join(','))
|
||||||
should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('<SERVICE DEFAULT>')
|
should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('<SERVICE DEFAULT>')
|
||||||
@ -74,13 +72,6 @@ describe 'neutron::plugins::ml2::ovn' do
|
|||||||
should raise_error(Puppet::Error, /Invalid value for neutron_sync_mode parameter/)
|
should raise_error(Puppet::Error, /Invalid value for neutron_sync_mode parameter/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should fail with invalid vif_type' do
|
|
||||||
params[:vif_type] = 'invalid'
|
|
||||||
should raise_error(Puppet::Error, /Invalid value for vif_type parameter/)
|
|
||||||
params.delete(:vif_type)
|
|
||||||
should contain_neutron_plugin_ml2('ovn/vif_type').with_value('<SERVICE DEFAULT>')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should contain valid vhostuser socket dir' do
|
it 'should contain valid vhostuser socket dir' do
|
||||||
should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('test')
|
should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('test')
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user