'Replace existing port or create it, and configure port interface.'

def replace_port(self, port_name, *interface_attr_tuples):

    self.ovsdb.del_port(port_name).execute()
    with self.ovsdb.transaction() as txn:
        txn.add(self.ovsdb.add_port(self.br_name, port_name, may_exist=False))
        if interface_attr_tuples:
            txn.add(self.ovsdb.db_set('Interface', port_name, *interface_attr_tuples))
