SDN chaining now via ryu rest api
[osm/vim-emu.git] / src / emuvim / cli / network.py
index bf107e8..53007cd 100755 (executable)
@@ -35,7 +35,9 @@ class ZeroRpcClient(object):
             vnf_src_interface=self._parse_vnf_interface(args.get("source")),\r
             vnf_dst_interface=self._parse_vnf_interface(args.get("destination")),\r
             weight=args.get("weight"),\r
-            match=args.get("match"))\r
+            match=args.get("match"),\r
+            bidirectional=args.get("bidirectional"),\r
+            cookie=args.get("cookie"))\r
 \r
         # note zerorpc does not support named arguments\r
         r = self.c.network_action_start(\r
@@ -53,7 +55,9 @@ class ZeroRpcClient(object):
             vnf_src_interface=self._parse_vnf_interface(args.get("source")),\r
             vnf_dst_interface=self._parse_vnf_interface(args.get("destination")),\r
             weight=args.get("weight"),\r
-            match=args.get("match"))\r
+            match=args.get("match"),\r
+            bidirectional=args.get("bidirectional"),\r
+            cookie=args.get("cookie"))\r
 \r
         r = self.c.network_action_stop(\r
             #args.get("datacenter"),\r
@@ -96,6 +100,13 @@ parser.add_argument(
 parser.add_argument(\r
     "--match", "-m", dest="match",\r
     help="string holding extra matches for the flow entries")\r
+parser.add_argument(\r
+    "--bidirectional", "-b", dest="bidirectional",\r
+    action='store_true',\r
+    help="add/remove the flow entries in 2 directions")\r
+parser.add_argument(\r
+    "--cookie", "-c", dest="cookie",\r
+    help="cookie for this flow")\r
 \r
 def main(argv):\r
     args = vars(parser.parse_args(argv))\r