'Return agent gw port if exist, or None otherwise.'

def _get_agent_gw_ports_exist_for_network(self, context, network_id, host, agent_id):

    if (not network_id):
        LOG.debug('Network    not    specified')
        return
    filters = {'network_id': [network_id], 'device_id': [agent_id], 'device_owner': [const.DEVICE_OWNER_AGENT_GW]}
    ports = self._core_plugin.get_ports(context, filters)
    if ports:
        return ports[0]
