'Get a list of agents'

@rest_utils.ajax()
def get(self, request):

    if (api.base.is_service_enabled(request, 'network') and api.neutron.is_extension_supported(request, 'agent')):
        result = api.neutron.agent_list(request, **request.GET.dict())
        return {'items': [n.to_dict() for n in result]}
    else:
        raise rest_utils.AjaxError(501, '')
