| from mininet.topo import Topo |
| "Internet Topology Zoo Specimen." |
| def addSwitch( self, name, **opts ): |
| kwargs = { 'protocols' : 'OpenFlow13' } |
| return super(Tower, self).addSwitch( name, **kwargs ) |
| # Create the two spine switches |
| spines.append(self.addSwitch( 's1' )) |
| spines.append(self.addSwitch( 's2' )) |
| # Now create the leaf switches, their hosts and connect them together |
| leaf = self.addSwitch( 's1%d' % sn ) |
| self.addLink(leaf, spine) |
| host = self.addHost( 'h%d%d' % (sn, j + 1) ) |
| self.addLink( host, leaf ) |
| topos = { 'tower': ( lambda: Tower() ) } |
| if __name__ == '__main__': |