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
This commit is contained in:
Manjeet Singh Bhatia 2018-10-02 00:54:11 +00:00 committed by Slawek Kaplonski
parent f0ba3f99c8
commit 82d7c2beed
1 changed files with 4 additions and 4 deletions

View File

@ -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()