vpp: Accept array for physnets parameter
The ml2_vpp/physnets parameter is ListOpt which takes comma separated list, so accepting an array value allows users to set the parameter using the same type. Change-Id: I8ef9bd75cd5afbdb784d584a2d9f282532370585
This commit is contained in:
@@ -61,7 +61,7 @@ class neutron::agents::ml2::vpp (
|
||||
}
|
||||
|
||||
neutron_agent_vpp {
|
||||
'ml2_vpp/physnets': value => $physnets;
|
||||
'ml2_vpp/physnets': value => join(any2array($physnets), ',');
|
||||
'ml2_vpp/etcd_host': value => $etcd_host;
|
||||
'ml2_vpp/etcd_port': value => $etcd_port;
|
||||
'ml2_vpp/etcd_user': value => $etcd_user;
|
||||
|
@@ -67,10 +67,19 @@ describe 'neutron::agents::ml2::vpp' do
|
||||
|
||||
context 'when supplying a physnet mapping' do
|
||||
before :each do
|
||||
params.merge!(:physnets => 'physnet:GigabitEthernet2/2/0')
|
||||
params.merge!(:physnets => 'physnet0:GigabitEthernet2/2/0,physnet1:GigabitEthernet2/2/1')
|
||||
end
|
||||
it 'should configure physnets' do
|
||||
should contain_neutron_agent_vpp('ml2_vpp/physnets').with_value('physnet:GigabitEthernet2/2/0')
|
||||
should contain_neutron_agent_vpp('ml2_vpp/physnets').with_value('physnet0:GigabitEthernet2/2/0,physnet1:GigabitEthernet2/2/1')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when supplying a physnet mapping in array' do
|
||||
before :each do
|
||||
params.merge!(:physnets => ['physnet0:GigabitEthernet2/2/0', 'physnet1:GigabitEthernet2/2/1'])
|
||||
end
|
||||
it 'should configure physnets' do
|
||||
should contain_neutron_agent_vpp('ml2_vpp/physnets').with_value('physnet0:GigabitEthernet2/2/0,physnet1:GigabitEthernet2/2/1')
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user