Browse Source

Merge "Override all dependent ovs providers"

Jenkins 2 years ago
parent
commit
a1b66e8f2d

+ 3
- 2
deployment/puppet/osnailyfacter/lib/puppet/parser/functions/remove_ovs_usage.rb View File

@@ -37,7 +37,8 @@ Puppet::Parser::Functions::newfunction( :remove_ovs_usage,
37 37
     overrides = []
38 38
 
39 39
     network_scheme['transformations'].each do |tr|
40
-      if tr['provider'] == 'ovs'
40
+      # get all dependent ovs providers
41
+      if tr['provider'] =~ /ovs/
41 42
         if tr['action'] == 'add-patch'
42 43
           overrides << {
43 44
             'action'   => 'override',
@@ -62,4 +63,4 @@ Puppet::Parser::Functions::newfunction( :remove_ovs_usage,
62 63
 
63 64
     return rv.to_yaml() + "\n"
64 65
 end
65
-# vim: set ts=2 sw=2 et :
66
+# vim: set ts=2 sw=2 et :

+ 11
- 0
deployment/puppet/osnailyfacter/spec/functions/remove_ovs_usage_spec.rb View File

@@ -23,6 +23,12 @@ describe 'remove_ovs_usage' do
23 23
           'provider' => 'ovs',
24 24
           'action' => 'foo',
25 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 43
             'action' => 'override',
38 44
             'override' => 'bar',
39 45
             'provider' => 'lnx',
46
+          },
47
+          {
48
+            'action' => 'override',
49
+            'override' => 'ethx',
50
+            'provider' => 'lnx',
40 51
           }
41 52
         ]
42 53
       }

Loading…
Cancel
Save