appmesh 0.3.3__py3-none-any.whl → 0.3.5__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/appmesh_client.py +10 -10
- {appmesh-0.3.3.dist-info → appmesh-0.3.5.dist-info}/METADATA +1 -1
- appmesh-0.3.5.dist-info/RECORD +6 -0
- appmesh-0.3.3.dist-info/RECORD +0 -6
- {appmesh-0.3.3.dist-info → appmesh-0.3.5.dist-info}/WHEEL +0 -0
- {appmesh-0.3.3.dist-info → appmesh-0.3.5.dist-info}/top_level.txt +0 -0
appmesh/appmesh_client.py
CHANGED
@@ -26,19 +26,19 @@ TCP_MESSAGE_HEADER_LENGTH = 4
|
|
26
26
|
_SSL_CA_PEM_FILE = "/opt/appmesh/ssl/ca.pem"
|
27
27
|
|
28
28
|
|
29
|
-
def _get_str_item(data, key):
|
30
|
-
return
|
29
|
+
def _get_str_item(data: dict, key):
|
30
|
+
return data[key] if (data and key in data and data[key] and isinstance(data[key], str)) else None
|
31
31
|
|
32
32
|
|
33
|
-
def _get_int_item(data, key):
|
34
|
-
return int(data[key]) if (data and key in data and data[key]) else None
|
33
|
+
def _get_int_item(data: dict, key):
|
34
|
+
return int(data[key]) if (data and key in data and data[key] and isinstance(data[key], int)) else None
|
35
35
|
|
36
36
|
|
37
|
-
def _get_bool_item(data, key):
|
37
|
+
def _get_bool_item(data: dict, key):
|
38
38
|
return bool(data[key]) if (data and key in data and data[key]) else None
|
39
39
|
|
40
40
|
|
41
|
-
def
|
41
|
+
def _get_native_item(data: dict, key):
|
42
42
|
return data[key] if (data and key in data and data[key]) else None
|
43
43
|
|
44
44
|
|
@@ -97,7 +97,7 @@ class App(object):
|
|
97
97
|
|
98
98
|
self.shell = _get_bool_item(data, "shell")
|
99
99
|
self.description = _get_str_item(data, "description")
|
100
|
-
self.metadata =
|
100
|
+
self.metadata = _get_native_item(data, "metadata")
|
101
101
|
self.working_dir = _get_str_item(data, "working_dir")
|
102
102
|
self.status = _get_int_item(data, "status")
|
103
103
|
self.docker_image = _get_str_item(data, "docker_image")
|
@@ -107,14 +107,14 @@ class App(object):
|
|
107
107
|
self.end_time = _get_int_item(data, "end_time")
|
108
108
|
self.interval = _get_int_item(data, "interval")
|
109
109
|
self.cron = _get_bool_item(data, "cron")
|
110
|
-
self.daily_limitation = App.DailyLimitation(
|
110
|
+
self.daily_limitation = App.DailyLimitation(_get_native_item(data, "daily_limitation"))
|
111
111
|
|
112
112
|
self.retention = _get_str_item(data, "retention")
|
113
113
|
self.extra_time = _get_str_item(data, "extra_time")
|
114
114
|
|
115
115
|
self.health_check_cmd = _get_str_item(data, "health_check_cmd")
|
116
116
|
self.permission = _get_int_item(data, "permission")
|
117
|
-
self.behavior = App.Behavior(
|
117
|
+
self.behavior = App.Behavior(_get_native_item(data, "behavior"))
|
118
118
|
|
119
119
|
self.env = dict()
|
120
120
|
if data and "env" in data:
|
@@ -125,7 +125,7 @@ class App(object):
|
|
125
125
|
for k, v in data["sec_env"].items():
|
126
126
|
self.sec_env[k] = v
|
127
127
|
self.pid = _get_int_item(data, "pid")
|
128
|
-
self.resource_limit = App.ResourceLimitation(
|
128
|
+
self.resource_limit = App.ResourceLimitation(_get_native_item(data, "resource_limit"))
|
129
129
|
|
130
130
|
# readonly attributes
|
131
131
|
self.owner = _get_str_item(data, "owner")
|
@@ -0,0 +1,6 @@
|
|
1
|
+
appmesh/__init__.py,sha256=xRdXeFHEieRauuJZElbEBASgXG0ZzU1a5_0isAhM7Gw,11
|
2
|
+
appmesh/appmesh_client.py,sha256=P1qrjDQrAqfYNrM73xywOiD8JH8dxZeWEefIdSpZ32s,49828
|
3
|
+
appmesh-0.3.5.dist-info/METADATA,sha256=hhv7ry5N4MGmA5-sEhyKF2QrSV5eJswElCnujqNx75I,10620
|
4
|
+
appmesh-0.3.5.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
5
|
+
appmesh-0.3.5.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
|
6
|
+
appmesh-0.3.5.dist-info/RECORD,,
|
appmesh-0.3.3.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
appmesh/__init__.py,sha256=xRdXeFHEieRauuJZElbEBASgXG0ZzU1a5_0isAhM7Gw,11
|
2
|
-
appmesh/appmesh_client.py,sha256=KbBIsn5hZZfJrBO35Z7e01FmzYY3Uzpubk4KO6yJvcc,49737
|
3
|
-
appmesh-0.3.3.dist-info/METADATA,sha256=kUPMAGPcUWAxVbdP3K5u4lVKI5u741hrHqz9T2iZGLs,10620
|
4
|
-
appmesh-0.3.3.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
5
|
-
appmesh-0.3.3.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
|
6
|
-
appmesh-0.3.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|