diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parser/functions/vpp_physnet_mapping.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/vpp_physnet_mapping.rb b/lib/puppet/parser/functions/vpp_physnet_mapping.rb index 1c86a23..cd05f56 100644 --- a/lib/puppet/parser/functions/vpp_physnet_mapping.rb +++ b/lib/puppet/parser/functions/vpp_physnet_mapping.rb @@ -6,10 +6,14 @@ module Puppet::Parser::Functions unless mapping.length == 2 raise Puppet::ParseError, "Invalid physnet mapping format: #{item}. Expecting 'physnet:interface_name'" end - if defined? call_function - vpp_int = call_function('hiera', [mapping[1]]) + if mapping[1].start_with?("tap") + vpp_int = mapping[1] else - vpp_int = function_hiera([mapping[1]]) + if defined? call_function + vpp_int = call_function('hiera', [mapping[1]]) + else + vpp_int = function_hiera([mapping[1]]) + end end if vpp_int.to_s.strip.empty? raise Puppet::ParseError, "VPP interface mapped to #{mapping[1]} is not found." |