X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=csit%2Fsuites%2Fvpnservice%2Fcustom.py;h=6ec2bf74eff3aaa2714edc0a9d4eec8e23020103;hb=3453e6087f48baeb46f6db84c8e877a8e2ffc4ec;hp=64746be533a919bcc9967cca24e3dbe09678f418;hpb=59e81c38620fa1b61e15771191e35771450b9499;p=integration%2Ftest.git diff --git a/csit/suites/vpnservice/custom.py b/csit/suites/vpnservice/custom.py index 64746be533..6ec2bf74ef 100755 --- a/csit/suites/vpnservice/custom.py +++ b/csit/suites/vpnservice/custom.py @@ -17,24 +17,27 @@ from mininet.topo import Topo class Switch1(Topo): """Single switch s1 connected to n=2 hosts.""" + def __init__(self): Topo.__init__(self) switch = self.addSwitch('s1') n = 2 for h in range(n): - host = self.addHost('h%s' % (h + 1), mac="00:00:00:00:00:0"+str(h+1), ip="10.0.0."+str(h+1)) + host = self.addHost('h%s' % (h + 1), mac="00:00:00:00:00:0" + str(h + 1), ip="10.0.0." + str(h + 1)) self.addLink(host, switch) class Switch2(Topo): """Single switch s2 connected to n=2 hosts.""" + def __init__(self): Topo.__init__(self) switch = self.addSwitch('s2') n = 2 for h in range(n): - host = self.addHost('h%s' % (h + 3), mac="00:00:00:00:00:0"+str(h+3), ip="10.0.0."+str(h+3)) + host = self.addHost('h%s' % (h + 3), mac="00:00:00:00:00:0" + str(h + 3), ip="10.0.0." + str(h + 3)) self.addLink(host, switch) + topos = {'Switch1': (lambda: Switch1()), 'Switch2': (lambda: Switch2())}