Example #1
0
        self.addLink( DLLS , KSCY)
        self.addLink( DLLS , SNFN)
        self.addLink( DLLS , LA03)
        self.addLink( DLLS , LA03)
        self.addLink( DNVR , KSCY)
        self.addLink( DNVR , SNFN)
        self.addLink( DNVR , SNFN)
        self.addLink( DNVR , SLKC)
        self.addLink( KSCY , SNFN)
        self.addLink( SNFN , SCRM)
        self.addLink( SNFN , PTLD)
        self.addLink( SNFN , STTL)
        self.addLink( SNFN , SLKC)
        self.addLink( SNFN , LA03)
        self.addLink( SNFN , LA03)
        self.addLink( SNFN , LA03)
        self.addLink( SCRM , SLKC)
        self.addLink( PTLD , STTL)
        self.addLink( SLKC , LA03)
        self.addLink( LA03 , SNDG)
        self.addLink( LA03 , SNDG)
        self.addLink( LA03 , PHNX)
        self.addLink( LA03 , PHNX)
        self.addLink( SNDG , PHNX)

topos = { 'att': ( lambda: AttMplsTopo() ) }

if __name__ == '__main__':
    from onosnet import run
    run( AttMplsTopo() )
Example #2
0
        spines.append(self.addSwitch('s2'))

        # Create two links between the spine switches
        self.addLink(spines[0], spines[1])
        #TODO add second link between spines when multi-link topos are supported
        #self.addLink(spines[0], spines[1])
        
        # Now create the leaf switches, their hosts and connect them together
        i = 1
        c = 0
        while i <= k:
            leaves.append(self.addSwitch('s1%d' % i))
            for spine in spines:
                self.addLink(leaves[i-1], spine)

            j = 1
            while j <= h:
                hosts.append(self.addHost('h%d%d' % (i, j)))
                self.addLink(hosts[c], leaves[i-1])
                j+=1
                c+=1

            i+=1

topos = { 'tower': TowerTopo }

if __name__ == '__main__':
    from onosnet import run
    run( TowerTopo() )

Example #3
0
#!/usr/bin/python

from onosnet import run
from ukRegion import UkRegionTopo

run( UkRegionTopo() )
Example #4
0
#!/usr/bin/python

from onosnet import run
from uk import UkTopo

run( UkTopo() )
Example #5
0
        self.addLink( FRA , POZ, bw=10 )
        self.addLink( FRA , PRA, bw=10 )
        self.addLink( FRA , BUD, bw=10 )
        self.addLink( FRA , VIE, bw=10 )
        self.addLink( POZ , PRA, bw=10 )
        self.addLink( POZ , KAU, bw=10 )
        self.addLink( KAU , RIG, bw=10 )
        self.addLink( ZAG , VIE, bw=10 )
        self.addLink( ZAG , BUD, bw=10 )
        self.addLink( BUD , PRA, bw=10 )
        self.addLink( BUD , BRA, bw=10 )
        self.addLink( BUD , BUC, bw=10 )
        self.addLink( BUD , SOF, bw=10 )
        self.addLink( BUD , LJU, bw=10 )
        self.addLink( BUC , SOF, bw=10 )
        self.addLink( BUC , VIE, bw=10 )
        self.addLink( VIE , BRA, bw=10 )
        self.addLink( RIG , TLN, bw=10 )
        self.addLink( TLN , HAM, bw=10 )
        self.addLink( OSL , STO, bw=10 )
        self.addLink( STO , HEL, bw=10 )
        self.addLink( STO , COP, bw=10 )
        self.addLink( OSL , COP, bw=10 )
        self.addLink( TLN , HEL, bw=10 )

topos = { 'att': ( lambda: GeantMplsTopo() ) }

if __name__ == '__main__':
    from onosnet import run
    run( GeantMplsTopo() )
Example #6
0
    def __init__(self):
        Topo.__init__(self)

        s1 = self.addSwitch('s1')
        s2 = self.addSwitch('s2')
        s3 = self.addSwitch('s3')
        s4 = self.addSwitch('s4')

        v100h1 = self.addHost('v100h1', cls=VLANHost, vlan=100, mac='00:00:00:00:00:01')
        v200h1 = self.addHost('v200h1', cls=VLANHost, vlan=200, mac='00:00:00:00:00:02')
        v300h1 = self.addHost('v300h1', cls=VLANHost, vlan=300, mac='00:00:00:00:00:03')
        v400h1 = self.addHost('v400h1', cls=VLANHost, vlan=400, mac='00:00:00:00:00:04')

        self.addLink(s1, v100h1, port1=1, port2=0)
        self.addLink(s2, v200h1, port1=1, port2=0)
        self.addLink(s3, v300h1, port1=1, port2=0)
        self.addLink(s4, v400h1, port1=1, port2=0)

        self.addLink(s1, s4)
        self.addLink(s1, s2)
        self.addLink(s2, s4)
        self.addLink(s2, s3)
        self.addLink(s3, s4)

topos = { 'vpls': ( lambda: VplsTopo() ) }

if __name__ == '__main__':
    from onosnet import run
    run(VplsTopo())