def GET(self, rse): """ list all RSE attributes for a RSE. HTTP Success: 200 OK HTTP Error: 401 Unauthorized 404 Not Found 406 Not Acceptable 500 InternalError :param rse: RSE name. :returns: A list containing all RSE attributes. """ header('Content-Type', 'application/json') try: rse_attr = list_rse_attributes(rse, vo=ctx.env.get('vo')) except AccessDenied as error: raise generate_http_error(401, 'AccessDenied', error.args[0]) except RSENotFound as error: raise generate_http_error(404, 'RSENotFound', error.args[0]) except Exception as error: print(format_exc()) raise InternalError(error) return dumps(rse_attr)
def get(self, rse): """ list all RSE attributes for a RSE. .. :quickref: Attributes; List all RSE attributes. :param rse: RSE name. :resheader Content-Type: application/json :status 200: OK. :status 401: Invalid Auth Token. :status 406: Not Acceptable. :status 500: Internal Error. :returns: A list containing all RSE attributes. """ try: rse_attr = list_rse_attributes(rse, vo=request.environ.get('vo')) except AccessDenied as error: return generate_http_error_flask(401, 'AccessDenied', error.args[0]) except RSENotFound as error: return generate_http_error_flask(404, 'RSENotFound', error.args[0]) except Exception as error: return error, 500 return Response(dumps(rse_attr), content_type="application/json")
def GET(self, rse): """ list all RSE attributes for a RSE. HTTP Success: 200 OK HTTP Error: 401 Unauthorized 500 InternalError :param rse: RSE name. :returns: A list containing all RSE attributes. """ header('Content-Type', 'application/json') return dumps(list_rse_attributes(rse))
def GET(self, rse): """ list all RSE attributes for a RSE. HTTP Success: 200 OK HTTP Error: 401 Unauthorized 404 Not Found 500 InternalError :param rse: RSE name. :returns: A list containing all RSE attributes. """ header('Content-Type', 'application/json') return dumps(list_rse_attributes(rse))
def get(self, rse): """ list all RSE attributes for a RSE. .. :quickref: Attributes; List all RSE attributes. :param rse: RSE name. :resheader Content-Type: application/json :status 200: OK. :status 401: Invalid Auth Token. :status 500: Internal Error. :returns: A list containing all RSE attributes. """ return Response(dumps(list_rse_attributes(rse)), content_type="application/json")
def get(self, rse): """ list all RSE attributes for a RSE. .. :quickref: Attributes; List all RSE attributes. :param rse: RSE name. :resheader Content-Type: application/json :status 200: OK. :status 401: Invalid Auth Token. :status 406: Not Acceptable. :returns: A list containing all RSE attributes. """ try: rse_attr = list_rse_attributes(rse, vo=request.environ.get('vo')) except AccessDenied as error: return generate_http_error_flask(401, error) except RSENotFound as error: return generate_http_error_flask(404, error) return jsonify(rse_attr)