From: gongysh Date: Mon, 19 Nov 2012 02:00:01 +0000 (+0800) Subject: Delete floating port and floatingip in the same transaction X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ce538eb8bcc732b19589739cf2d4cf7da2e277dc;p=openstack-build%2Fneutron-build.git Delete floating port and floatingip in the same transaction Bug #1080516 Change-Id: Icb5b71e29af582cb0e381e22909f46b325063d71 --- diff --git a/quantum/db/l3_db.py b/quantum/db/l3_db.py index 1886ead0b..035f10b6d 100644 --- a/quantum/db/l3_db.py +++ b/quantum/db/l3_db.py @@ -606,9 +606,9 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): floatingip = self._get_floatingip(context, id) with context.session.begin(subtransactions=True): context.session.delete(floatingip) - self.delete_port(context.elevated(), - floatingip['floating_port_id'], - l3_port_check=False) + self.delete_port(context.elevated(), + floatingip['floating_port_id'], + l3_port_check=False) def get_floatingip(self, context, id, fields=None): floatingip = self._get_floatingip(context, id)