appmesh 1.4.1__py3-none-any.whl → 1.4.2__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.
- appmesh/app_run.py +2 -2
- appmesh/http_client.py +5 -23
- {appmesh-1.4.1.dist-info → appmesh-1.4.2.dist-info}/METADATA +1 -1
- {appmesh-1.4.1.dist-info → appmesh-1.4.2.dist-info}/RECORD +6 -6
- {appmesh-1.4.1.dist-info → appmesh-1.4.2.dist-info}/WHEEL +0 -0
- {appmesh-1.4.1.dist-info → appmesh-1.4.2.dist-info}/top_level.txt +0 -0
appmesh/app_run.py
CHANGED
@@ -21,14 +21,14 @@ class AppRun(object):
|
|
21
21
|
self._client = client
|
22
22
|
"""Instance of `AppMeshClient` used to manage this application run."""
|
23
23
|
|
24
|
-
self.
|
24
|
+
self._forward_to = client.forward_to
|
25
25
|
"""Target server for the application run, used for forwarding."""
|
26
26
|
|
27
27
|
@contextmanager
|
28
28
|
def forward_to(self):
|
29
29
|
"""Context manager to override the `forward_to` for the duration of the run."""
|
30
30
|
original_value = self._client.forward_to
|
31
|
-
self._client.forward_to = self.
|
31
|
+
self._client.forward_to = self._forward_to
|
32
32
|
try:
|
33
33
|
yield
|
34
34
|
finally:
|
appmesh/http_client.py
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
import abc
|
4
4
|
import base64
|
5
5
|
import json
|
6
|
-
import warnings
|
7
6
|
import os
|
8
7
|
from datetime import datetime
|
9
8
|
from enum import Enum, unique
|
@@ -75,7 +74,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
75
74
|
- view_config()
|
76
75
|
- set_log_level()
|
77
76
|
- view_host_resources()
|
78
|
-
-
|
77
|
+
- get_metrics()
|
79
78
|
- add_tag()
|
80
79
|
- delete_tag()
|
81
80
|
- view_tags()
|
@@ -158,7 +157,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
158
157
|
self.ssl_verify = rest_ssl_verify
|
159
158
|
self.ssl_client_cert = rest_ssl_client_cert
|
160
159
|
self.rest_timeout = rest_timeout
|
161
|
-
self.
|
160
|
+
self._forward_to = None
|
162
161
|
|
163
162
|
@property
|
164
163
|
def jwt_token(self) -> str:
|
@@ -224,7 +223,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
224
223
|
- All nodes must use identical JWT issuer settings
|
225
224
|
- When port is omitted, current service port will be used
|
226
225
|
"""
|
227
|
-
return self.
|
226
|
+
return self._forward_to
|
228
227
|
|
229
228
|
@forward_to.setter
|
230
229
|
def forward_to(self, host: str) -> None:
|
@@ -247,7 +246,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
247
246
|
>>> client.forward_to = None # Disable forwarding
|
248
247
|
"""
|
249
248
|
|
250
|
-
self.
|
249
|
+
self._forward_to = host
|
251
250
|
|
252
251
|
########################################
|
253
252
|
# Security
|
@@ -311,7 +310,6 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
311
310
|
|
312
311
|
def authentication(self, token: str, permission=None) -> bool:
|
313
312
|
"""Deprecated: Use authenticate() instead."""
|
314
|
-
warnings.warn("authentication() is deprecated, use authenticate() instead.", DeprecationWarning, stacklevel=2)
|
315
313
|
return self.authenticate(token, permission)
|
316
314
|
|
317
315
|
def authenticate(self, token: str, permission: str = None) -> bool:
|
@@ -827,11 +825,6 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
827
825
|
raise Exception(resp.text)
|
828
826
|
return resp.json()
|
829
827
|
|
830
|
-
def user_self(self) -> dict:
|
831
|
-
"""Deprecated: Use view_self() instead."""
|
832
|
-
warnings.warn("user_self() is deprecated, use view_self() instead.", DeprecationWarning, stacklevel=2)
|
833
|
-
return self.view_self()
|
834
|
-
|
835
828
|
def view_self(self) -> dict:
|
836
829
|
"""Get information about the current user.
|
837
830
|
|
@@ -969,7 +962,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
969
962
|
########################################
|
970
963
|
# Promethus metrics
|
971
964
|
########################################
|
972
|
-
def
|
965
|
+
def get_metrics(self):
|
973
966
|
"""Get Prometheus metrics.
|
974
967
|
|
975
968
|
Returns:
|
@@ -1136,17 +1129,6 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
1136
1129
|
break
|
1137
1130
|
return None
|
1138
1131
|
|
1139
|
-
def run_sync(
|
1140
|
-
self,
|
1141
|
-
app: Union[App, str],
|
1142
|
-
stdout_print: bool = True,
|
1143
|
-
max_time_seconds: Union[int, str] = DURATION_TWO_DAYS_ISO,
|
1144
|
-
life_cycle_seconds: Union[int, str] = DURATION_TWO_DAYS_HALF_ISO,
|
1145
|
-
) -> Tuple[Union[int, None], str]:
|
1146
|
-
"""Deprecated: Use run_app_sync() instead."""
|
1147
|
-
warnings.warn("run_sync() is deprecated, use run_app_sync() instead.", DeprecationWarning, stacklevel=2)
|
1148
|
-
return self.run_app_sync(app, stdout_print, max_time_seconds, life_cycle_seconds)
|
1149
|
-
|
1150
1132
|
def run_app_sync(
|
1151
1133
|
self,
|
1152
1134
|
app: Union[App, str],
|
@@ -1,13 +1,13 @@
|
|
1
1
|
appmesh/__init__.py,sha256=vgiSdMzlzDwgHxBMDoFaKWb77g2nJVciRf4z_ssAlwE,431
|
2
2
|
appmesh/app.py,sha256=9Q-SOOej-MH13BU5Dv2iTa-p-sECCJQp6ZX9DjWWmwE,10526
|
3
3
|
appmesh/app_output.py,sha256=JK_TMKgjvaw4n_ys_vmN5S4MyWVZpmD7NlKz_UyMIM8,1015
|
4
|
-
appmesh/app_run.py,sha256=
|
4
|
+
appmesh/app_run.py,sha256=9ISKGZ3k3kkbQvSsPfRfkOLqD9xhbqNOM7ork9F4w9c,1712
|
5
5
|
appmesh/appmesh_client.py,sha256=0ltkqHZUq094gKneYmC0bEZCP0X9kHTp9fccKdWFWP0,339
|
6
|
-
appmesh/http_client.py,sha256=
|
6
|
+
appmesh/http_client.py,sha256=byVfHkZycZFv5LePlFgKT0Pu1HBC6AhEFbnrWFR-6PA,47679
|
7
7
|
appmesh/tcp_client.py,sha256=RkHl5s8jE333BJOgxJqJ_fvjbdRQza7ciV49vLT6YO4,10923
|
8
8
|
appmesh/tcp_messages.py,sha256=w1Kehz_aX4X2CYAUsy9mFVJRhxnLQwwc6L58W4YkQqs,969
|
9
9
|
appmesh/tcp_transport.py,sha256=UMGby2oKV4k7lyXZUMSOe2Je34fb1w7nTkxEpatKLKg,7256
|
10
|
-
appmesh-1.4.
|
11
|
-
appmesh-1.4.
|
12
|
-
appmesh-1.4.
|
13
|
-
appmesh-1.4.
|
10
|
+
appmesh-1.4.2.dist-info/METADATA,sha256=R0wCzPXHfSqN2G0jtfkOKYkikbbcyM_JwJLSMx2ToZM,11142
|
11
|
+
appmesh-1.4.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
12
|
+
appmesh-1.4.2.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
|
13
|
+
appmesh-1.4.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|