- Added "--dpid" option to set the bridge dpid. Default is random.
- Added shortcut cli command 'flowtable', which executes 'ofctl dump-flows ofbr0'
diff --git a/tools/ovs-ctl/ovs-ctl.py b/tools/ovs-ctl/ovs-ctl.py
index 4d4f100..eb666a3 100755
--- a/tools/ovs-ctl/ovs-ctl.py
+++ b/tools/ovs-ctl/ovs-ctl.py
@@ -167,6 +167,7 @@
gParser.add_argument("--cport", type=int, help="Controller Port",
default=6633)
+gParser.add_argument("--dpid", help="DPID")
gParser.add_argument("--max_backoff", help="VSwitchD max backoff value",
default=1000, type=int)
@@ -474,6 +475,10 @@
vsctl(["add-port", gArgs.bridge, "veth%d" % (lb_idx)])
vsctl(["add-port", gArgs.bridge, "veth%d" % (lb_idx+1)])
+if gArgs.dpid:
+ vsctl(["set", "bridge", gArgs.bridge, "other-config:datapath-id=%s" % (
+ gArgs.dpid)])
+
# Set controller
vsctl(["set-controller", gArgs.bridge, "tcp:%s:%s" % (
gArgs.cip, gArgs.cport)])
@@ -495,6 +500,8 @@
vsctl(args[1:])
elif args[0] == "ofctl" or args[0] == "ovs-ofctl":
ofctl(args[1:])
+ elif args[0] == "dumpflows" or args[0] == "flowtable":
+ ofctl(["dump-flows", "%s" % gArgs.bridge])
elif args[0] == "exit" or args[0] == "quit":
break;
elif args[0] == "kill":