_resilience
Shared transport policy, using pyresilience for sync and async retries.
RETRYABLE_HTTP_STATUSES
module-attribute
#
_TransientHTTPError #
Bases: FMGHTTPException
An HTTP response eligible for retry when the JSON-RPC operation is a read.
_check_status #
_retry_config #
_retry_config(
settings: FMGSettings,
request: dict[str, Any],
retry_on: tuple[type[Exception], ...],
ignore_on: tuple[type[Exception], ...],
) -> RetryConfig
Apply the same retry eligibility, attempt count, and backoff in both clients.
Source code in pyfortinet/fmg_api/_resilience.py
async_request_json
async
#
async_request_json(
session: ClientSession, settings: FMGSettings, request: dict[str, Any], *, timeout: Optional[float] = None
) -> Any
Send and decode an async request with the same native I/O timeout policy.
Source code in pyfortinet/fmg_api/_resilience.py
request_json #
Send and decode a sync request, releasing each response before any retry.
Source code in pyfortinet/fmg_api/_resilience.py
timeout_seconds #
Validate temporary timeout overrides as well as configured values.