def get(self, rse): """ Get RSE limits. .. :quickref: Limits; Get RSE limits. :param rse: the RSE name. :resheader Content-Type: application/json :status 200: OK. :status 401: Invalid Auth Token. :status 404: RSE Not Found. :status 406: Not Acceptable. :status 500: Internal Error. :returns: List of dictionaries with RSE limits. """ try: limits = get_rse_limits(rse=rse, issuer=request.environ.get('issuer'), vo=request.environ.get('vo')) return Response(render_json(**limits), content_type="application/json") except RSENotFound as error: return generate_http_error_flask(404, 'RSENotFound', error.args[0]) except RucioException as error: return generate_http_error_flask(500, error.__class__.__name__, error.args[0]) except Exception as error: print(format_exc()) return error, 500
def GET(self, rse): """ Get RSE limits. :param rse: the RSE name. """ header('Content-Type', 'application/json') try: limits = get_rse_limits(rse=rse, issuer=ctx.env.get('issuer')) return render_json(**limits) except RSENotFound, e: raise generate_http_error(404, 'RSENotFound', e[0][0])
def GET(self, rse): """ Get RSE limits. :param rse: the RSE name. """ header('Content-Type', 'application/json') try: limits = get_rse_limits(rse=rse, issuer=ctx.env.get('issuer')) return render_json(**limits) except RSENotFound, error: raise generate_http_error(404, 'RSENotFound', error[0][0])
def GET(self, rse): """ Get RSE limits. :param rse: the RSE name. """ header('Content-Type', 'application/json') try: limits = get_rse_limits(rse=rse, issuer=ctx.env.get('issuer'), vo=ctx.env.get('vo')) return render_json(**limits) except RSENotFound as error: raise generate_http_error(404, 'RSENotFound', error.args[0]) except RucioException as error: raise generate_http_error(500, error.__class__.__name__, error.args[0]) except Exception as error: print(format_exc()) raise InternalError(error)
def get(self, rse): """ Get RSE limits. .. :quickref: Limits; Get RSE limits. :param rse: the RSE name. :resheader Content-Type: application/json :status 200: OK. :status 401: Invalid Auth Token. :status 404: RSE Not Found. :status 500: Internal Error. :returns: List of dictionaries with RSE limits. """ try: limits = get_rse_limits(rse=rse, issuer=request.environ.get('issuer')) return Response(render_json(**limits), content_type="application/json") except RSENotFound, error: return generate_http_error_flask(404, 'RSENotFound', error[0][0])