add birectional option for set Chain
[osm/vim-emu.git] / src / emuvim / cli / network.py
index a4b0233..911c5ef 100755 (executable)
@@ -36,7 +36,8 @@ class ZeroRpcClient(object):
             vnf_dst_interface=self._parse_vnf_interface(args.get("destination")),\r
             weight=args.get("weight"),\r
             match=args.get("match"),\r
-            bidirectional=args.get("bidirectional"))\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
@@ -54,7 +55,8 @@ 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
+            cookie=args.get("cookie"))\r
 \r
         r = self.c.network_action_stop(\r
             #args.get("datacenter"),\r
@@ -101,7 +103,9 @@ parser.add_argument(
     "--bidirectional", "-b", dest="bidirectional",\r
     action='store_true',\r
     help="add/remove the flow entries in 2 directions")\r
-\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