From c0ef540e9ca7b07d6e7ea8447e1101e2fa8e046c Mon Sep 17 00:00:00 2001 From: Benjamin Hesmans Date: Thu, 5 Mar 2015 11:32:11 +0100 Subject: [PATCH] add none experiment Signed-off-by: Benjamin Hesmans --- src/mpExperience.py | 2 ++ src/mpExperienceNone.py | 16 ++++++++++++++++ src/mpParamXp.py | 2 +- src/mpXpRunner.py | 6 +++--- 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 src/mpExperienceNone.py diff --git a/src/mpExperience.py b/src/mpExperience.py index 902ca13..1d7ce3f 100644 --- a/src/mpExperience.py +++ b/src/mpExperience.py @@ -4,6 +4,8 @@ class MpExperience: PING = "ping" NCPV = "ncpv" NC = "nc" + NONE = "none" + def __init__(self, xpParam, mpTopo, mpConfig): self.xpParam = xpParam self.mpTopo = mpTopo diff --git a/src/mpExperienceNone.py b/src/mpExperienceNone.py new file mode 100644 index 0000000..1aafca8 --- /dev/null +++ b/src/mpExperienceNone.py @@ -0,0 +1,16 @@ +from mpExperience import MpExperience +from mpParamXp import MpParamXp + +class MpExperienceNone(MpExperience): + def __init__(self, xpParamFile, mpTopo, mpConfig): + MpExperience.__init__(self, xpParamFile, mpTopo, mpConfig) + MpExperience.classicRun(self) + + def prepapre(self): + MpExperience.prepare(self) + + def clean(self): + MpExperience.clean(self) + + def run(self): + self.mpTopo.getCLI() diff --git a/src/mpParamXp.py b/src/mpParamXp.py index 86de402..22633fe 100644 --- a/src/mpParamXp.py +++ b/src/mpParamXp.py @@ -51,7 +51,7 @@ class MpParamXp(MpParam): defaultValue[CLIENTPCAP] = "no" defaultValue[SERVERPCAP] = "no" - defaultValue[XPTYPE] = "ping" + defaultValue[XPTYPE] = "none" defaultValue[PINGCOUNT] = "5" defaultValue[DDIBS] = "1k" defaultValue[DDOBS] = "1k" diff --git a/src/mpXpRunner.py b/src/mpXpRunner.py index c6b648f..ce063ef 100644 --- a/src/mpXpRunner.py +++ b/src/mpXpRunner.py @@ -65,15 +65,15 @@ class MpXpRunner: if xp == MpExperience.PING: MpExperiencePing(self.xpParam, self.mpTopo, self.mpTopoConfig) - self.mpTopo.getCLI() elif xp == MpExperience.NCPV: MpExperienceNCPV(self.xpParam, self.mpTopo, self.mpTopoConfig) - self.mpTopo.getCLI() elif xp == MpExperience.NC: MpExperienceNC(self.xpParam, self.mpTopo, self.mpTopoConfig) - self.mpTopo.getCLI() + elif xp == MpExperience.NONE: + MpExperienceNC(self.xpParam, self.mpTopo, + self.mpTopoConfig) else: print("Unfound xp type..." + xp)