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}
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}
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)
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}