[ovs-dev] [code] OFTest for OVS

Ben Pfaff blp at nicira.com
Fri Oct 26 16:36:22 UTC 2012


On Thu, Oct 25, 2012 at 11:14:34PM -0700, Ben Pfaff wrote:
> On Thu, Oct 25, 2012 at 05:12:21PM -0700, Ben Pfaff wrote:
> > It passes a few tests; I've only tried a few.
> > 
> > Now that I look at it, there are some bugs here that will prevent
> > traffic from actually passing through, but they are not fundamental to
> > the approach.  I'm mostly passing this along in case anyone wants to
> > comment on the idea; I've already spent more time on it than I should
> > have.
> 
> I'm attaching updated dummy.py and start-sandbox scripts.  With these
> versions, the command

Well, I meant to attach them.  Here they are.
-------------- next part --------------
#! /bin/sh

set -ex

srcdir=$HOME/nicira/ovs
builddir=$srcdir/_build
PATH=$builddir/ovsdb:$builddir/vswitchd:$builddir/utilities:$PATH

cd $builddir
rm -rf sandbox
mkdir sandbox
cd sandbox

OVS_RUNDIR=`pwd`; export OVS_RUNDIR
OVS_LOGDIR=`pwd`; export OVS_LOGDIR
OVS_DBDIR=`pwd`; export OVS_DBDIR
OVS_SYSCONFDIR=`pwd`; export OVS_SYSCONFDIR

trap 'kill `cat *.pid`' 0 1 2 3 13 14 15

touch .conf.db.~lock~
rm -f conf.db
ovsdb-tool create conf.db $srcdir/vswitchd/vswitch.ovsschema

ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock
ovs-vsctl --no-wait init

ovs-vswitchd --detach --no-chdir --pidfile --log-file --enable-dummy --disable-system -vvconn -vnetdev_dummy

ovs-vsctl --no-wait \
    -- add-br br0 \
    -- set bridge br0 datapath-type=dummy fail-mode=secure

for port in p1 p2 p3 p4; do
    ovs-vsctl --no-wait \
	-- add-port br0 $port \
	-- set interface $port type=dummy \
                               options:pstream=punix:$OVS_RUNDIR/$port
done

ovs-vsctl \
    -- set-controller br0 tcp:127.0.0.1 \
    -- set controller br0 connection-mode=out-of-band max-backoff=1000

read line
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dummy.py
Type: text/x-python
Size: 6571 bytes
Desc: not available
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20121026/6a10092c/attachment-0005.py>


More information about the dev mailing list