def DELETE(self, account, key): """ disable account with given account name. HTTP Success: 200 OK HTTP Error: 401 Unauthorized 404 Not Found 500 InternalError :param Rucio-Account: Account identifier. :param Rucio-Auth-Token: as an 32 character hex string. """ try: del_account_attribute(account=account, key=key, issuer=ctx.env.get('issuer'), vo=ctx.env.get('vo')) except AccessDenied as error: raise generate_http_error(401, 'AccessDenied', error.args[0]) except AccountNotFound as error: raise generate_http_error(404, 'AccountNotFound', error.args[0]) except Exception as error: raise InternalError(error) raise OK()
def delete(self, account, key): """ Remove attribute from account. .. :quickref: Attributes; Delete account attribute :param account: Account identifier. :param key: The attribute key. :status 200: Successfully deleted. :status 401: Invalid auth token. :status 404: Account not found. :status 500: Database Exception. """ try: del_account_attribute(account=account, key=key, issuer=request.environ.get('issuer')) 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 Exception as error: return error, 500 return "OK", 200
def DELETE(self, account, key): """ disable account with given account name. HTTP Success: 200 OK HTTP Error: 401 Unauthorized 404 Not Found 500 InternalError :param Rucio-Account: Account identifier. :param Rucio-Auth-Token: as an 32 character hex string. """ try: del_account_attribute(account=account, key=key, issuer=ctx.env.get('issuer')) except AccessDenied, e: raise generate_http_error(401, 'AccessDenied', e.args[0][0])
def delete(self, account, key): """ --- summary: Delete attribute description: Delete an attribute of an account. tags: - Account parameters: - name: account in: path description: The account identifier. schema: type: string style: simple - name: key in: path description: The key of the account attribute to remove. schema: type: string style: simple responses: 200: description: OK 401: description: Invalid Auth Token 404: description: No account found for the given id. """ try: del_account_attribute(account=account, key=key, issuer=request.environ.get('issuer'), vo=request.environ.get('vo')) except AccessDenied as error: return generate_http_error_flask(401, error) except AccountNotFound as error: return generate_http_error_flask(404, error) return '', 200