Merge "vpp: Accept array for physnets parameter"

This commit is contained in:
Zuul 2021-06-28 10:50:22 +00:00 committed by Gerrit Code Review
commit ba56cfd43f
2 changed files with 12 additions and 3 deletions

View File

@ -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;

View File

@ -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