From 57abd9baef8b3ec3ce3c349829b37022cfef724a Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 24 May 2016 17:40:00 -0700 Subject: [PATCH] Use correct command name in OVSController --- mininet/node.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mininet/node.py b/mininet/node.py index ea7851b..1e50b51 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -1423,16 +1423,16 @@ class Controller( Node ): class OVSController( Controller ): "Open vSwitch controller" - def __init__( self, name, command='ovs-controller', **kwargs ): - if quietRun( 'which test-controller' ): - command = 'test-controller' - Controller.__init__( self, name, command=command, **kwargs ) + def __init__( self, name, **kwargs ): + kwargs.setdefault( 'command', self.isAvailable() or + 'ovs-controller' ) + Controller.__init__( self, name, **kwargs ) @classmethod def isAvailable( cls ): return ( quietRun( 'which ovs-controller' ) or quietRun( 'which test-controller' ) or - quietRun( 'which ovs-testcontroller' ) ) + quietRun( 'which ovs-testcontroller' ) ).strip() class NOX( Controller ): "Controller to run a NOX application."