Ravel Python API Reference
A Database-Defined Network Controller
Public Member Functions | List of all members
ravel.network.MininetProvider Class Reference

A Mininet network provider. More...

Inheritance diagram for ravel.network.MininetProvider:
ravel.network.NetworkProvider

Public Member Functions

def __init__
 
def addLink
 Add a link to the Mininet topology. More...
 
def removeLink
 Remove a link from the Mininet topology. More...
 
def addSwitch
 Add a switch to the Mininet topology. More...
 
def removeSwitch
 Remove a switch from the Mininet topology. More...
 
def addHost
 Add a host to the Mininet topology. More...
 
def removeHost
 Remove a host from the Mininet topology. More...
 
def getNodeByName
 Find a node by its name. More...
 
def start
 Start the Mininet network.
 
def stop
 Stop the Mininet network.
 
def cli
 Pass commands to the Mininet CLI. More...
 
- Public Member Functions inherited from ravel.network.NetworkProvider
def __init__
 
def cacheNodes
 Cache node-name mapping in memory from database. More...
 
def addLink
 Add a link to the topology. More...
 
def removeLink
 Remove a link from the topology. More...
 
def addSwitch
 Add a new switch to the topology. More...
 
def removeSwitch
 Remove a switch from the topology. More...
 
def addHost
 Add a new host to the topology. More...
 
def removeHost
 Remove a host from the topology. More...
 
def start
 Start the network provider and any components in the network.
 
def stop
 Stop the network provider and any components in the network.
 
def cli
 Pass commands to the network provider's CLI, if it has its own. More...
 

Detailed Description

A Mininet network provider.

Starts Mininet with a remote controller that should be running at 127.0.0.1

Constructor & Destructor Documentation

def ravel.network.MininetProvider.__init__ (   self,
  db,
  topo,
  controller 
)
Parameters
dba ravel.db.RavelDb instance
topoa Mininet topology
controllera controller to start along with Mininet

Member Function Documentation

def ravel.network.MininetProvider.addHost (   self,
  msg 
)

Add a host to the Mininet topology.

Parameters
msgan AddHostMessage object
def ravel.network.MininetProvider.addLink (   self,
  msg 
)

Add a link to the Mininet topology.

Parameters
msgan AddLinkMessage object
def ravel.network.MininetProvider.addSwitch (   self,
  msg 
)

Add a switch to the Mininet topology.

Parameters
msgan AddSwitchMessage object
def ravel.network.MininetProvider.cli (   self,
  cmd 
)

Pass commands to the Mininet CLI.

If an empty string or None is passed, starts the CLI in a loop

Parameters
cmdthe command to run within the Mininet CLI
def ravel.network.MininetProvider.getNodeByName (   self,
  node 
)

Find a node by its name.

Parameters
nodea node name
Returns
the node object
def ravel.network.MininetProvider.removeHost (   self,
  msg 
)

Remove a host from the Mininet topology.

Parameters
msga RemoveHostMessage object
def ravel.network.MininetProvider.removeLink (   self,
  msg 
)

Remove a link from the Mininet topology.

Parameters
msga RemoveLinkMessage object
def ravel.network.MininetProvider.removeSwitch (   self,
  msg 
)

Remove a switch from the Mininet topology.

Parameters
msga RemoveSwitchMessage object

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