Skip to content

Commit

Permalink
ovs-sandbox: add '--vswitchd-unforced-dummy' option.
Browse files Browse the repository at this point in the history
The ovs-sandbox runs in the "dummy mode" by default.
In this mode of testing, no packets travel across
physical or virtual networks. But sometimes, we may
create veth network devices and add them to ovs bridge
for developing and testing. It's necessary to add an option.

Signed-off-by: nickcooper-zhangtonghao <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
xpu22 authored and blp committed Dec 13, 2016
1 parent e7c640c commit 24d04cf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tutorial/ovs-sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ built=false
ovn=false
ovnsb_schema=
ovnnb_schema=
dummy=override

for option; do
# This option-parsing mechanism borrowed from a Autoconf-generated
Expand Down Expand Up @@ -112,6 +113,7 @@ These options force ovs-sandbox to use an installed Open vSwitch:
--gdb-ovn-northd run ovn-northd under gdb
--gdb-ovn-controller run ovn-controller under gdb
--gdb-ovn-controller-vtep run ovn-controller-vtep under gdb
--dummy=ARG pass --enable-dummy=ARG to vswitchd (default: override)
-R, --gdb-run automatically start running the daemon in gdb
for any daemon set to run under gdb
-S, --schema=FILE use FILE as vswitch.ovsschema
Expand All @@ -135,6 +137,12 @@ EOF
srcdir=$optarg
built=false
;;
--dummy)
prev=dummy
;;
--dummy=*)
dummy=$optarg
;;
-s|--sr*)
prev=srcdir
built=false
Expand Down Expand Up @@ -361,7 +369,7 @@ run ovs-vsctl --no-wait -- init

# Start ovs-vswitchd.
rungdb $gdb_vswitchd $gdb_vswitchd_ex ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \
--enable-dummy=override -vvconn -vnetdev_dummy
--enable-dummy=$dummy -vvconn -vnetdev_dummy

if $ovn; then
ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab068
Expand Down

0 comments on commit 24d04cf

Please sign in to comment.