From 700a70c35f940f0bc5b729a6f063eba6f0152569 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Wed, 13 Jan 2016 15:28:01 +0100 Subject: [PATCH] Parameterize vlan name on veth This is different from east and west, so cannot be hardcoded. Change-Id: I848222154b715ab035f7ef6e33a3e6dc98833c63 --- manifests/veth.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/veth.pp b/manifests/veth.pp index ff136cb..b26629e 100644 --- a/manifests/veth.pp +++ b/manifests/veth.pp @@ -1,13 +1,15 @@ # Create a veth pair to connect the neutron bridge to the vlan bridge -class infracloud::veth { +class infracloud::veth ( + $br_name, +) { exec { 'create veth pair': command => '/sbin/ip link add veth1 type veth peer name veth2', unless => '/sbin/ip link show | /bin/grep veth1 && /sbin/ip link show | /bin/grep veth2', } exec { 'attach veth pair': - command => '/sbin/brctl addif br-vlan25 veth1', - unless => '/sbin/brctl show br-vlan25 | /bin/grep veth1', + command => "/sbin/brctl addif ${br_name} veth1", + unless => "/sbin/brctl show ${br_name} | /bin/grep veth1", require => Exec['create veth pair'], }