summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-03-14 14:36:20 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2017-03-14 14:58:39 +0000
commit221dba959294faa8935ff8918811afdf35f49006 (patch)
tree8e3a6a664450c41d78906bde23a0c96e1118e1ff
parent46f01bc4ee08ce5e244fa16a30c127505df88195 (diff)
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
Notes
Notes (review): Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+2: Stanislaw Bogatkin <sbogatkin@mirantis.com> Code-Review+1: soumiyajit <somya.rock@gmail.com> Code-Review+2: Denis Egorenko <degorenko@mirantis.com> Workflow+1: Denis Egorenko <degorenko@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 15 Mar 2017 12:17:30 +0000 Reviewed-on: https://review.openstack.org/445421 Project: openstack/fuel-library Branch: refs/heads/master
-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 }