summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-15 12:17:30 +0000
committerGerrit Code Review <review@openstack.org>2017-03-15 12:17:30 +0000
commita1b66e8f2d49c78faf59668f4b4421aff197093f (patch)
tree96c97363eff0c94caa3894bb12e1b8989c088fa2
parentae83b6d76d0830f6de4a2be2996943a943ebe504 (diff)
parent221dba959294faa8935ff8918811afdf35f49006 (diff)
Merge "Override all dependent ovs providers"
-rw-r--r--deployment/puppet/osnailyfacter/lib/puppet/parser/functions/remove_ovs_usage.rb5
-rw-r--r--deployment/puppet/osnailyfacter/spec/functions/remove_ovs_usage_spec.rb11
2 files changed, 14 insertions, 2 deletions
diff --git a/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/remove_ovs_usage.rb b/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/remove_ovs_usage.rb
index 4a391c0..febfae7 100644
--- a/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/remove_ovs_usage.rb
+++ b/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/remove_ovs_usage.rb
@@ -37,7 +37,8 @@ Puppet::Parser::Functions::newfunction( :remove_ovs_usage,
37 overrides = [] 37 overrides = []
38 38
39 network_scheme['transformations'].each do |tr| 39 network_scheme['transformations'].each do |tr|
40 if tr['provider'] == 'ovs' 40 # get all dependent ovs providers
41 if tr['provider'] =~ /ovs/
41 if tr['action'] == 'add-patch' 42 if tr['action'] == 'add-patch'
42 overrides << { 43 overrides << {
43 'action' => 'override', 44 'action' => 'override',
@@ -62,4 +63,4 @@ Puppet::Parser::Functions::newfunction( :remove_ovs_usage,
62 63
63 return rv.to_yaml() + "\n" 64 return rv.to_yaml() + "\n"
64end 65end
65# vim: set ts=2 sw=2 et : \ No newline at end of file 66# vim: set ts=2 sw=2 et :
diff --git a/deployment/puppet/osnailyfacter/spec/functions/remove_ovs_usage_spec.rb b/deployment/puppet/osnailyfacter/spec/functions/remove_ovs_usage_spec.rb
index 89e1864..5030362 100644
--- a/deployment/puppet/osnailyfacter/spec/functions/remove_ovs_usage_spec.rb
+++ b/deployment/puppet/osnailyfacter/spec/functions/remove_ovs_usage_spec.rb
@@ -23,6 +23,12 @@ describe 'remove_ovs_usage' do
23 'provider' => 'ovs', 23 'provider' => 'ovs',
24 'action' => 'foo', 24 'action' => 'foo',
25 'name' => 'bar', 25 'name' => 'bar',
26 },
27 {
28 'provider' => 'dpdkovs',
29 'bridge' => 'bridge-0',
30 'action' => 'add-port',
31 'name' => 'ethx',
26 } 32 }
27 ], 33 ],
28 } 34 }
@@ -37,6 +43,11 @@ describe 'remove_ovs_usage' do
37 'action' => 'override', 43 'action' => 'override',
38 'override' => 'bar', 44 'override' => 'bar',
39 'provider' => 'lnx', 45 'provider' => 'lnx',
46 },
47 {
48 'action' => 'override',
49 'override' => 'ethx',
50 'provider' => 'lnx',
40 } 51 }
41 ] 52 ]
42 } 53 }