Ejemplo n.º 1
0
 def execute(self, email, backend_id):
     log.warn('Running list images for user %s backend %s' % (email, backend_id))
     from mist.io import methods
     user = user_from_email(email)
     images = methods.list_images(user, backend_id)
     log.warn('Returning list images for user %s backend %s' % (email, backend_id))
     return {'backend_id': backend_id, 'images': images}
Ejemplo n.º 2
0
 def execute(self, email, backend_id):
     log.warn('Running list images for user %s backend %s' % (email, backend_id))
     from mist.io import methods
     user = user_from_email(email)
     images = methods.list_images(user, backend_id)
     log.warn('Returning list images for user %s backend %s' % (email, backend_id))
     return {'backend_id': backend_id, 'images': images}
Ejemplo n.º 3
0
    def execute(self, email, backend_id):
        log.warn("Running list images for user %s backend %s" % (email, backend_id))
        from mist.io import methods

        user = user_from_email(email)
        images = methods.list_images(user, backend_id)
        log.warn("Returning list images for user %s backend %s" % (email, backend_id))
        return {"backend_id": backend_id, "images": images}
Ejemplo n.º 4
0
def list_images(request):
    """List images from each backend.
    Furthermore if a search_term is provided, we loop through each
    backend and search for that term in the ids and the names of
    the community images"""

    backend_id = request.matchdict['backend']
    try:
        term = request.json_body.get('search_term', '').lower()
    except:
        term = None
    user = user_from_request(request)
    return methods.list_images(user, backend_id, term)
Ejemplo n.º 5
0
def list_images(request):
    """List images from each backend.
    Furthermore if a search_term is provided, we loop through each
    backend and search for that term in the ids and the names of
    the community images"""

    backend_id = request.matchdict['backend']
    try:
        term = request.json_body.get('search_term', '').lower()
    except:
        term = None
    user = user_from_request(request)
    return methods.list_images(user, backend_id, term)
Ejemplo n.º 6
0
 def execute(self, email, backend_id):
     from mist.io import methods
     user = user_from_email(email)
     images = methods.list_images(user, backend_id)
     return {'backend_id': backend_id, 'images': images}
Ejemplo n.º 7
0
 def execute(self, email, backend_id):
     from mist.io import methods
     user = user_from_email(email)
     images = methods.list_images(user, backend_id)
     return {'backend_id': backend_id, 'images': images}