def GET(self, rule_id):
""" get rule information for given rule id.
HTTP Success:
200 OK
HTTP Error:
401 Unauthorized
404 Not Found
500 InternalError
:returns: JSON dict containing informations about the requested user.
"""
header('Content-Type', 'application/json')
try:
rule = get_replication_rule(rule_id)
except RuleNotFound as error:
raise generate_http_error(404, 'RuleNotFound', error.args[0][0])
except RucioException as error:
raise generate_http_error(500, error.__class__.__name__, error.args[0])
except Exception as error:
raise InternalError(error)
return render_json(**rule)
评论列表
文章目录