saltext.noderings.utils.client¶
A small JSON client for the NodeRings public API.
It is shared by the execution module, the state module and the Salt Cloud driver. It retries rate-limited and transient failures, never retries orders blindly, and keeps secrets out of error messages. It uses only the standard library.
- exception saltext.noderings.utils.client.NodeRingsError(status, code=0, message='', details=None, method='', path='')[source]¶
An error returned by the NodeRings API.
- exception saltext.noderings.utils.client.TimeoutError_[source]¶
A wait ran out of time (named to avoid shadowing the builtin).
- saltext.noderings.utils.client.is_busy(err)[source]¶
The API refuses changes while a VM operation is running.
- saltext.noderings.utils.client.is_ambiguous(err)[source]¶
True when a request may or may not have been applied (lost response).
- saltext.noderings.utils.client.snake(value)[source]¶
Convert API camelCase keys to snake_case, recursively.
- class saltext.noderings.utils.client.NodeRingsClient(token, api_url='https://api.noderings.com', organization_id=None, timeout=60, retries=5, user_agent=None, opener=None, sleep=<built-in function sleep>)[source]¶
JSON client for the NodeRings public API.