Merge pull request #131 from stevenvanrossem/master
[osm/vim-emu.git] / src / emuvim / examples / monitoring_demo_topology_restapi.py
index 8f46bd2..c3e4cd6 100755 (executable)
@@ -42,6 +42,7 @@ def create_topology1():
         instances aka. VNFs (represented by Docker containers), passing through
         different switches and datacenters of the emulated topology
     """
         instances aka. VNFs (represented by Docker containers), passing through
         different switches and datacenters of the emulated topology
     """
+    # create monitoring api endpoint for backwards compatibility with zerorpc api 
     mon_api = ZeroRpcApiEndpointDCNetwork("0.0.0.0", 5151)
     mon_api.connectDCNetwork(net)
     mon_api.start()
     mon_api = ZeroRpcApiEndpointDCNetwork("0.0.0.0", 5151)
     mon_api.connectDCNetwork(net)
     mon_api.start()
@@ -89,7 +90,8 @@ def create_topology1():
     zapi1.start()
 
     # create a new instance of a endpoint implementation
     zapi1.start()
 
     # create a new instance of a endpoint implementation
-    api1 = RestApiEndpoint("127.0.0.1", 5000)
+    # the restapi handles all compute, networking and monitoring commands in one api endpoint
+    api1 = RestApiEndpoint("0.0.0.0", 5001)
     # connect data centers to this endpoint
     api1.connectDatacenter(dc1)
     api1.connectDatacenter(dc2)
     # connect data centers to this endpoint
     api1.connectDatacenter(dc1)
     api1.connectDatacenter(dc2)