def DELETE(self, account, rse_expression): """ Delete an account limit. HTTP Success: 200 OK HTTP Error: 401 Unauthorized 404 Not Found 500 Internal Error :param X-Rucio-Auth-Account: Account identifier. :param X-Rucio-Auth-Token: As an 32 character hex string. :param account: Account name. :param rse_expression: RSE expression. """ try: delete_global_account_limit(account=account, rse_expression=rse_expression, issuer=ctx.env.get('issuer'), vo=ctx.env.get('vo')) except AccessDenied as exception: raise generate_http_error(401, 'AccessDenied', exception.args[0]) except AccountNotFound as exception: raise generate_http_error(404, 'AccountNotFound', exception.args[0]) except RSENotFound as exception: raise generate_http_error(404, 'RSENotFound', exception.args[0]) except Exception as exception: print(format_exc()) raise InternalError(exception) raise OK()
def delete(self, account, rse_expression): """ Delete an account limit. .. :quickref: GlobalAccountLimit; Delete global account limits. :param account: Account name. :param rse_expression: RSE name. :status 200: Successfully deleted. :status 401: Invalid auth token. :status 404: RSE not found. :status 404: Account not found """ try: delete_global_account_limit(account=account, rse_expression=rse_expression, issuer=request.environ.get('issuer'), vo=request.environ.get('vo')) except AccessDenied as error: return generate_http_error_flask(401, 'AccessDenied', error.args[0]) except AccountNotFound as error: return generate_http_error_flask(404, 'AccountNotFound', error.args[0]) except RSENotFound as error: return generate_http_error_flask(404, 'RSENotFound', error.args[0]) except Exception as error: print(format_exc()) return str(error), 500 return '', 200
def delete(self, account, rse_expression): """ --- summary: Delete a global account limit tags: - Account Limit parameters: - name: account in: path description: The account for the accountlimit. schema: type: string style: simple - name: rse_expression in: path description: The rse expression for the accountlimit. schema: type: string style: simple responses: 200: description: OK 401: description: Invalid Auth Token 404: description: No RSE or account found for the given id. """ try: delete_global_account_limit(account=account, rse_expression=rse_expression, issuer=request.environ.get('issuer'), vo=request.environ.get('vo')) except AccessDenied as error: return generate_http_error_flask(401, error) except (AccountNotFound, RSENotFound) as error: return generate_http_error_flask(404, error) return '', 200