syneto_api 0.2.45__tar.gz → 0.2.46__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {syneto_api-0.2.45 → syneto_api-0.2.46}/PKG-INFO +1 -1
- {syneto_api-0.2.45 → syneto_api-0.2.46}/pyproject.toml +1 -1
- {syneto_api-0.2.45 → syneto_api-0.2.46}/setup.py +1 -1
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/api_client.py +7 -3
- {syneto_api-0.2.45 → syneto_api-0.2.46}/README.md +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/__init__.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/auth_api.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/central_api.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/jobs_api.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/keyring.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/protection_api.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/settings.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/storage_api.py +0 -0
- {syneto_api-0.2.45 → syneto_api-0.2.46}/src/syneto_api/virt_api.py +0 -0
|
@@ -21,7 +21,7 @@ install_requires = \
|
|
|
21
21
|
|
|
22
22
|
setup_kwargs = {
|
|
23
23
|
'name': 'syneto-api',
|
|
24
|
-
'version': '0.2.
|
|
24
|
+
'version': '0.2.46',
|
|
25
25
|
'description': 'Syneto Client API library',
|
|
26
26
|
'long_description': '# Syneto API\n\nSyneto Client API library: authentication, storage, virtualization and protection\n\n# Installation\n\n```\n$ pip install syneto-api\n```\n\n# Basic Usage\n\n```\nfrom syneto_api import Authentication, Virtualization, Storage, Protection\n\nauth_api = Authentication(url_base="https://syneto-instance-ip-address/api/auth", insecure_ssl=True)\nresponse = auth_api.login(username="admin", password="admin")\njwt = response[\'jwt\']\n\nvirt_api = Virtualization(url_base="https://syneto-instance-ip-address/api/virtualization", insecure_ssl=True)\nvirt_api.set_auth_jwt(jwt)\nprint(virt_api.get_vms())\n\nstorage_api = Storage(url_base="https://syneto-instance-ip-address/api/storage", insecure_ssl=True)\nstorage_api.set_auth_jwt(jwt)\nprint(storage_api.get_pools())\n```\n\n# Environment Variables\n\nFor conveninence, the base urls for the api endpoints are also accepted as environment variables, please see below.\n\n```\nAUTH_SERVICE=https://syneto-instance-ip-address/api/auth\nVIRTUALIZATION_SERVICE=https://syneto-instance-ip-address/api/virtualization\nSTORAGE_SERVICE=https://syneto-instance-ip-address/api/storage\nPROTECTION_SERVICE=https://syneto-instance-ip-address/api/protection\n```\n\nIf you are using self-signed SSL certificates, set the following env. so that the http request library does not perform ssl verification. \n\n```\nALLOW_INSECURE_SSL=True\n```\n',
|
|
27
27
|
'author': 'Your Name',
|
|
@@ -7,7 +7,7 @@ import logging
|
|
|
7
7
|
import traceback
|
|
8
8
|
import urllib.parse
|
|
9
9
|
import concurrent.futures as futures
|
|
10
|
-
from tenacity import Retrying, AsyncRetrying, RetryError, stop_after_delay
|
|
10
|
+
from tenacity import Retrying, AsyncRetrying, RetryError, stop_after_delay, retry_if_not_exception_type
|
|
11
11
|
|
|
12
12
|
from .settings import get_env_flag
|
|
13
13
|
from .keyring import KeyRing
|
|
@@ -104,7 +104,9 @@ class APIClientBase:
|
|
|
104
104
|
):
|
|
105
105
|
try:
|
|
106
106
|
logger.debug(f"Calling {method} {url} with aiohttp lib")
|
|
107
|
-
async for attempt in AsyncRetrying(
|
|
107
|
+
async for attempt in AsyncRetrying(
|
|
108
|
+
stop=stop_after_delay(self.timeout), retry=retry_if_not_exception_type(APIException), reraise=True
|
|
109
|
+
):
|
|
108
110
|
with attempt:
|
|
109
111
|
return await asyncio.wait_for(
|
|
110
112
|
self._unsafe_async_request(
|
|
@@ -194,7 +196,9 @@ class APIClientBase:
|
|
|
194
196
|
):
|
|
195
197
|
try:
|
|
196
198
|
logger.debug(f"Calling {method} {url} with requests lib")
|
|
197
|
-
for attempt in Retrying(
|
|
199
|
+
for attempt in Retrying(
|
|
200
|
+
stop=stop_after_delay(self.timeout), retry=retry_if_not_exception_type(APIException), reraise=True
|
|
201
|
+
):
|
|
198
202
|
with attempt:
|
|
199
203
|
return self._unsafe_sync_request(
|
|
200
204
|
method, url, body, success_codes, error_subject, on_response_callback
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|