v2.0a17
·
6 commits
to v2(pre-release)
since this release
This release introduces transient error retry with exponential backoff in the HTTP layer, refactors device attribute initialization, expands the known cluster URL registry, and updates getting-started documentation to clarify authentication prerequisites.
New Features
- Retry with Exponential Backoff
request_urlnow automatically retries on transient transport failures (DNS errors, connection failures, timeouts, proxy errors) with exponential backoff up to 3 attempts- Added
RETRY_MAX_RETRIES,RETRY_INITIAL_BACKOFF,RETRY_BACKOFF_MULTIPLIER, andTRANSIENT_TRANSPORT_ERRORSconstants tobase.py - All other exceptions are raised immediately as
ResponseErrorwithout retrying
- Unknown Base URL Warning
_resolve_base_urlnow validates the resolved URL against known cluster URLs- Issues a non-fatal
UserWarningif the URL is not a recognized Central cluster, expected for Central-On Prem & other non-production environments
Improvements
- Added explicit
self.materialized = Falseinitialization at the top ofDevice.__init__for clarity from_apibranch inDevice.__init__now raisesValueErrorifdevice_attributesisNone, preventing silent failures- Replaced manual key-rename loop and
setattrcalls inDevice.__init__with new_apply_api_attributes()helper method - Device inventory fetch in
Device.get()now usesfilter_str="serialNumber eq {serial}"instead of thesearch=parameter to match updated API behavior - Expanded
CLUSTER_BASE_URLSinconstants.pywith changes to API Gateway Base URLs - Removed unused
_return_client_credentialsmethod frombase.py - Updates to
Authentication&Quickstartguide