appmesh 1.1.5__py3-none-any.whl → 1.1.7__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 +9 -10
- {appmesh-1.1.5.dist-info → appmesh-1.1.7.dist-info}/METADATA +2 -2
- appmesh-1.1.7.dist-info/RECORD +6 -0
- appmesh-1.1.5.dist-info/RECORD +0 -6
- {appmesh-1.1.5.dist-info → appmesh-1.1.7.dist-info}/WHEEL +0 -0
- {appmesh-1.1.5.dist-info → appmesh-1.1.7.dist-info}/top_level.txt +0 -0
appmesh/appmesh_client.py
CHANGED
@@ -346,23 +346,22 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
346
346
|
AppMeshClient.Method.POST,
|
347
347
|
path="/appmesh/login",
|
348
348
|
header={
|
349
|
-
"
|
350
|
-
"Password": base64.b64encode(user_pwd.encode()),
|
349
|
+
"Authorization": "Basic " + base64.b64encode((user_name + ":" + user_pwd).encode()).decode(),
|
351
350
|
"Expire-Seconds": self._parse_duration(timeout_seconds),
|
352
351
|
},
|
353
352
|
)
|
354
353
|
if resp.status_code == HTTPStatus.OK:
|
355
354
|
if "Access-Token" in resp.json():
|
356
355
|
self.jwt_token = resp.json()["Access-Token"]
|
357
|
-
elif resp.status_code == HTTPStatus.UNAUTHORIZED and "
|
358
|
-
challenge = resp.json()["
|
356
|
+
elif resp.status_code == HTTPStatus.UNAUTHORIZED and "Totp-Challenge" in resp.json():
|
357
|
+
challenge = resp.json()["Totp-Challenge"]
|
359
358
|
resp = self._request_http(
|
360
359
|
AppMeshClient.Method.POST,
|
361
360
|
path="/appmesh/totp/validate",
|
362
361
|
header={
|
363
|
-
"Username": base64.b64encode(user_name.encode()),
|
364
|
-
"Totp-Challenge": base64.b64encode(challenge.encode()),
|
365
|
-
"Totp":
|
362
|
+
"Username": base64.b64encode(user_name.encode()).decode(),
|
363
|
+
"Totp-Challenge": base64.b64encode(challenge.encode()).decode(),
|
364
|
+
"Totp": totp_code,
|
366
365
|
"Expire-Seconds": self._parse_duration(timeout_seconds),
|
367
366
|
},
|
368
367
|
)
|
@@ -458,7 +457,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
458
457
|
resp = self._request_http(
|
459
458
|
method=AppMeshClient.Method.POST,
|
460
459
|
path="/appmesh/totp/setup",
|
461
|
-
header={"Totp":
|
460
|
+
header={"Totp": totp_code},
|
462
461
|
)
|
463
462
|
if resp.status_code != HTTPStatus.OK:
|
464
463
|
raise Exception(resp.text)
|
@@ -1304,10 +1303,10 @@ class AppMeshClientTCP(AppMeshClient):
|
|
1304
1303
|
context.minimum_version = ssl.TLSVersion.TLSv1_2
|
1305
1304
|
else:
|
1306
1305
|
context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
|
1307
|
-
|
1306
|
+
if self.ssl_verify:
|
1307
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
1308
1308
|
if isinstance(self.ssl_verify, str):
|
1309
1309
|
# Load server-side certificate authority (CA) certificates
|
1310
|
-
context.check_hostname = True
|
1311
1310
|
context.load_verify_locations(self.ssl_verify)
|
1312
1311
|
if self.ssl_client_cert is not None:
|
1313
1312
|
# Load client-side certificate and private key
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: appmesh
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.7
|
4
4
|
Summary: Client SDK for App Mesh
|
5
5
|
Home-page: https://github.com/laoshanxi/app-mesh
|
6
6
|
Author: laoshanxi
|
@@ -43,7 +43,7 @@ Cloud native | Schedule cloud level applications for running on multile hosts wi
|
|
43
43
|
Micro service application | ⚡️ [Consul micro-service cluster management](https://app-mesh.readthedocs.io/en/latest/CONSUL.html)
|
44
44
|
Extra Features | Collect host/app resource usage <br> Remote run shell commands <br> Download/Upload files interface <br> Hot-update support `systemctl reload appmesh` <br> Bash completion <br> Reverse proxy <br> [Web GUI](https://github.com/laoshanxi/app-mesh-ui)
|
45
45
|
Platform support | X86_64 <br> ARM32 <br> ARM64
|
46
|
-
SDK | [Python](https://app-mesh.readthedocs.io/en/latest/api/appmesh_client.html) <br> [Golang](https://github.com/laoshanxi/app-mesh/blob/main/src/sdk/go/appmesh_client.go)
|
46
|
+
SDK | [Python](https://app-mesh.readthedocs.io/en/latest/api/appmesh_client.html) <br> [Golang](https://github.com/laoshanxi/app-mesh/blob/main/src/sdk/go/appmesh_client.go) <br> Swagger `https://localhost:6060/swagger`
|
47
47
|
|
48
48
|
## Getting started
|
49
49
|
|
@@ -0,0 +1,6 @@
|
|
1
|
+
appmesh/__init__.py,sha256=xRdXeFHEieRauuJZElbEBASgXG0ZzU1a5_0isAhM7Gw,11
|
2
|
+
appmesh/appmesh_client.py,sha256=8nnB38J3wvS8tguEzX_KTJkilW6uMoA4opKIaDq1lG0,59591
|
3
|
+
appmesh-1.1.7.dist-info/METADATA,sha256=ggcCacVaQs3tuC51tw2t67rUgbk6uXJ8qM0clU6uYEs,10832
|
4
|
+
appmesh-1.1.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
5
|
+
appmesh-1.1.7.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
|
6
|
+
appmesh-1.1.7.dist-info/RECORD,,
|
appmesh-1.1.5.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
appmesh/__init__.py,sha256=xRdXeFHEieRauuJZElbEBASgXG0ZzU1a5_0isAhM7Gw,11
|
2
|
-
appmesh/appmesh_client.py,sha256=v7SsLw8pBChhwPb8VpuSEL1GRfXFkyUBA9WCRpqyQxM,59705
|
3
|
-
appmesh-1.1.5.dist-info/METADATA,sha256=OYrLSm28e908TEoAusZ09Ol8dc5Sx8FiHO40VVeeqoI,10786
|
4
|
-
appmesh-1.1.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
5
|
-
appmesh-1.1.5.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
|
6
|
-
appmesh-1.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|