summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2018-04-14 09:35:37 -0400
committerTim Rozet <trozet@redhat.com>2018-04-19 04:15:36 +0000
commit52ddc0d5427765b8baf2884048bd2b15315e5bce (patch)
tree6f268cc3818c9937beed42ed0ee4609ab33b4183
parentab64db9c0d80dbda5ff286722308a7b125628b7f (diff)
nosdn-fdio scenario fixes
- Skip lookup for tap interfaces - Update l3_hosts field in vpp ml2 section Change-Id: I231054a433eb7e598a6e24f6eaea02d476e776de Signed-off-by: Feng Pan <fpan@redhat.com> (cherry picked from commit 4d88340cb582a0fda9b6ac9174a41c7b4c28d655)
-rw-r--r--lib/puppet/parser/functions/vpp_physnet_mapping.rb10
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/vpp.pp2
2 files changed, 8 insertions, 4 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."
diff --git a/manifests/profile/base/neutron/plugins/ml2/vpp.pp b/manifests/profile/base/neutron/plugins/ml2/vpp.pp
index 0312eff..f90841a 100644
--- a/manifests/profile/base/neutron/plugins/ml2/vpp.pp
+++ b/manifests/profile/base/neutron/plugins/ml2/vpp.pp
@@ -42,7 +42,7 @@ class tripleo::profile::base::neutron::plugins::ml2::vpp (
if $step >= 4 {
if $::hostname in hiera('controller_node_names') {
- $l3_hosts = strip(hiera('controller_node_names').split(',')[0])
+ $l3_hosts = "${hiera('controller_node_names').split(',')[0]}.${::domain}"
} else {
$l3_hosts = undef
}