sumo-wrapper-python 1.0.19__py3-none-any.whl → 1.0.21__py3-none-any.whl
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.
Potentially problematic release.
This version of sumo-wrapper-python might be problematic. Click here for more details.
- sumo/wrapper/_auth_provider.py +6 -0
- sumo/wrapper/_version.py +2 -2
- sumo/wrapper/sumo_client.py +10 -7
- {sumo_wrapper_python-1.0.19.dist-info → sumo_wrapper_python-1.0.21.dist-info}/METADATA +1 -1
- {sumo_wrapper_python-1.0.19.dist-info → sumo_wrapper_python-1.0.21.dist-info}/RECORD +9 -9
- {sumo_wrapper_python-1.0.19.dist-info → sumo_wrapper_python-1.0.21.dist-info}/LICENSE +0 -0
- {sumo_wrapper_python-1.0.19.dist-info → sumo_wrapper_python-1.0.21.dist-info}/WHEEL +0 -0
- {sumo_wrapper_python-1.0.19.dist-info → sumo_wrapper_python-1.0.21.dist-info}/entry_points.txt +0 -0
- {sumo_wrapper_python-1.0.19.dist-info → sumo_wrapper_python-1.0.21.dist-info}/top_level.txt +0 -0
sumo/wrapper/_auth_provider.py
CHANGED
|
@@ -92,6 +92,11 @@ class AuthProvider:
|
|
|
92
92
|
f.write(token)
|
|
93
93
|
protect_token_cache(self._resource_id, ".sharedkey", case_uuid)
|
|
94
94
|
|
|
95
|
+
def has_case_token(self, case_uuid):
|
|
96
|
+
return os.path.exists(
|
|
97
|
+
get_token_path(self._resource_id, ".sharedkey", case_uuid)
|
|
98
|
+
)
|
|
99
|
+
|
|
95
100
|
pass
|
|
96
101
|
|
|
97
102
|
|
|
@@ -384,6 +389,7 @@ class AuthProviderSumoToken(AuthProvider):
|
|
|
384
389
|
before_sleep=_log_retry_info,
|
|
385
390
|
)
|
|
386
391
|
def __init__(self, resource_id, case_uuid=None):
|
|
392
|
+
super().__init__(resource_id)
|
|
387
393
|
protect_token_cache(resource_id, ".sharedkey", case_uuid)
|
|
388
394
|
token_path = get_token_path(resource_id, ".sharedkey", case_uuid)
|
|
389
395
|
with open(token_path, "r") as f:
|
sumo/wrapper/_version.py
CHANGED
sumo/wrapper/sumo_client.py
CHANGED
|
@@ -424,13 +424,16 @@ class SumoClient:
|
|
|
424
424
|
def client_for_case(self, case_uuid):
|
|
425
425
|
"""Instantiate and return new SumoClient for accessing the
|
|
426
426
|
case identified by *case_uuid*."""
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
427
|
+
if self.auth.has_case_token(case_uuid):
|
|
428
|
+
return SumoClient(
|
|
429
|
+
env=self.env,
|
|
430
|
+
verbosity=self._verbosity,
|
|
431
|
+
retry_strategy=self._retry_strategy,
|
|
432
|
+
timeout=self._timeout,
|
|
433
|
+
case_uuid=case_uuid,
|
|
434
|
+
)
|
|
435
|
+
else:
|
|
436
|
+
return self
|
|
434
437
|
|
|
435
438
|
@raise_for_status_async
|
|
436
439
|
async def get_async(self, path: str, params: dict = None):
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
sumo/__init__.py,sha256=ftS-xRPSH-vU7fIHlnZQaCTWbNvs4owJivNW65kzsIM,85
|
|
2
2
|
sumo/wrapper/__init__.py,sha256=JK6iMAy2Fdrc7iaIHTn60fHPdRvsgNjZwWD6DJtGUYQ,235
|
|
3
|
-
sumo/wrapper/_auth_provider.py,sha256=
|
|
3
|
+
sumo/wrapper/_auth_provider.py,sha256=rmnqRm_o5D9DLt4XBtiJ_CIWV3PJ-BVbq6lFGaPNtUg,14665
|
|
4
4
|
sumo/wrapper/_blob_client.py,sha256=SyfyFZ1hHVWKU4lmgUqSjl5TaK_OJNQ__0wDETrp-ag,1623
|
|
5
5
|
sumo/wrapper/_decorators.py,sha256=3IEi6GXVkkDACHoo8dOeDoBtZh5TlJ6Tw0qlpOVHqLQ,806
|
|
6
6
|
sumo/wrapper/_logging.py,sha256=jOtMpiVJcF38QBM4ER1VDdHom777L5MkfomtOVHXgu8,1060
|
|
7
7
|
sumo/wrapper/_retry_strategy.py,sha256=qDgl_FLec94fzZaCG__BT8tO4O-D5cZ2_JRYw1zjVTI,2495
|
|
8
|
-
sumo/wrapper/_version.py,sha256=
|
|
8
|
+
sumo/wrapper/_version.py,sha256=9dn53xHvp9AcyvqzxPz05pNmF5wMs3xSD36JDF3TqOY,413
|
|
9
9
|
sumo/wrapper/config.py,sha256=6t7qqjrrmd11m4VMlRryiMYw2JDU_R51305woAP1TAs,865
|
|
10
10
|
sumo/wrapper/login.py,sha256=PGYhKnrwV4NorNbwnWj-5LDvCCIKgn-pnvCTeCDvqXA,2375
|
|
11
|
-
sumo/wrapper/sumo_client.py,sha256=
|
|
12
|
-
sumo_wrapper_python-1.0.
|
|
13
|
-
sumo_wrapper_python-1.0.
|
|
14
|
-
sumo_wrapper_python-1.0.
|
|
15
|
-
sumo_wrapper_python-1.0.
|
|
16
|
-
sumo_wrapper_python-1.0.
|
|
17
|
-
sumo_wrapper_python-1.0.
|
|
11
|
+
sumo/wrapper/sumo_client.py,sha256=vWmiQgUJG9hE4YCORujSs4HbsPIEasFXBKk3DiL48fY,17708
|
|
12
|
+
sumo_wrapper_python-1.0.21.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
13
|
+
sumo_wrapper_python-1.0.21.dist-info/METADATA,sha256=ubC5TldHlD_okArIUYzpDFo0NgWgo3CHnFY3IbJmOMc,14560
|
|
14
|
+
sumo_wrapper_python-1.0.21.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
15
|
+
sumo_wrapper_python-1.0.21.dist-info/entry_points.txt,sha256=V_vGky2C3He5vohJAxnBdvpt_fqfUDFj5irUm9HtoFc,55
|
|
16
|
+
sumo_wrapper_python-1.0.21.dist-info/top_level.txt,sha256=rLbKyH9rWgCj3PoLeR7fvC5X8vCaUc5LF8-Y_GBWZL0,5
|
|
17
|
+
sumo_wrapper_python-1.0.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{sumo_wrapper_python-1.0.19.dist-info → sumo_wrapper_python-1.0.21.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|