From 19dd7f70c14c2187f80f1f8f81e958af2e0ab020 Mon Sep 17 00:00:00 2001 From: cody burkard <cody@onlab.us> Date: Fri, 1 Aug 2014 12:18:50 -0700 Subject: [PATCH] switched back to node.cmd for OVS commands. this is faster.. --- mininet/node.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mininet/node.py b/mininet/node.py index 40a3c34b..a6786f59 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -1092,8 +1092,7 @@ def start( self, controllers ): raise Exception( 'OVS kernel switch does not work in a namespace' ) # Annoyingly, --if-exists option seems not to work - self.sendCmd( 'ovs-vsctl del-br', self ) - self.waiting = False + self.cmd( 'ovs-vsctl del-br', self ) int( self.dpid, 16 ) # DPID must be a hex string # Interfaces and controllers intfs = ' '.join( '-- add-port %s %s ' % ( self, intf ) + @@ -1114,12 +1113,10 @@ def start( self, controllers ): '-- set-controller %s %s ' % ( self, clist ) ) # Construct ovs-vsctl commands for old versions of OVS else: - self.sendCmd( 'ovs-vsctl add-br', self ) - self.waiting = False + self.cmd( 'ovs-vsctl add-br', self ) for intf in self.intfList(): if not intf.IP(): - self.sendCmd( 'ovs-vsctl add-port', self, intf ) - self.waiting = False + self.cmd( 'ovs-vsctl add-port', self, intf ) cmd = ( 'ovs-vsctl set Bridge %s ' % self + 'other_config:datapath-id=%s ' % self.dpid + '-- set-fail-mode %s %s ' % ( self, self.failMode ) + -- GitLab