Handle the ovs/ovn split
This is the bare minimum to run against ovs/ovn master after the split. It should be updated to handle running against system- installed OVN. Change-Id: I264200ae016e3928fb4aff3bdcc7c1a94f91cae4
This commit is contained in:
parent
51f675ac4b
commit
54ee85113a
|
@ -24,6 +24,7 @@ class FunctionalTestCase(base.TestCase):
|
|||
_connections = None
|
||||
ovsvenv = venv.OvsOvnVenvFixture(tempfile.mkdtemp(),
|
||||
ovsdir=os.getenv('OVS_SRCDIR'),
|
||||
ovndir=os.getenv('OVN_SRCDIR'),
|
||||
remove=not bool(os.getenv('KEEP_VENV')))
|
||||
atexit.register(ovsvenv.cleanUp)
|
||||
ovsvenv.setUp()
|
||||
|
|
|
@ -129,26 +129,29 @@ class OvsVenvFixture(fixtures.Fixture):
|
|||
|
||||
|
||||
class OvsOvnVenvFixture(OvsVenvFixture):
|
||||
PATH_VAR_TEMPLATE = OvsVenvFixture.PATH_VAR_TEMPLATE + (
|
||||
":{0}/ovn/controller:{0}/ovn/northd:{0}/ovn/utilities")
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.add_chassis = kwargs.pop('add_chassis', False)
|
||||
self.ovndir = kwargs.pop('ovndir')
|
||||
self.PATH_VAR_TEMPLATE += (
|
||||
":{0}/controller:{0}/northd:{0}/utilities".format(
|
||||
self.ovndir))
|
||||
super(OvsOvnVenvFixture, self).__init__(*args, **kwargs)
|
||||
self.env.update({'OVN_RUNDIR': self.venv})
|
||||
|
||||
@property
|
||||
def ovnsb_schema(self):
|
||||
path = os.path.join(self.ovsdir, 'ovn', 'ovn-sb.ovsschema')
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
return os.path.join(self.ovsdir, 'ovn-sb.ovsschema')
|
||||
return os.path.join(self.ovndir, 'ovn-sb.ovsschema')
|
||||
|
||||
@property
|
||||
def ovnnb_schema(self):
|
||||
path = os.path.join(self.ovsdir, 'ovn', 'ovn-nb.ovsschema')
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
return os.path.join(self.ovsdir, 'ovn-nb.ovsschema')
|
||||
return os.path.join(self.ovndir, 'ovn-nb.ovsschema')
|
||||
|
||||
@property
|
||||
def ovnnb_connection(self):
|
||||
|
|
|
@ -9,3 +9,9 @@ if [ "$OVS_SRCDIR" -a ! -d "$OVS_SRCDIR" ]; then
|
|||
git clone git://github.com/openvswitch/ovs.git $OVS_SRCDIR
|
||||
(cd $OVS_SRCDIR && ./boot.sh && PYTHON=/usr/bin/python ./configure && make -j$(($(nproc) + 1)))
|
||||
fi
|
||||
if [ "$OVN_SRCDIR" -a ! -d "$OVN_SRCDIR" ]; then
|
||||
echo "Building OVN in $OVN_SRCDIR"
|
||||
mkdir -p $OVN_SRCDIR
|
||||
git clone git://github.com/ovn-org/ovn.git $OVN_SRCDIR
|
||||
(cd $OVN_SRCDIR && ./boot.sh && PYTHON=/usr/bin/python ./configure --with-ovs-source=$OVS_SRCDIR && make -j$(($(nproc) + 1)))
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue