change set from mininet
Signed-off-by: Benjamin Hesmans <benjamin.hesmans@uclouvain.be>
This commit is contained in:
parent
304938c381
commit
56c7196245
@ -28,10 +28,6 @@ class MpConfig:
|
|||||||
def configureInterfaces(self):
|
def configureInterfaces(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def configureNetwork(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def getClientInterfaceCount(self):
|
def getClientInterfaceCount(self):
|
||||||
raise Exception("To be implemented")
|
raise Exception("To be implemented")
|
||||||
|
|
||||||
|
@ -17,10 +17,12 @@ class MpExperience:
|
|||||||
def prepare(self):
|
def prepare(self):
|
||||||
self.setupSysctl()
|
self.setupSysctl()
|
||||||
self.runTcpDump()
|
self.runTcpDump()
|
||||||
|
self.runNetemAt()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def runNetemAt(self):
|
def runNetemAt(self):
|
||||||
if not self.mpTopo.changeNetem == "yes":
|
if not self.mpTopo.changeNetem == "yes":
|
||||||
|
print("I don't need to change netem")
|
||||||
return
|
return
|
||||||
print("Will change netem config on the fly")
|
print("Will change netem config on the fly")
|
||||||
links = self.mpTopo.getLinkCharacteristics()
|
links = self.mpTopo.getLinkCharacteristics()
|
||||||
|
@ -29,10 +29,11 @@ class MpLinkCharacteristics:
|
|||||||
cmd = cmd + " && "
|
cmd = cmd + " && "
|
||||||
cmd = cmd + " echo " + n.cmd + " && "
|
cmd = cmd + " echo " + n.cmd + " && "
|
||||||
cmd = cmd + " true &"
|
cmd = cmd + " true &"
|
||||||
|
return cmd
|
||||||
|
|
||||||
def asDict(self):
|
def asDict(self):
|
||||||
d = {}
|
d = {}
|
||||||
d['bw'] = int(self.bandwidth)
|
d['bw'] = float(self.bandwidth)
|
||||||
d['delay'] = self.delay + "ms"
|
d['delay'] = self.delay + "ms"
|
||||||
d['max_queue_size'] = int(self.queueSize)
|
d['max_queue_size'] = int(self.queueSize)
|
||||||
return d
|
return d
|
||||||
|
@ -20,7 +20,7 @@ class MpTopo:
|
|||||||
self.logFile = open(MpTopo.cmdLog, 'w')
|
self.logFile = open(MpTopo.cmdLog, 'w')
|
||||||
|
|
||||||
def getLinkCharacteristics(self):
|
def getLinkCharacteristics(self):
|
||||||
return topoParam.linkCharacteristics()
|
return self.topoParam.linkCharacteristics
|
||||||
|
|
||||||
def commandTo(self, who, cmd):
|
def commandTo(self, who, cmd):
|
||||||
self.logFile.write(who.__str__() + " : " + cmd + "\n")
|
self.logFile.write(who.__str__() + " : " + cmd + "\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user