keystoneauth1.exceptions.http 模块¶
keystoneauth1 使用的 HTTP 异常。
- exception keystoneauth1.exceptions.http.BadGateway(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HttpServerErrorHTTP 502 - Bad Gateway。
服务器充当网关或代理,从上游服务器收到无效响应。
- __annotations__ = {}
- __doc__ = 'HTTP 502 - Bad Gateway。\n\n 服务器充当网关或代理时,从上游服务器收到无效的\n 响应。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 502
- message = 'Bad Gateway'
- exception keystoneauth1.exceptions.http.BadRequest(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 400 - Bad Request。
请求由于语法错误而无法得到满足。
- __annotations__ = {}
- __doc__ = 'HTTP 400 - Bad Request。\n\n 请求由于语法错误而无法被满足。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 400
- message = 'Bad Request'
- exception keystoneauth1.exceptions.http.Conflict(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 409 - Conflict。
指示由于请求中的冲突而无法处理请求,例如编辑冲突。
- __annotations__ = {}
- __doc__ = 'HTTP 409 - Conflict。\n\n 表示由于请求中的冲突而无法处理请求,例如编辑冲突。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 409
- message = '冲突'
- exception keystoneauth1.exceptions.http.ExpectationFailed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 417 - Expectation Failed。
服务器无法满足 Expect 请求标头字段的要求。
- __annotations__ = {}
- __doc__ = 'HTTP 417 - 期望失败。\n\n 服务器无法满足 Expect 请求头字段的要求。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 417
- message = '期望失败'
- exception keystoneauth1.exceptions.http.Forbidden(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 403 - 禁止访问。
服务器拒绝响应该请求,即使请求是有效的。
- __annotations__ = {}
- __doc__ = 'HTTP 403 - 禁止访问。\n\n 请求有效,但服务器拒绝响应。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 403
- message = '禁止访问'
- exception keystoneauth1.exceptions.http.GatewayTimeout(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HttpServerErrorHTTP 504 - 网关超时。
服务器作为网关或代理,未从上游服务器收到及时响应。
- __annotations__ = {}
- __doc__ = 'HTTP 504 - 网关超时。\n\n 服务器充当网关或代理,未及时从上游服务器收到响应。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 504
- message = '网关 超时'
- exception keystoneauth1.exceptions.http.Gone(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 410 - 已消失。
表示请求的资源不再可用,并且将来也不会再可用。
- __annotations__ = {}
- __doc__ = 'HTTP 410 - 已消失。\n\n 表示请求的资源不再可用,并且将来也不会再可用。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 410
- message = '已消失'
- exception keystoneauth1.exceptions.http.HTTPClientError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
Bases:
HttpError客户端 HTTP 错误。
客户端似乎出错时使用的异常。
- __annotations__ = {}
- __doc__ = '客户端 HTTP 错误。\n\n 客户端出错时引发的异常。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- message = 'HTTP 客户端 错误'
- exception keystoneauth1.exceptions.http.HttpError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
ClientException所有 HTTP 异常的基类。
- __annotations__ = {}
- __doc__ = '所有 HTTP 异常的基类。'
- __init__(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 0
- message = 'HTTP 错误'
- exception keystoneauth1.exceptions.http.HttpNotImplemented(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HttpServerErrorHTTP 501 - 未实现。
服务器无法识别请求方法,或者缺乏满足请求的能力。
- __annotations__ = {}
- __doc__ = 'HTTP 501 - 未实现。\n\n 服务器要么不识别请求方法,要么缺乏\n 满足请求的能力。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 501
- message = '未实现'
- exception keystoneauth1.exceptions.http.HttpServerError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
Bases:
HttpError服务器端 HTTP 错误。
服务器意识到自己出错或无法执行请求时使用的异常。
- __annotations__ = {}
- __doc__ = '服务器端 HTTP 错误。\n\n 用于服务器意识到出现错误或无法\n 执行请求的情况的异常。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- message = 'HTTP 服务器错误'
- 异常 keystoneauth1.exceptions.http.HttpVersionNotSupported(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HttpServerErrorHTTP 505 - HTTP 版本不受支持。
服务器不支持请求中使用的 HTTP 协议版本。
- __annotations__ = {}
- __doc__ = 'HTTP 505 - HttpVersion 不支持。\n\n 服务器不支持请求中使用的HTTP协议版本。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 505
- message = 'HTTP 版本不支持'
- 异常 keystoneauth1.exceptions.http.InternalServerError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HttpServerErrorHTTP 500 - 内部服务器错误。
当没有更具体的错误消息时,给出的通用错误消息。
- __annotations__ = {}
- __doc__ = 'HTTP 500 - 内部服务器错误。\n\n 当没有更合适的错误信息时,给出的通用错误信息。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 500
- message = '内部服务器错误'
- 异常 keystoneauth1.exceptions.http.LengthRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 411 - 需要长度。
请求未指定其内容的长度,这是请求的资源所必需的。
- __annotations__ = {}
- __doc__ = 'HTTP 411 - 长度要求。\n\n 请求未指定其内容的长度,这是请求的资源所要求的。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 411
- message = '长度要求'
- 异常 keystoneauth1.exceptions.http.MethodNotAllowed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 405 - 方法不允许。
对资源使用资源不支持的请求方法发出的请求。
- __annotations__ = {}
- __doc__ = 'HTTP 405 - 方法 不允许。\n\n 使用 不支持 该 资源 的 请求 方法 对 资源 发出的请求。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 405
- message = '方法不允许'
- 异常 keystoneauth1.exceptions.http.NotAcceptable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 406 - 不可接受。
请求的资源只能生成不符合请求中发送的 Accept 标头的内容。
- __annotations__ = {}
- __doc__ = 'HTTP 406 - 不可接受。\n\n 请求的资源只能生成不符合请求中发送的 Accept 标头的内容。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 406
- message = '不可接受'
- 异常 keystoneauth1.exceptions.http.NotFound(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 404 - 未找到。
请求的资源找不到,但将来可能会再次可用。
- __annotations__ = {}
- __doc__ = 'HTTP 404 - 未找到。\n\n 请求的资源未找到,但未来可能可用。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 404
- message = '未找到'
- exception keystoneauth1.exceptions.http.PaymentRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 402 - 需要付款。
保留供将来使用。
- __annotations__ = {}
- __doc__ = 'HTTP 402 - 需要付款。\n\n 保留供将来使用。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 402
- message = '需要付款'
- exception keystoneauth1.exceptions.http.PreconditionFailed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 412 - 前置条件失败。
服务器未满足请求者对请求施加的前置条件之一。
- __annotations__ = {}
- __doc__ = 'HTTP 412 - 先决条件失败。\n\n 服务器不满足请求者施加的先决条件之一。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 412
- message = '先决条件失败'
- exception keystoneauth1.exceptions.http.ProxyAuthenticationRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 407 - 需要代理身份验证。
客户端必须首先使用代理进行身份验证。
- __annotations__ = {}
- __doc__ = 'HTTP 407 - 需要代理身份验证。\n\n 客户端必须首先使用代理对其自身进行身份验证。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 407
- message = '需要代理身份验证'
- 异常 keystoneauth1.exceptions.http.RequestEntityTooLarge(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 413 - 请求实体过大。
请求大小超过服务器愿意或能够处理的限制。
- __annotations__ = {}
- __doc__ = 'HTTP 413 - 请求实体过大。\n\n 请求比服务器愿意或能够处理的更大。\n '
- __init__(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 413
- message = '请求实体过大'
- 异常 keystoneauth1.exceptions.http.RequestTimeout(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 408 - 请求超时。
服务器在等待请求时超时。
- __annotations__ = {}
- __doc__ = 'HTTP 408 - 请求超时。\n\n 服务器在等待请求时超时。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 408
- message = '请求超时'
- 异常 keystoneauth1.exceptions.http.RequestUriTooLong(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 414 - 请求 URI 过长。
提供的 URI 对于服务器来说太长,无法处理。
- __annotations__ = {}
- __doc__ = 'HTTP 414 - 请求 URI 过长。\n\n 提供的 URI 过长,服务器无法处理。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 414
- message = '请求 URI 过长'
- 异常 keystoneauth1.exceptions.http.RequestedRangeNotSatisfiable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 416 - 请求范围不可满足。
客户端请求了文件的部分内容,但服务器无法提供该部分内容。
- __annotations__ = {}
- __doc__ = 'HTTP 416 - 请求范围不可满足。\n\n 客户端请求了文件的某一部分,但服务器无法\n 提供该部分。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 416
- message = '请求范围不可满足'
- 异常 keystoneauth1.exceptions.http.ServiceUnavailable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HttpServerErrorHTTP 503 - 服务不可用。
服务器当前不可用。
- __annotations__ = {}
- __doc__ = 'HTTP 503 - 服务不可用。\n\n 服务器当前不可用。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 503
- message = '服务不可用'
- 异常 keystoneauth1.exceptions.http.Unauthorized(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 401 - 未授权。
类似于 403 Forbidden,但专门用于需要身份验证但身份验证失败或尚未提供的情况。
- __annotations__ = {}
- __doc__ = 'HTTP 401 - 未授权。\n\n 类似于 403 禁止, 但 专门用于 需要 身份验证\n 但 身份验证 失败 或 尚未 提供时使用。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 401
- message = '未授权'
- exception keystoneauth1.exceptions.http.UnprocessableEntity(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 422 - 无法处理的实体。
请求格式正确,但由于语义错误而无法执行。
- __annotations__ = {}
- __doc__ = 'HTTP 422 - 无法处理的实体。\n\n 请求 格式正确 但 由于语义\n 错误而无法处理。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 422
- message = '无法处理的实体'
- exception keystoneauth1.exceptions.http.UnsupportedMediaType(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
基类:
HTTPClientErrorHTTP 415 - 不支持的媒体类型。
请求实体具有服务器或资源不支持的媒体类型。
- __annotations__ = {}
- __doc__ = 'HTTP 415 - 不支持的媒体类型。\n\n 请求实体 具有 服务器 或 资源 不支持的媒体类型。\n '
- __module__ = 'keystoneauth1.exceptions.http'
- http_status = 415
- message = '不支持的媒体类型'