def GET(self, rule_id):
""" get locks for a given rule_id.
HTTP Success:
200 OK
HTTP Error:
404 Not Found
500 InternalError
:returns: JSON dict containing informations about the requested user.
"""
header('Content-Type', 'application/x-json-stream')
try:
locks = get_replica_locks_for_rule_id(rule_id)
except RucioException as error:
raise generate_http_error(500, error.__class__.__name__, error.args[0])
except Exception as error:
raise InternalError(error)
for lock in locks:
yield dumps(lock, cls=APIEncoder) + '\n'
评论列表
文章目录