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
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)