From 2fccc7ed2cec13cb87e987e0a57c3a17df89888b Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Fri, 26 Dec 2014 13:06:20 -0700 Subject: [PATCH] Set type=internal as part of port creation When creating an internal device with ovs-vsctl, the 'set' operation must occur as part of the transaction that creates the port, otherwise the device creation will fail and an ofport will not be assigned. Change-Id: I30ecb920ee1c64d25b5e7eed69e92bd71caac435 --- neutron/tests/functional/agent/linux/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neutron/tests/functional/agent/linux/base.py b/neutron/tests/functional/agent/linux/base.py index b900d56fd..cdf8a2eae 100644 --- a/neutron/tests/functional/agent/linux/base.py +++ b/neutron/tests/functional/agent/linux/base.py @@ -117,9 +117,8 @@ class BaseOVSLinuxTestCase(BaseLinuxTestCase): def create_ovs_port_in_ns(self, br, ns): def create_port(name): - br.add_port(name) + br.replace_port(name, ('type', 'internal')) self.addCleanup(br.delete_port, name) - br.set_db_attribute('Interface', name, 'type', 'internal') return name port_name = self.create_resource(PORT_PREFIX, create_port) port_dev = self.ip.device(port_name) -- 2.45.2