minor cleanups
authorstevenvanrossem <steven.vanrossem@intec.ugent.be>
Thu, 12 May 2016 09:52:08 +0000 (11:52 +0200)
committerstevenvanrossem <steven.vanrossem@intec.ugent.be>
Thu, 12 May 2016 09:52:08 +0000 (11:52 +0200)
src/emuvim/cli/network.py
src/emuvim/dcemulator/net.py
src/emuvim/examples/monitoring_demo_topology.py

index 53007cd..516a752 100755 (executable)
@@ -84,7 +84,8 @@ class ZeroRpcClient(object):
 parser = argparse.ArgumentParser(description='son-emu network')\r
 parser.add_argument(\r
     "command",\r
 parser = argparse.ArgumentParser(description='son-emu network')\r
 parser.add_argument(\r
     "command",\r
-    help="Action to be executed: add|remove")\r
+    choices=['add', 'remove'],\r
+    help="Action to be executed.")\r
 parser.add_argument(\r
     "--datacenter", "-d", dest="datacenter",\r
     help="Data center to in which the network action should be initiated")\r
 parser.add_argument(\r
     "--datacenter", "-d", dest="datacenter",\r
     help="Data center to in which the network action should be initiated")\r
@@ -103,10 +104,10 @@ parser.add_argument(
 parser.add_argument(\r
     "--bidirectional", "-b", dest="bidirectional",\r
     action='store_true',\r
 parser.add_argument(\r
     "--bidirectional", "-b", dest="bidirectional",\r
     action='store_true',\r
-    help="add/remove the flow entries in 2 directions")\r
+    help="add/remove the flow entries from src to dst and back")\r
 parser.add_argument(\r
     "--cookie", "-c", dest="cookie",\r
 parser.add_argument(\r
     "--cookie", "-c", dest="cookie",\r
-    help="cookie for this flow")\r
+    help="cookie for this flow, as easy to use identifier (eg. per tenant/service)")\r
 \r
 def main(argv):\r
     args = vars(parser.parse_args(argv))\r
 \r
 def main(argv):\r
     args = vars(parser.parse_args(argv))\r
index 3556535..f5bab44 100755 (executable)
@@ -479,7 +479,6 @@ class DCNetwork(Containernet):
             self.ryu_process.kill()
 
     def ryu_REST(self, prefix, dpid=None, data=None):
             self.ryu_process.kill()
 
     def ryu_REST(self, prefix, dpid=None, data=None):
-        if data: logging.info('log POST: {0}'.format(str(data)))
         try:
             if dpid:
                 url = self.ryu_REST_api + '/' + str(prefix) + '/' + str(dpid)
         try:
             if dpid:
                 url = self.ryu_REST_api + '/' + str(prefix) + '/' + str(dpid)
index 4dfd5b7..0650be4 100755 (executable)
@@ -32,11 +32,16 @@ def create_topology1():
     net = DCNetwork(monitor=True, enable_learning=False)
 
     """
     net = DCNetwork(monitor=True, enable_learning=False)
 
     """
-    1b. add a monitoring agent to the DCNetwork
+    1b. Add endpoint APIs for the whole DCNetwork,
+        to access and control the networking from outside.
+        e.g., to setup forwarding paths between compute
+        instances aka. VNFs (represented by Docker containers), passing through
+        different switches and datacenters of the emulated topology
     """
     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()
+
     """
     2. Add (logical) data centers to the topology
        (each data center is one "bigswitch" in our simplified
     """
     2. Add (logical) data centers to the topology
        (each data center is one "bigswitch" in our simplified