Switches use high default intf; disable slicing for user switch. ;-(

This should fix --switch user --innamespace.
This commit is contained in:
Bob Lantz
2010-08-18 10:04:42 -07:00
parent 4d1c17e17e
commit 9802686b32
+9 -1
View File
@@ -441,6 +441,14 @@ class Switch( Node ):
if self.listenPort:
self.opts += ' --listen=ptcp:%i ' % self.listenPort
def defaultIntf( self ):
"Return interface for HIGHEST port"
ports = self.intfs.keys()
if ports:
intf = self.intfs[ max( ports ) ]
print "RETURNING", intf
return intf
def sendCmd( self, *cmd, **kwargs ):
"""Send command to Node.
cmd: string"""
@@ -481,7 +489,7 @@ class UserSwitch( Switch ):
if self.inNamespace:
intfs = intfs[ :-1 ]
self.cmd( 'ofdatapath -i ' + ','.join( intfs ) +
' punix:/tmp/' + self.name + mac_str +
' punix:/tmp/' + self.name + mac_str + ' --no-slicing ' +
' 1> ' + ofdlog + ' 2> ' + ofdlog + ' &' )
self.cmd( 'ofprotocol unix:/tmp/' + self.name +
' tcp:%s:%d' % ( controller.IP(), controller.port ) +