def execute(self, email, backend_id): from mist.io import methods user = user_from_email(email) locations = methods.list_locations(user, backend_id) return {'backend_id': backend_id, 'locations': locations}
def list_locations(request): """List locations from each backend.""" backend_id = request.matchdict['backend'] user = user_from_request(request) return methods.list_locations(user, backend_id)
def list_locations(request): """List locations from each cloud.""" cloud_id = request.matchdict['cloud'] user = user_from_request(request) return methods.list_locations(user, cloud_id)