ml2+ovs: Accept a string value for permitted_ethertypes
... as is done for the other ListOpt parameters. Also, this change ensures the parameter is properly purged instead of being unmanaged. Change-Id: I49888ab1c9f7c82d79e685b2e30e93f84257709e (cherry picked from commitdcb4622275
) (cherry picked from commit69aee692c0
)
This commit is contained in:
parent
7864f0a8dc
commit
b59fca5c80
|
@ -287,13 +287,6 @@ class neutron::agents::ml2::ovs (
|
|||
fail('vhost user socket directory for ovs agent must be set when DPDK is enabled')
|
||||
}
|
||||
|
||||
if ! is_service_default($permitted_ethertypes) {
|
||||
validate_legacy(Array, 'validate_array', $permitted_ethertypes)
|
||||
neutron_agent_ovs {
|
||||
'securitygroup/permitted_ethertypes': value => join($permitted_ethertypes, ',');
|
||||
}
|
||||
}
|
||||
|
||||
if $manage_vswitch {
|
||||
if $enable_dpdk {
|
||||
require vswitch::dpdk
|
||||
|
@ -394,6 +387,7 @@ class neutron::agents::ml2::ovs (
|
|||
'ovs/datapath_type': value => $datapath_type;
|
||||
'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir;
|
||||
'securitygroup/enable_security_group': value => $enable_security_group;
|
||||
'securitygroup/permitted_ethertypes': value => join(any2array($permitted_ethertypes), ',');
|
||||
'ovs/bridge_mac_table_size': value => $bridge_mac_table_size;
|
||||
'ovs/igmp_snooping_enable': value => $igmp_snooping_enable;
|
||||
'network_log/rate_limit': value => $network_log_rate_limit;
|
||||
|
|
|
@ -59,7 +59,8 @@ describe 'neutron::agents::ml2::ovs' do
|
|||
with_value(p[:firewall_driver])
|
||||
should contain_neutron_agent_ovs('securitygroup/enable_security_group').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should_not contain_neutron_agent_ovs('securitygroup/permitted_ethertypes')
|
||||
should contain_neutron_agent_ovs('securitygroup/permitted_ethertypes').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('ovs/tunnel_bridge').with_ensure('absent')
|
||||
should contain_neutron_agent_ovs('ovs/local_ip').with_ensure('absent')
|
||||
should contain_neutron_agent_ovs('ovs/int_peer_patch_port').with_ensure('absent')
|
||||
|
@ -110,7 +111,7 @@ describe 'neutron::agents::ml2::ovs' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when supplying permitted ethertypes' do
|
||||
context 'when supplying permitted ethertypes by an array' do
|
||||
before :each do
|
||||
params.merge!(:permitted_ethertypes => ['0x4008', '0x5'])
|
||||
end
|
||||
|
@ -119,6 +120,15 @@ describe 'neutron::agents::ml2::ovs' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when supplying permitted ethertypes by a string' do
|
||||
before :each do
|
||||
params.merge!(:permitted_ethertypes => '0x4008,0x5')
|
||||
end
|
||||
it 'should configured ethertypes' do
|
||||
should contain_neutron_agent_ovs('securitygroup/permitted_ethertypes').with_value('0x4008,0x5')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when supplying a firewall driver' do
|
||||
before :each do
|
||||
params.merge!(:firewall_driver => false)
|
||||
|
|
Loading…
Reference in New Issue