mininet-sample/src/mpTopo.py
Benjamin Hesmans 7e373bbad5 add XpRunner
organisation and start for xp

Signed-off-by: Benjamin Hesmans <benjamin.hesmans@uclouvain.be>
2015-01-08 12:04:42 +01:00

38 lines
852 B
Python

class MpTopo:
mininetBuilder = "mininet"
multiIfTopo = "MultiIf"
topoAttr = "topoType"
switchNamePrefix = "s"
clientName = "Client"
serverName = "Server"
routerName = "Router"
"""Simple MpTopo"""
def __init__(self, topoBuilder, topoParam):
self.topoBuilder = topoBuilder
self.topoParam = topoParam
def commandTo(self, who, cmd):
self.topoBuilder.commandTo(who, cmd)
def getHost(self, who):
return self.topoBuilder.getHost(who)
def addHost(self, host):
return self.topoBuilder.addHost(host)
def addSwitch(self, switch):
return self.topoBuilder.addSwitch(switch)
def addLink(self, fromA, toB, **kwargs):
self.topoBuilder.addLink(fromA,toB,**kwargs)
def getCLI(self):
self.topoBuilder.getCLI()
def startNetwork(self):
self.topoBuilder.startNetwork()
def stopNetwork(self):
self.topoBuilder.stopNetwork()