From 9addfc13ce7499d5ea1c26711cdc62ad6a565551 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 8 Mar 2012 23:48:07 -0800 Subject: [PATCH] Add OVSController to complete out-of-box Ubuntu experience. --- bin/mn | 9 +++++---- mininet/node.py | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/mn b/bin/mn index be870fb..ec4cf8e 100755 --- a/bin/mn +++ b/bin/mn @@ -20,7 +20,7 @@ from mininet.clean import cleanup from mininet.cli import CLI from mininet.log import lg, LEVELS, info, warn from mininet.net import Mininet, init -from mininet.node import Host, CPULimitedHost, Controller, NOX +from mininet.node import Host, CPULimitedHost, Controller, OVSController, NOX from mininet.node import RemoteController, UserSwitch, OVSKernelSwitch from mininet.link import Intf, TCIntf from mininet.topo import SingleSwitchTopo, LinearTopo, SingleSwitchReversedTopo @@ -67,9 +67,10 @@ HOSTS = { 'proc': Host, CONTROLLERDEF = 'ref' CONTROLLERS = { 'ref': Controller, - 'nox': NOX, - 'remote': RemoteController, - 'none': lambda name: None } + 'ovsc': OVSController, + 'nox': NOX, + 'remote': RemoteController, + 'none': lambda name: None } INTFDEF = 'default' INTFS = { 'default': Intf, diff --git a/mininet/node.py b/mininet/node.py index 1990695..77b6712 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -847,6 +847,12 @@ class Controller( Node ): return ip +class OVSController( Controller ): + "Open vSwitch controller" + def __init__( self, name, command='ovs-controller', **kwargs ): + Controller.__init__( self, name, command=command, **kwargs ) + + # BL: This really seems to be poorly specified, # so it's going to go away!