51455433474eb53374d831543398727bff54e9b5
2 A simple topology with two PoPs for the y1 demo story board.
4 (dc1) <<-->> s1 <<-->> (dc2)
8 from mininet
.log
import setLogLevel
9 from emuvim
.dcemulator
.net
import DCNetwork
10 from emuvim
.api
.zerorpc
.compute
import ZeroRpcApiEndpoint
12 logging
.basicConfig(level
=logging
.INFO
)
15 def create_topology1():
18 dc1
= net
.addDatacenter("dc1")
19 dc2
= net
.addDatacenter("dc2")
20 s1
= net
.addSwitch("s1")
24 # create a new instance of a endpoint implementation
25 zapi1
= ZeroRpcApiEndpoint("0.0.0.0", 4242)
26 # connect data centers to this endpoint
27 zapi1
.connectDatacenter(dc1
)
28 zapi1
.connectDatacenter(dc2
)
29 # run API endpoint server (in another thread, don't block)
32 # TODO add "fake gatekeeper" api endpoint and connect it to both dcs
34 # start the emulation platform
41 setLogLevel('info') # set Mininet loglevel
45 if __name__
== '__main__':