X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fexamples%2Fsonata_y1_demo_topology_1.py;h=7731fd276ff0bd41b849c632e918f46290ff87b6;hb=a541a3b3cfa1aa3e0a73c680773db9e78736afd3;hp=03a3fd00a4e96ee35d339332b805d2bf07fbb620;hpb=ea8db83259fd1f87774ffb3b80c8ab455481da28;p=osm%2Fvim-emu.git diff --git a/src/emuvim/examples/sonata_y1_demo_topology_1.py b/src/emuvim/examples/sonata_y1_demo_topology_1.py index 03a3fd0..7731fd2 100644 --- a/src/emuvim/examples/sonata_y1_demo_topology_1.py +++ b/src/emuvim/examples/sonata_y1_demo_topology_1.py @@ -8,6 +8,7 @@ import logging from mininet.log import setLogLevel from emuvim.dcemulator.net import DCNetwork from emuvim.api.zerorpc.compute import ZeroRpcApiEndpoint +from emuvim.api.sonata import SonataDummyGatekeeperEndpoint logging.basicConfig(level=logging.INFO) @@ -21,15 +22,19 @@ def create_topology1(): net.addLink(dc1, s1, delay="10ms") net.addLink(dc2, s1, delay="20ms") - # create a new instance of a endpoint implementation + # add the command line interface endpoint to each DC zapi1 = ZeroRpcApiEndpoint("0.0.0.0", 4242) - # connect data centers to this endpoint zapi1.connectDatacenter(dc1) zapi1.connectDatacenter(dc2) # run API endpoint server (in another thread, don't block) zapi1.start() - # TODO add "fake gatekeeper" api endpoint and connect it to both dcs + # add the SONATA dummy gatekeeper to each DC + sdkg1 = SonataDummyGatekeeperEndpoint("0.0.0.0", 8000) + sdkg1.connectDatacenter(dc1) + sdkg1.connectDatacenter(dc2) + # run the dummy gatekeeper (in another thread, don't block) + sdkg1.start() # start the emulation platform net.start() @@ -43,4 +48,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main()