]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
OVSDB python binding should use row.delete() to remove rows
authorGal Sagie <gal.sagie@huawei.com>
Thu, 9 Apr 2015 15:57:52 +0000 (18:57 +0300)
committerGal Sagie <gal.sagie@huawei.com>
Thu, 9 Apr 2015 16:00:49 +0000 (19:00 +0300)
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

index 5928e123c79814403820a3373685393b58fee336..06a0d8605036fe35c24480fbf229d82603d8fa61 100644 (file)
@@ -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):