From 059fdb4d1cf0617e341e4542b061719980a24dc6 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Tue, 21 Jun 2016 17:35:03 +0200 Subject: [PATCH] mpExperience/mpParamXp: allow path 0 to be backup too --- src/mpExperience.py | 4 ++++ src/mpParamXp.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/mpExperience.py b/src/mpExperience.py index 40547d3..bbcfd0b 100644 --- a/src/mpExperience.py +++ b/src/mpExperience.py @@ -60,6 +60,10 @@ class MpExperience: self.mpConfig.getRouterInterfaceSwitch(1) + " priority " + str(prioPath1)) + backupPath0 = self.xpParam.getParam(MpParamXp.BACKUPPATH0) + if int(backupPath0) > 0: + self.mpTopo.commandTo(self.mpConfig.client, self.mpConfig.interfaceBUPCommand(self.mpConfig.getClientInterface(0))) + self.mpTopo.commandTo(self.mpConfig.router, self.mpConfig.interfaceBUPCommand(self.mpConfig.getRouterInterfaceSwitch(0))) backupPath1 = self.xpParam.getParam(MpParamXp.BACKUPPATH1) if int(backupPath1) > 0: self.mpTopo.commandTo(self.mpConfig.client, self.mpConfig.interfaceBUPCommand(self.mpConfig.getClientInterface(1))) diff --git a/src/mpParamXp.py b/src/mpParamXp.py index 34a6f1f..8d82ea8 100644 --- a/src/mpParamXp.py +++ b/src/mpParamXp.py @@ -56,6 +56,7 @@ class MpParamXp(MpParam): BURSTSOFFPACKETSSEC = "burstsOffPacketsSec" PRIOPATH0 = "prioPath0" PRIOPATH1 = "prioPath1" + BACKUPPATH0 = "backupPath0" BACKUPPATH1 = "backupPath1" EXPIRATION = "expiration" METRIC = "metric" @@ -135,6 +136,7 @@ class MpParamXp(MpParam): defaultValue[BURSTSOFFPACKETSSEC] = "750" defaultValue[PRIOPATH0] = "0" defaultValue[PRIOPATH1] = "0" + defaultValue[BACKUPPATH0] = "0" defaultValue[BACKUPPATH1] = "0" def __init__(self, paramFile):