Revision b1ec912d mininet/topolib.py

View differences:

mininet/topolib.py
3 3
from mininet.topo import Topo
4 4
from mininet.net import Mininet
5 5

  
6
# The build() method is expected to do both of these things:
7
# pylint: disable=attribute-defined-outside-init, arguments-differ
8

  
6 9
class TreeTopo( Topo ):
7 10
    "Topology for a tree network with a given depth and fanout."
8 11

  
......
53 56
                loc = '%dx%d' % ( i + 1, j + 1 )
54 57
                # dpid cannot be zero for OVS
55 58
                dpid = ( i + 1 ) * 256 + ( j + 1 )
56
                switch = switches[ i, j ] = self.addSwitch( 's' + loc, dpid='%016x' % dpid )
59
                switch = switches[ i, j ] = self.addSwitch(
60
                    's' + loc, dpid='%016x' % dpid )
57 61
                host = hosts[ i, j ] = self.addHost( 'h' + loc )
58 62
                self.addLink( host, switch )
59 63
        # Connect switches
......
65 69
                self.addLink( sw1, sw2 )
66 70
                self.addLink( sw1, sw3 )
67 71

  
68

  
69

  
72
# pylint: enable=attribute-defined-outside-init, arguments-differ

Also available in: Unified diff