Mininet Python API Reference Manual
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
mininet.node.OVSSwitch Class Reference

Open vSwitch switch. More...

Inheritance diagram for mininet.node.OVSSwitch:
mininet.node.Switch mininet.node.Node mininet.node.OVSBridge

Public Member Functions

def __init__
def setup
 Make sure Open vSwitch is installed and working.
def isOldOVS
 Is OVS ersion < 1.10?
def dpctl
 Run ovs-ofctl command.
def vsctl
 Run ovs-vsctl command (or queue for later execution)
def attach
 Connect a data port.
def detach
 Disconnect a data port.
def controllerUUIDs
 Return ovsdb UUIDs for our controllers. More...
def connected
 Are we connected to at least one of our controllers?
def intfOpts
 Return OVS interface options for intf.
def bridgeOpts
 Return OVS bridge options.
def start
 Start up a new OVS OpenFlow switch using ovs-vsctl.
def batchStartup
 Batch startup for OVS. More...
def stop
 Terminate OVS switch. More...
def batchShutdown
 Shut down a list of OVS switches.
- Public Member Functions inherited from mininet.node.Switch
def __init__
def defaultDpid
 Return correctly formatted dpid from dpid or switch name (s1 -> 1)
def defaultIntf
 Return control interface.
def sendCmd
 Send command to Node. More...
def connected
 Is the switch connected to a controller? (override this method)
def stop
 Stop switch. More...
def __repr__
 More informative string representation.
- Public Member Functions inherited from mininet.node.Node
def __init__
def fdToNode
 Return node corresponding to given file descriptor. More...
def startShell
 Start a shell process for running commands.
def mountPrivateDirs
 mount private directories
def unmountPrivateDirs
 mount private directories
def cleanup
 Help python collect its garbage. More...
def read
 Buffered read from node, potentially blocking. More...
def readline
 Buffered readline from node, potentially blocking. More...
def write
 Write data to node. More...
def terminate
 Send kill signal to Node and clean up after it. More...
def stop
 Stop node. More...
def waitReadable
 Wait until node's output is readable. More...
def sendCmd
 Send a command, followed by a command to echo a sentinel, and return without waiting for the command to complete. More...
def sendInt
 Interrupt running command. More...
def monitor
 Monitor and return the output of a command. More...
def waitOutput
 Wait for a command to complete. More...
def cmd
 Send a command, wait for output, and return it. More...
def cmdPrint
 Call cmd and printing its output. More...
def popen
 Return a Popen() object in our namespace. More...
def pexec
 Execute a command using popen. More...
def newPort
 Return the next port number to allocate. More...
def addIntf
 Add an interface. More...
def delIntf
 Remove interface from Node's known interfaces. More...
def defaultIntf
 Return interface for lowest port.
def intf
 Return our interface object with given string name, default intf if name is falsy (None, empty string, etc). More...
def connectionsTo
 Return [ intf1, intf2... More...
def deleteIntfs
 Delete all of our interfaces. More...
def setARP
 Add an ARP entry. More...
def setHostRoute
 Add route to host. More...
def setDefaultRoute
 Set the default route to go through intf. More...
def setMAC
 Set the MAC address for an interface. More...
def setIP
 Set the IP address for an interface. More...
def IP
 Return IP address of a node or specific interface. More...
def MAC
 Return MAC address of a node or specific interface. More...
def intfIsUp
 Check if an interface is up. More...
def setParam
 Internal. More...
def config
 Configure Node according to (optional) More...
def configDefault
 Configure with default parameters.
def linkTo
 (Deprecated) Link to another node replace with Link( node1, node2)
def intfList
 List of our interfaces sorted by port number.
def intfNames
 The names of our interfaces sorted by port number.
def __repr__
 More informative string representation.
def __str__
 Abbreviated string representation.
def checkSetup
 Make sure our class and superclasses are set up.
def setup
 Make sure our class dependencies are available.

Static Public Member Functions

def TCReapply
 Unfortunately OVS and Mininet are fighting over tc queuing disciplines. More...

Public Attributes

- Public Attributes inherited from mininet.node.Switch
- Public Attributes inherited from mininet.node.Node

Static Public Attributes

int argmax = 128000
- Static Public Attributes inherited from mininet.node.Switch
int portBase = 1
int dpidLen = 16
- Static Public Attributes inherited from mininet.node.Node
int portBase = 0
dictionary inToNode = {}
dictionary outToNode = {}
 isSetup = False

Detailed Description

Open vSwitch switch.

Depends on ovs-vsctl.

Constructor & Destructor Documentation

def mininet.node.OVSSwitch.__init__ (   self,
  failMode = 'secure',
  datapath = 'kernel',
  inband = False,
  protocols = None,
  reconnectms = 1000,
  stp = False,
  batch = False,
namename for switch
failModecontroller loss behavior (secure|standalone)
datapathuserspace or kernel mode (kernel|user)
inbanduse in-band control (False)
protocolsuse specific OpenFlow version(s) (e.g. OpenFlow13) Unspecified (or old OVS version) uses OVS default
reconnectmsmax reconnect timeout in ms (0/None for default)
stpenable STP (False, requires failMode=standalone)
batchenable batch startup (False)

Member Function Documentation

def mininet.node.OVSSwitch.batchStartup (   cls,
  run = errRun 

Batch startup for OVS.

switchesswitches to start up
runfunction to run commands (errRun)
def mininet.node.OVSSwitch.controllerUUIDs (   self,
  update = False 

Return ovsdb UUIDs for our controllers.

updateupdate cached value
def mininet.node.OVSSwitch.stop (   self,
  deleteIntfs = True 

Terminate OVS switch.

deleteIntfsdelete interfaces? (True)
def mininet.node.OVSSwitch.TCReapply (   intf)

Unfortunately OVS and Mininet are fighting over tc queuing disciplines.

As a quick hack/ workaround, we clear OVS's and reapply our own.

The documentation for this class was generated from the following file: