From 63a8f60e8230e85ea89193851132f894b5e784eb Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Tue, 21 Jun 2016 17:32:19 +0200 Subject: [PATCH] mpExperience/mpParamXp: add possibility to specify backup on path 1 --- src/mpExperience.py | 5 +++++ src/mpParamXp.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/mpExperience.py b/src/mpExperience.py index bacc2b8..40547d3 100644 --- a/src/mpExperience.py +++ b/src/mpExperience.py @@ -60,6 +60,11 @@ class MpExperience: self.mpConfig.getRouterInterfaceSwitch(1) + " priority " + str(prioPath1)) + backupPath1 = self.xpParam.getParam(MpParamXp.BACKUPPATH1) + if int(backupPath1) > 0: + self.mpTopo.commandTo(self.mpConfig.client, self.mpConfig.interfaceBUPCommand(self.mpConfig.getClientInterface(1))) + self.mpTopo.commandTo(self.mpConfig.router, self.mpConfig.interfaceBUPCommand(self.mpConfig.getRouterInterfaceSwitch(1))) + def runUserspacePM(self): if self.xpParam.getParam(MpParamXp.KERNELPMC) != "netlink": print("Client : Error, I can't change the userspace pm if the kernel pm is not netlink !") diff --git a/src/mpParamXp.py b/src/mpParamXp.py index 2e739da..34a6f1f 100644 --- a/src/mpParamXp.py +++ b/src/mpParamXp.py @@ -56,6 +56,7 @@ class MpParamXp(MpParam): BURSTSOFFPACKETSSEC = "burstsOffPacketsSec" PRIOPATH0 = "prioPath0" PRIOPATH1 = "prioPath1" + BACKUPPATH1 = "backupPath1" EXPIRATION = "expiration" METRIC = "metric" @@ -134,6 +135,7 @@ class MpParamXp(MpParam): defaultValue[BURSTSOFFPACKETSSEC] = "750" defaultValue[PRIOPATH0] = "0" defaultValue[PRIOPATH1] = "0" + defaultValue[BACKUPPATH1] = "0" def __init__(self, paramFile): MpParam.__init__(self, paramFile)