stay compatible with Python2
This commit is contained in:
parent
e5042cc296
commit
d37f6d6405
@ -1,7 +1,7 @@
|
||||
from .parameter import ExperienceParameter
|
||||
from mpMultiInterfaceTopo import MpMultiInterfaceTopo
|
||||
|
||||
class Experience:
|
||||
class Experience(object):
|
||||
PING = "ping"
|
||||
NCPV = "ncpv"
|
||||
NC = "nc"
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
class Parameter:
|
||||
class Parameter(object):
|
||||
def __init__(self, paramFile):
|
||||
self.paramDic = {}
|
||||
print("Create the param Object")
|
||||
@ -208,10 +208,10 @@ class ExperienceParameter(Parameter):
|
||||
defaultValue[BACKUPPATH1] = "0"
|
||||
|
||||
def __init__(self, paramFile):
|
||||
super().__init__(paramFile)
|
||||
super(ExperienceParameter, self).__init__(paramFile)
|
||||
|
||||
def getParam(self, key):
|
||||
val = super().getParam(key)
|
||||
val = super(ExperienceParameter, self).getParam(key)
|
||||
if val is None:
|
||||
if key in ExperienceParameter.defaultValue:
|
||||
return ExperienceParameter.defaultValue[key]
|
||||
|
@ -89,7 +89,7 @@ class TopoParameter(Parameter):
|
||||
s = s + self.linkCharacteristics[-1].__str__()
|
||||
return s
|
||||
|
||||
class Topo:
|
||||
class Topo(object):
|
||||
mininetBuilder = "mininet"
|
||||
multiIfTopo = "MultiIf"
|
||||
ECMPLikeTopo = "ECMPLike"
|
||||
@ -149,7 +149,7 @@ class Topo:
|
||||
self.topoBuilder.stopNetwork()
|
||||
|
||||
|
||||
class TopoConfig:
|
||||
class TopoConfig(object):
|
||||
|
||||
PING_OUTPUT = "ping.log"
|
||||
|
||||
|
@ -4,7 +4,7 @@ from struct import *
|
||||
|
||||
class MpECMPSingleInterfaceConfig(TopoConfig):
|
||||
def __init__(self, topo, param):
|
||||
super().__init__(topo, param)
|
||||
super(MpECMPSingleInterfaceConfig, self).__init__(topo, param)
|
||||
|
||||
def configureRoute(self):
|
||||
i = 0
|
||||
|
@ -2,7 +2,7 @@ from core.topo import Topo
|
||||
|
||||
class MpECMPSingleInterfaceTopo(Topo):
|
||||
def __init__(self, topoBuilder, parameterFile):
|
||||
super().__init__(topoBuilder, parameterFile)
|
||||
super(MpECMPSingleInterfaceTopo, self).__init__(topoBuilder, parameterFile)
|
||||
|
||||
print("Hello ECMP topo")
|
||||
|
||||
|
@ -3,7 +3,7 @@ from mpMultiInterfaceTopo import MpMultiInterfaceTopo
|
||||
|
||||
class MpMultiInterfaceConfig(TopoConfig):
|
||||
def __init__(self, topo, param):
|
||||
super().__init__(topo, param)
|
||||
super(MpMultiInterfaceConfig, self).__init__(topo, param)
|
||||
|
||||
def configureRoute(self):
|
||||
i = 0
|
||||
|
@ -3,7 +3,7 @@ from core.topo import TopoConfig, Topo, TopoParameter
|
||||
|
||||
class MpMultiInterfaceCongConfig(TopoConfig):
|
||||
def __init__(self, topo, param):
|
||||
super().__init__(topo, param)
|
||||
super(MpMultiInterfaceCongConfig, self).__init__(topo, param)
|
||||
|
||||
def configureRoute(self):
|
||||
i = 0
|
||||
|
@ -5,7 +5,7 @@ class MpMultiInterfaceCongTopo(Topo):
|
||||
congServerName = "CSer"
|
||||
|
||||
def __init__(self, topoBuilder, parameterFile):
|
||||
super().__init__(topoBuilder, parameterFile)
|
||||
super(MpMultiInterfaceCongTopo, self).__init__(topoBuilder, parameterFile)
|
||||
print("Hello from topo multi if")
|
||||
self.client = self.addHost(Topo.clientName)
|
||||
self.server = self.addHost(Topo.serverName)
|
||||
|
@ -2,7 +2,7 @@ from core.topo import Topo
|
||||
|
||||
class MpMultiInterfaceTopo(Topo):
|
||||
def __init__(self, topoBuilder, parameterFile):
|
||||
super().__init__(topoBuilder, parameterFile)
|
||||
super(MpMultiInterfaceTopo, self).__init__(topoBuilder, parameterFile)
|
||||
print("Hello from topo multi if")
|
||||
self.client = self.addHost(Topo.clientName)
|
||||
self.server = self.addHost(Topo.serverName)
|
||||
|
@ -3,7 +3,7 @@ from mpTwoInterfaceCongestionTopo import MpTwoInterfaceCongestionTopo
|
||||
|
||||
class MpTwoInterfaceCongestionConfig(TopoConfig):
|
||||
def __init__(self, topo, param):
|
||||
super().__init__(topo, param)
|
||||
super(MpTwoInterfaceCongestionConfig, self).__init__(topo, param)
|
||||
|
||||
def configureRoute(self):
|
||||
# Client - Router
|
||||
|
@ -2,7 +2,7 @@ from core.topo import Topo
|
||||
|
||||
class MpTwoInterfaceCongestionTopo(Topo):
|
||||
def __init__(self, topoBuilder, parameterFile):
|
||||
super().__init__(topoBuilder, parameterFile)
|
||||
super(MpTwoInterfaceCongestionTopo, self).__init__(topoBuilder, parameterFile)
|
||||
|
||||
print("Hello from topo two ifs cong")
|
||||
print("Expected topo:")
|
||||
|
Loading…
Reference in New Issue
Block a user