From: Terry Wilson Date: Fri, 26 Dec 2014 20:06:20 +0000 (-0700) Subject: Set type=internal as part of port creation X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2fccc7ed2cec13cb87e987e0a57c3a17df89888b;p=openstack-build%2Fneutron-build.git 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 --- 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)