'Function to delete FIP gateway port with given ext_net_id.'

def delete_floatingip_agent_gateway_port(self, context, host_id, ext_net_id):

    device_filter = {'device_owner': [const.DEVICE_OWNER_AGENT_GW], 'network_id': [ext_net_id]}
    ports = self._core_plugin.get_ports(context, filters=device_filter)
    for p in ports:
        if ((not host_id) or (p[portbindings.HOST_ID] == host_id)):
            self._core_plugin.ipam.delete_port(context, p['id'])
            if host_id:
                return
