Merge "Override all dependent ovs providers"

This commit is contained in:
Jenkins 2017-03-15 12:17:30 +00:00 committed by Gerrit Code Review
commit a1b66e8f2d
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',
}
]
}