add none experiment

Signed-off-by: Benjamin Hesmans <benjamin.hesmans@uclouvain.be>
This commit is contained in:
Benjamin Hesmans 2015-03-05 11:32:11 +01:00
parent 63a6e85890
commit c0ef540e9c
4 changed files with 22 additions and 4 deletions

View File

@ -4,6 +4,8 @@ class MpExperience:
PING = "ping" PING = "ping"
NCPV = "ncpv" NCPV = "ncpv"
NC = "nc" NC = "nc"
NONE = "none"
def __init__(self, xpParam, mpTopo, mpConfig): def __init__(self, xpParam, mpTopo, mpConfig):
self.xpParam = xpParam self.xpParam = xpParam
self.mpTopo = mpTopo self.mpTopo = mpTopo

16
src/mpExperienceNone.py Normal file
View File

@ -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()

View File

@ -51,7 +51,7 @@ class MpParamXp(MpParam):
defaultValue[CLIENTPCAP] = "no" defaultValue[CLIENTPCAP] = "no"
defaultValue[SERVERPCAP] = "no" defaultValue[SERVERPCAP] = "no"
defaultValue[XPTYPE] = "ping" defaultValue[XPTYPE] = "none"
defaultValue[PINGCOUNT] = "5" defaultValue[PINGCOUNT] = "5"
defaultValue[DDIBS] = "1k" defaultValue[DDIBS] = "1k"
defaultValue[DDOBS] = "1k" defaultValue[DDOBS] = "1k"

View File

@ -65,15 +65,15 @@ class MpXpRunner:
if xp == MpExperience.PING: if xp == MpExperience.PING:
MpExperiencePing(self.xpParam, self.mpTopo, MpExperiencePing(self.xpParam, self.mpTopo,
self.mpTopoConfig) self.mpTopoConfig)
self.mpTopo.getCLI()
elif xp == MpExperience.NCPV: elif xp == MpExperience.NCPV:
MpExperienceNCPV(self.xpParam, self.mpTopo, MpExperienceNCPV(self.xpParam, self.mpTopo,
self.mpTopoConfig) self.mpTopoConfig)
self.mpTopo.getCLI()
elif xp == MpExperience.NC: elif xp == MpExperience.NC:
MpExperienceNC(self.xpParam, self.mpTopo, MpExperienceNC(self.xpParam, self.mpTopo,
self.mpTopoConfig) self.mpTopoConfig)
self.mpTopo.getCLI() elif xp == MpExperience.NONE:
MpExperienceNC(self.xpParam, self.mpTopo,
self.mpTopoConfig)
else: else:
print("Unfound xp type..." + xp) print("Unfound xp type..." + xp)