From dcedc2b8d50c6ca5f5eb8da8955b57874a65b9a8 Mon Sep 17 00:00:00 2001 From: Feng Pan Date: Sun, 6 Aug 2017 22:26:04 -0400 Subject: Add support for odl-fdio-dvr scenarios Change-Id: I2025e3157b97b376b63002003ca17c7206aba546 Signed-off-by: Feng Pan --- manifests/profile/base/vpp.pp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'manifests/profile/base/vpp.pp') diff --git a/manifests/profile/base/vpp.pp b/manifests/profile/base/vpp.pp index 05f52f9..4eff434 100644 --- a/manifests/profile/base/vpp.pp +++ b/manifests/profile/base/vpp.pp @@ -24,9 +24,22 @@ # Defaults to hiera('step') # class tripleo::profile::base::vpp ( - $step = hiera('step'), + $step = hiera('step'), + $vpp_ctlplane_cidr = hiera('vpp_ctlplane_cidr', undef) ) { if $step >= 1 { include ::fdio + + # Need to use the controller's real IP since we only support noha scenario + # If this is a ha scenario, we won't configure here. + $controllers = any2array(split(hiera('controller_node_ips'), ',')) + if !empty($vpp_ctlplane_cidr) and size($controllers) == 1 { + exec { 'vpp admin interface config': + command => "ip link add vpp-admin type veth peer name veth-admin && ip li set dev veth-admin master br-ctlplane && ifconfig veth-admin up && vppctl create host-interface name vpp-admin && vppctl set int ip addr host-vpp-admin ${vpp_ctlplane_cidr} && vppctl set interface state host-vpp-admin up", + path => ['/bin', '/sbin'], + unless => 'ip link show veth-admin | grep br-ctlplane', + require => Class['fdio'], + } + } } } -- cgit 1.2.3-korg