switched back to node.cmd for OVS commands. this is faster..

This commit is contained in:
cody burkard
2014-08-01 12:18:50 -07:00
parent 42cdda38bb
commit 19dd7f70c1
+3 -6
View File
@@ -1092,8 +1092,7 @@ class OVSSwitch( Switch ):
raise Exception( raise Exception(
'OVS kernel switch does not work in a namespace' ) 'OVS kernel switch does not work in a namespace' )
# Annoyingly, --if-exists option seems not to work # Annoyingly, --if-exists option seems not to work
self.sendCmd( 'ovs-vsctl del-br', self ) self.cmd( 'ovs-vsctl del-br', self )
self.waiting = False
int( self.dpid, 16 ) # DPID must be a hex string int( self.dpid, 16 ) # DPID must be a hex string
# Interfaces and controllers # Interfaces and controllers
intfs = ' '.join( '-- add-port %s %s ' % ( self, intf ) + intfs = ' '.join( '-- add-port %s %s ' % ( self, intf ) +
@@ -1114,12 +1113,10 @@ class OVSSwitch( Switch ):
'-- set-controller %s %s ' % ( self, clist ) ) '-- set-controller %s %s ' % ( self, clist ) )
# Construct ovs-vsctl commands for old versions of OVS # Construct ovs-vsctl commands for old versions of OVS
else: else:
self.sendCmd( 'ovs-vsctl add-br', self ) self.cmd( 'ovs-vsctl add-br', self )
self.waiting = False
for intf in self.intfList(): for intf in self.intfList():
if not intf.IP(): if not intf.IP():
self.sendCmd( 'ovs-vsctl add-port', self, intf ) self.cmd( 'ovs-vsctl add-port', self, intf )
self.waiting = False
cmd = ( 'ovs-vsctl set Bridge %s ' % self + cmd = ( 'ovs-vsctl set Bridge %s ' % self +
'other_config:datapath-id=%s ' % self.dpid + 'other_config:datapath-id=%s ' % self.dpid +
'-- set-fail-mode %s %s ' % ( self, self.failMode ) + '-- set-fail-mode %s %s ' % ( self, self.failMode ) +