Fix _create_dvr_floating_gw_port missing payload field

Change Ia462ca4b340cd3d9a27341632b24926c3290a4b2 modified some
notification payload field names.
Because of that _create_dvr_floating_gw_port fails with missing
'fixed_port_id' field since it's now 'port_id'.

Closes-Bug: #1943846
Change-Id: I37d8722c74dfc122030175f54404703780c4d8b2
This commit is contained in:
Szymon Wroblewski 2021-09-16 18:37:34 +02:00
parent a76e1d642c
commit 0234aa6157
2 changed files with 3 additions and 3 deletions

View File

@ -464,7 +464,7 @@ class DVRResourceOperationHandler(object):
# FloatingIP agent gateway port
if router_dict.get('distributed'):
hostid = self._get_dvr_service_port_hostid(
context, fip['fixed_port_id'])
context, fip['port_id'])
if hostid:
# FIXME (Swami): This FIP Agent Gateway port should be
# created only once and there should not be a duplicate
@ -481,7 +481,7 @@ class DVRResourceOperationHandler(object):
# port. Get the port_dict, inherit the service port host
# and device owner(if it does not exist).
port = self._core_plugin.get_port(
admin_ctx, fip['fixed_port_id'])
admin_ctx, fip['port_id'])
allowed_device_owners = (
n_utils.get_dvr_allowed_address_pair_device_owners())
# NOTE: We just need to deal with ports that do not

View File

@ -633,7 +633,7 @@ class L3DvrTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
resources.FLOATING_IP, events.AFTER_CREATE, self,
payload=events.DBEventPayload(
context=mock.Mock(), states=(dict(
router_id=router_db['id'], fixed_port_id=port['id'],
router_id=router_db['id'], port_id=port['id'],
fixed_ip_address='1.2.3.4', id=fip['id'],
floating_network_id=fip['floating_network_id']),),
resource_id=fip['id'],