blob: a058b648a7639cf3dd60f3bb6f8100a695e2b7c0 [file] [log] [blame]
Thomas Vachuska82041f52014-11-30 22:14:02 -08001#!/usr/bin/python
2
3import sys
4
5from mininet.net import Mininet
6from mininet.cli import CLI
7from mininet.log import setLogLevel
8from mininet.node import RemoteController
9from mininet.link import TCLink
10
11from attmplsext import AttMplsTopoExt
12
13setLogLevel( 'info' )
14
15def run(controllers=[ '127.0.0.1' ]):
16 net = Mininet( topo=AttMplsTopoExt(), link=TCLink, build=False, autoSetMacs=True )
17 ctrl_count = 0
18 for controllerIP in controllers:
19 net.addController( 'c%d' % ctrl_count, RemoteController, ip=controllerIP )
20 net.build()
21 net.start()
22 CLI( net )
23 net.stop()
24
25if __name__ == '__main__':
26 if len( sys.argv ) > 1:
27 controllers = sys.argv[ 1: ]
28 else:
29 print 'Usage: att-onos-ext.py <c0 IP> <c1 IP> ...'
30 exit( 1 )
31 run( controllers )