From dc31fecdd978a8c56d33bc0f1672e680e273111d Mon Sep 17 00:00:00 2001 From: Gal Sagie Date: Thu, 9 Apr 2015 18:57:52 +0300 Subject: [PATCH] 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 --- neutron/agent/ovsdb/native/commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): -- 2.45.2