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 = []
network_scheme['transformations'].each do |tr|
if tr['provider'] == 'ovs'
# get all dependent ovs providers
if tr['provider'] =~ /ovs/
if tr['action'] == 'add-patch'
overrides << {
'action' => 'override',
@ -62,4 +63,4 @@ Puppet::Parser::Functions::newfunction( :remove_ovs_usage,
return rv.to_yaml() + "\n"
end
# vim: set ts=2 sw=2 et :
# vim: set ts=2 sw=2 et :

View File

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