From 82d7c2beed3eacbd6f697acac10e72e5398c954b Mon Sep 17 00:00:00 2001 From: Manjeet Singh Bhatia Date: Tue, 2 Oct 2018 00:54:11 +0000 Subject: [PATCH] Make binding statement singular. The method _create_ha_port_binding returns only single binding but add_ha_port using it use plural bindings while safe_execution of create_ha_port_binding. I noticed this while converting l3ha_model to ovo in [1], which required access to db_obj of bindings. [1]. https://review.openstack.org/#/c/602497 Change-Id: Ifabed41c59b2a946e968fdb0748c17e654bd4fcc --- neutron/db/l3_hamode_db.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neutron/db/l3_hamode_db.py b/neutron/db/l3_hamode_db.py index 4ef1daa79d3..6de9be19934 100644 --- a/neutron/db/l3_hamode_db.py +++ b/neutron/db/l3_hamode_db.py @@ -295,10 +295,10 @@ class L3_HA_NAT_db_mixin(l3_dvr_db.L3_NAT_with_dvr_db_mixin, router_id) deletion = functools.partial(self._core_plugin.delete_port, context, l3_port_check=False) - port, bindings = db_utils.safe_creation(context, creation, - deletion, content, - transaction=False) - return bindings + port, binding = db_utils.safe_creation(context, creation, + deletion, content, + transaction=False) + return binding def _delete_ha_interfaces(self, context, router_id): admin_ctx = context.elevated()