def GET(self, scope, name):
"""
Return all rules of a given DID.
HTTP Success:
200 OK
HTTP Error:
401 Unauthorized
404 Not Found
:param scope: The scope name.
"""
header('Content-Type', 'application/x-json-stream')
try:
for rule in list_replication_rules({'scope': scope, 'name': name}):
yield dumps(rule, cls=APIEncoder) + '\n'
except RuleNotFound, error:
raise generate_http_error(404, 'RuleNotFound', error.args[0][0])
except RucioException, error:
raise generate_http_error(500, error.__class__.__name__, error.args[0])
except Exception, error:
raise InternalError(error)
评论列表
文章目录