diff --git a/src/mpConfig.py b/src/mpConfig.py index 17d1642..315fa85 100644 --- a/src/mpConfig.py +++ b/src/mpConfig.py @@ -28,10 +28,6 @@ class MpConfig: def configureInterfaces(self): pass - def configureNetwork(self): - pass - - def getClientInterfaceCount(self): raise Exception("To be implemented") diff --git a/src/mpExperience.py b/src/mpExperience.py index 1306508..9d1372f 100644 --- a/src/mpExperience.py +++ b/src/mpExperience.py @@ -17,10 +17,12 @@ class MpExperience: def prepare(self): self.setupSysctl() self.runTcpDump() + self.runNetemAt() pass def runNetemAt(self): if not self.mpTopo.changeNetem == "yes": + print("I don't need to change netem") return print("Will change netem config on the fly") links = self.mpTopo.getLinkCharacteristics() diff --git a/src/mpLinkCharacteristics.py b/src/mpLinkCharacteristics.py index d50e0c4..8da38bb 100644 --- a/src/mpLinkCharacteristics.py +++ b/src/mpLinkCharacteristics.py @@ -29,10 +29,11 @@ class MpLinkCharacteristics: cmd = cmd + " && " cmd = cmd + " echo " + n.cmd + " && " cmd = cmd + " true &" + return cmd def asDict(self): d = {} - d['bw'] = int(self.bandwidth) + d['bw'] = float(self.bandwidth) d['delay'] = self.delay + "ms" d['max_queue_size'] = int(self.queueSize) return d diff --git a/src/mpTopo.py b/src/mpTopo.py index 318ed76..c1c0b7b 100644 --- a/src/mpTopo.py +++ b/src/mpTopo.py @@ -20,7 +20,7 @@ class MpTopo: self.logFile = open(MpTopo.cmdLog, 'w') def getLinkCharacteristics(self): - return topoParam.linkCharacteristics() + return self.topoParam.linkCharacteristics def commandTo(self, who, cmd): self.logFile.write(who.__str__() + " : " + cmd + "\n")