From: Gal Sagie Date: Thu, 9 Apr 2015 15:57:52 +0000 (+0300) Subject: OVSDB python binding should use row.delete() to remove rows X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=dc31fecdd978a8c56d33bc0f1672e680e273111d;p=openstack-build%2Fneutron-build.git OVSDB python binding should use row.delete() to remove rows The OVS python IDL recognize a delete event when delete() is called on the row, this should be used to remove rows from the db Change-Id: I50c94a4f089659d78f8881653cd55d4ef069cdc1 Closes-Bug: #1442217 --- diff --git a/neutron/agent/ovsdb/native/commands.py b/neutron/agent/ovsdb/native/commands.py index 5928e123c..06a0d8605 100644 --- a/neutron/agent/ovsdb/native/commands.py +++ b/neutron/agent/ovsdb/native/commands.py @@ -119,7 +119,7 @@ class DelBridgeCommand(BaseCommand): bridges = self.api._ovs.bridges bridges.remove(br) self.api._ovs.bridges = bridges - del self.api._tables['Bridge'].rows[br.uuid] + self.api._tables['Bridge'].rows[br.uuid].delete() class BridgeExistsCommand(BaseCommand): @@ -334,8 +334,8 @@ class DelPortCommand(BaseCommand): # Also remove port/interface directly for indexing? port.verify('interfaces') for iface in port.interfaces: - del self.api._tables['Interface'].rows[iface.uuid] - del self.api._tables['Port'].rows[port.uuid] + self.api._tables['Interface'].rows[iface.uuid].delete() + self.api._tables['Port'].rows[port.uuid].delete() class ListPortsCommand(BaseCommand):