Override all dependent ovs providers

Take into account (i.e. make override actions for)
dpdk enabled interfaces as well.

Change-Id: I8d35814ccc9ddda4c904a4abf6a51105baa12b9a
Closes-Bug: #1672695
This commit is contained in:
Michael Polenchuk 2017-03-14 14:36:20 +04:00
parent 46f01bc4ee
commit 221dba9592
2 changed files with 14 additions and 2 deletions

View File

@ -37,7 +37,8 @@ Puppet::Parser::Functions::newfunction( :remove_ovs_usage,
overrides = [] overrides = []
network_scheme['transformations'].each do |tr| network_scheme['transformations'].each do |tr|
if tr['provider'] == 'ovs' # get all dependent ovs providers
if tr['provider'] =~ /ovs/
if tr['action'] == 'add-patch' if tr['action'] == 'add-patch'
overrides << { overrides << {
'action' => 'override', 'action' => 'override',

View File

@ -23,6 +23,12 @@ describe 'remove_ovs_usage' do
'provider' => 'ovs', 'provider' => 'ovs',
'action' => 'foo', 'action' => 'foo',
'name' => 'bar', 'name' => 'bar',
},
{
'provider' => 'dpdkovs',
'bridge' => 'bridge-0',
'action' => 'add-port',
'name' => 'ethx',
} }
], ],
} }
@ -37,6 +43,11 @@ describe 'remove_ovs_usage' do
'action' => 'override', 'action' => 'override',
'override' => 'bar', 'override' => 'bar',
'provider' => 'lnx', 'provider' => 'lnx',
},
{
'action' => 'override',
'override' => 'ethx',
'provider' => 'lnx',
} }
] ]
} }