aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/topos/topo-200sw-linkalarm.py
blob: bb964e2b255adbc9fd44246ab8809a92dffc7f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from mininet.topo import Topo

class MyTopo( Topo ):
        "10 'floating' switch topology"

        def __init__( self ):
                # Initialize topology
                Topo.__init__( self )

                sw_list = []
                swC = self.addSwitch('sc', dpid = 'ffffffff00000001')

                for i in range(1, 201):
                        switch=self.addSwitch('s'+str(i), dpid = str(i).zfill(16))
                        self.addLink(switch,swC)

                        sw_list.append(switch)

topos = { 'mytopo': ( lambda: MyTopo() ) }