Removed debugging printing.

Note now that we can pass options into switches; for example,
we could enable stp with Switch( 's1', opts='--stp' ).
This commit is contained in:
Bob Lantz
2010-04-22 17:12:22 -07:00
parent 3758da2ec8
commit e55cbef182
+1 -2
View File
@@ -468,7 +468,6 @@ class KernelSwitch( Switch ):
dp: netlink id (0, 1, 2, ...) dp: netlink id (0, 1, 2, ...)
defaultMAC: default MAC as string; random value if None""" defaultMAC: default MAC as string; random value if None"""
Switch.__init__( self, name, **kwargs ) Switch.__init__( self, name, **kwargs )
print kwargs, "opts=", self.opts
self.dp = 'nl:%i' % dp self.dp = 'nl:%i' % dp
self.intf = 'of%i' % dp self.intf = 'of%i' % dp
if self.inNamespace: if self.inNamespace:
@@ -498,7 +497,7 @@ class KernelSwitch( Switch ):
self.cmd( 'dpctl', 'addif', self.dp, ' '.join( intfs ) ) self.cmd( 'dpctl', 'addif', self.dp, ' '.join( intfs ) )
# Run protocol daemon # Run protocol daemon
controller = controllers[ 0 ] controller = controllers[ 0 ]
self.cmdPrint( 'ofprotocol ' + self.dp + self.cmd( 'ofprotocol ' + self.dp +
' tcp:%s:%d' % ( controller.IP(), controller.port ) + ' tcp:%s:%d' % ( controller.IP(), controller.port ) +
' --fail=closed ' + self.opts + ' --fail=closed ' + self.opts +
' 1> ' + ofplog + ' 2>' + ofplog + ' &' ) ' 1> ' + ofplog + ' 2>' + ofplog + ' &' )