From b731e2f1dd0972409b136aebc7b463dd72c9cfad Mon Sep 17 00:00:00 2001 From: CNlucius Date: Tue, 13 Sep 2016 11:40:12 +0800 Subject: ONOSFW-171 O/S-SFC-ONOS scenario documentation Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365 Signed-off-by: CNlucius --- framework/src/onos/tools/test/topos/fractal.py | 56 -------------------------- 1 file changed, 56 deletions(-) delete mode 100755 framework/src/onos/tools/test/topos/fractal.py (limited to 'framework/src/onos/tools/test/topos/fractal.py') diff --git a/framework/src/onos/tools/test/topos/fractal.py b/framework/src/onos/tools/test/topos/fractal.py deleted file mode 100755 index bc5c6899..00000000 --- a/framework/src/onos/tools/test/topos/fractal.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python - -from mininet.topo import Topo - -class FractalTopo( Topo ): - def build( self, n=3, h=2 ): - - clusters = [] - for i in range( 1, n+1 ): - clusterSws = [] - # create switches in cluster - for j in range( 1, n+1 ): - id = i * 1000 + j - sw = self.addSwitch('s%d' % id, dpid=str(id).zfill(16)) - [ self.addLink(s, sw) for s in clusterSws ] - clusterSws.append(sw) - clusters.append(clusterSws) - - for i in range( 1, n+1 ): - # create the edge switch - id = i * 10000 - sw = self.addSwitch('s%d' % id, dpid=str(id).zfill(16)) - self.addLink(clusters[i-1].pop(0), sw) - for j in range( 1, h+1 ): - id = i * 1000 + j - host = self.addHost( 'h%d' % id ) - self.addLink( host, sw ) - - for i in range( 1, n+1 ): - # connect the clusters - if i == n: - id = n * 1000000 + 10000 - sw = self.addSwitch('s%d' % id, dpid=str(id).zfill(16)) - self.addLink(clusters[i-1].pop(0), sw) - self.addLink(clusters[0].pop(0), sw) - - else: - id = (i+1) * 1000000 + i * 10000 - sw = self.addSwitch('s%d' % id, dpid=str(id).zfill(16)) - self.addLink(clusters[i-1].pop(0), sw) - self.addLink(clusters[i].pop(0), sw) - - -topos = { 'fractal': FractalTopo } - -def run(): - topo = FractalTopo() - net = Mininet( topo=topo, controller=RemoteController, autoSetMacs=True ) - net.start() - CLI( net ) - net.stop() - -if __name__ == '__main__': - setLogLevel( 'info' ) - run() - -- cgit 1.2.3-korg