def get_objects_list_or_404(self, obj, ids):

        node_query = obj.filter_by_id_list(None, ids)
        objects_count = obj.count(node_query)
        if len(set(ids)) != objects_count:
            raise self.http(404, '{0} not found'.format(obj.__name__))

        return list(node_query)
Get list of objects
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/api/v1/handlers/base.py/BaseHandler.get_objects_list_or_404