pyntcli 0.1.67__py3-none-any.whl → 0.1.69__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.
- pyntcli/__init__.py +1 -1
- pyntcli/analytics/send.py +1 -0
- pyntcli/commands/root.py +1 -0
- pyntcli/commands/util.py +6 -1
- pyntcli/main.py +3 -0
- pyntcli/pynt_docker/pynt_container.py +6 -1
- {pyntcli-0.1.67.dist-info → pyntcli-0.1.69.dist-info}/METADATA +1 -1
- {pyntcli-0.1.67.dist-info → pyntcli-0.1.69.dist-info}/RECORD +11 -11
- {pyntcli-0.1.67.dist-info → pyntcli-0.1.69.dist-info}/WHEEL +0 -0
- {pyntcli-0.1.67.dist-info → pyntcli-0.1.69.dist-info}/entry_points.txt +0 -0
- {pyntcli-0.1.67.dist-info → pyntcli-0.1.69.dist-info}/top_level.txt +0 -0
pyntcli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.69"
|
pyntcli/analytics/send.py
CHANGED
pyntcli/commands/root.py
CHANGED
|
@@ -51,6 +51,7 @@ class BaseCommand():
|
|
|
51
51
|
parser.add_argument("--insecure", default=False, required=False, action='store_true',help="use when target uses self signed certificates")
|
|
52
52
|
parser.add_argument("--dev-flags", type=str,default="", help=argparse.SUPPRESS)
|
|
53
53
|
parser.add_argument("--host-ca", type=str, default="")
|
|
54
|
+
parser.add_argument("--transport-config", type=str, default="")
|
|
54
55
|
parser.add_argument("--application-id", type=str, default="", required=False)
|
|
55
56
|
parser.add_argument("--proxy", type=str, default="", required=False)
|
|
56
57
|
|
pyntcli/commands/util.py
CHANGED
|
@@ -6,12 +6,15 @@ from contextlib import contextmanager
|
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
import webbrowser
|
|
8
8
|
import json
|
|
9
|
+
import pyntcli.log.log as log
|
|
9
10
|
|
|
10
11
|
from pyntcli.pynt_docker import pynt_container
|
|
11
12
|
from pyntcli.ui import report
|
|
12
13
|
from pyntcli.transport import pynt_requests
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
logger = log.get_logger()
|
|
17
|
+
|
|
15
18
|
def is_port_in_use(port: int) -> bool:
|
|
16
19
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
|
17
20
|
return s.connect_ex(('localhost', port)) == 0
|
|
@@ -21,7 +24,7 @@ def find_open_port() -> int:
|
|
|
21
24
|
s.bind(('', 0))
|
|
22
25
|
return s.getsockname()[1]
|
|
23
26
|
|
|
24
|
-
HEALTHCHECK_TIMEOUT =
|
|
27
|
+
HEALTHCHECK_TIMEOUT = 60
|
|
25
28
|
HEALTHCHECK_INTERVAL = 0.1
|
|
26
29
|
|
|
27
30
|
def wait_for_healthcheck(address):
|
|
@@ -33,6 +36,8 @@ def wait_for_healthcheck(address):
|
|
|
33
36
|
return
|
|
34
37
|
except:
|
|
35
38
|
time.sleep(HEALTHCHECK_INTERVAL)
|
|
39
|
+
|
|
40
|
+
logger.debug("Health check timed out!")
|
|
36
41
|
raise TimeoutError()
|
|
37
42
|
|
|
38
43
|
def get_user_report_path(path,file_type):
|
pyntcli/main.py
CHANGED
|
@@ -79,6 +79,9 @@ def main():
|
|
|
79
79
|
pynt_errors.unexpected_error()
|
|
80
80
|
except SomeFoundingsOrWargningsException as e:
|
|
81
81
|
exit(1)
|
|
82
|
+
except Exception as e:
|
|
83
|
+
analytics.emit(analytics.ERROR,{"error": "{}".format(e)})
|
|
84
|
+
pynt_errors.unexpected_error()
|
|
82
85
|
finally:
|
|
83
86
|
log.flush_logger()
|
|
84
87
|
ui_thread.stop()
|
|
@@ -27,7 +27,7 @@ def get_docker_type():
|
|
|
27
27
|
c = docker.from_env()
|
|
28
28
|
version_data = c.version()
|
|
29
29
|
platform = version_data.get("Platform")
|
|
30
|
-
|
|
30
|
+
analytics.emit(analytics.DOCKER_PLATFORM, platform)
|
|
31
31
|
if platform and platform.get("Name"):
|
|
32
32
|
return platform.get("Name")
|
|
33
33
|
|
|
@@ -82,6 +82,11 @@ def get_container_with_arguments(args: argparse.Namespace , *port_args: PyntDock
|
|
|
82
82
|
ca_name = os.path.basename(args.host_ca)
|
|
83
83
|
docker_arguments += ["--host-ca", ca_name]
|
|
84
84
|
mounts.append(create_mount(os.path.abspath(args.host_ca), "/etc/pynt/{}".format(ca_name)))
|
|
85
|
+
|
|
86
|
+
if "transport_config" in args and args.transport_config:
|
|
87
|
+
tc_name = os.path.basename(args.transport_config)
|
|
88
|
+
docker_arguments += ["--transport-config", tc_name]
|
|
89
|
+
mounts.append(create_mount(os.path.abspath(args.transport_config), "/etc/pynt/{}".format(tc_name)))
|
|
85
90
|
|
|
86
91
|
env = {PYNT_CREDENTIALS:CredStore().get_access_token(), "PYNT_SAAS_URL": PYNT_SAAS}
|
|
87
92
|
if user_set_all_variables():
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
pyntcli/__init__.py,sha256=
|
|
2
|
-
pyntcli/main.py,sha256=
|
|
1
|
+
pyntcli/__init__.py,sha256=3nwo1wJ5elZRHnCuCkc-pqzqRZO_38VMOqiKtCotf8M,23
|
|
2
|
+
pyntcli/main.py,sha256=bzywSWDQuwjAUF6dPzaybTZ0kvz5kuxO-_YbEgQXv7Y,4089
|
|
3
3
|
pyntcli/analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
pyntcli/analytics/send.py,sha256=
|
|
4
|
+
pyntcli/analytics/send.py,sha256=SVNcFwHYJaTKn7Jhxns93wjq0v6g2DgVOr9wv-QagE8,2139
|
|
5
5
|
pyntcli/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
pyntcli/auth/login.py,sha256=WgF5r00bpM4c1__thzD6zCJ6207qxgtT0ixPvD1cEHA,5109
|
|
7
7
|
pyntcli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -11,13 +11,13 @@ pyntcli/commands/newman.py,sha256=7u6N12IrJZeLXOTTz7JE8qBXPWNmGFxHmGlY_gE_zGM,41
|
|
|
11
11
|
pyntcli/commands/postman.py,sha256=5eF14wjdDwJC8AvXjwyuZnlb6JZsPs_QWh5e77LauGA,4928
|
|
12
12
|
pyntcli/commands/proxy.py,sha256=kyhgtpB9zrbMa_lpg0q8uLdZJ4MqLZfqyxumoaqiK3w,7861
|
|
13
13
|
pyntcli/commands/pynt_cmd.py,sha256=DeUCZm1M5yfBNYFyb4qYrAe02i_qIHr3RqqsKfuujko,2362
|
|
14
|
-
pyntcli/commands/root.py,sha256=
|
|
14
|
+
pyntcli/commands/root.py,sha256=4TLH67_n1S4nxmlB2YzyDLZpx2GJLK2rXMEfD3Wze1M,2839
|
|
15
15
|
pyntcli/commands/sub_command.py,sha256=GF3-rE_qk2L4jGPFqHLm9SdGINmu3EakhjJTFyWjRms,374
|
|
16
|
-
pyntcli/commands/util.py,sha256=
|
|
16
|
+
pyntcli/commands/util.py,sha256=IREZvHYJ7wEth8ujOkk5ZXZ4UrUA7jDv134_UueED4s,2995
|
|
17
17
|
pyntcli/log/__init__.py,sha256=cOGwOYzMoshEbZiiasBGkj6wF0SBu3Jdpl-AuakDesw,19
|
|
18
18
|
pyntcli/log/log.py,sha256=EvqVVh0NwnTNjeiW6Pb5CZ_7FwNwZuVi7IhPodMeN-U,1039
|
|
19
19
|
pyntcli/pynt_docker/__init__.py,sha256=PQIOVxc7XXtMLfEX7ojgwf_Z3mmTllO3ZvzUZTPOxQY,30
|
|
20
|
-
pyntcli/pynt_docker/pynt_container.py,sha256=
|
|
20
|
+
pyntcli/pynt_docker/pynt_container.py,sha256=cYeyRv4wPk1zO0yO8nA80ZmtVOQstnqUB_POK7ii8lY,8163
|
|
21
21
|
pyntcli/store/__init__.py,sha256=xuS9OB21F6B1sUx5XPGxz_6WpG6-KTMbuq50RrZS5OY,29
|
|
22
22
|
pyntcli/store/json_connector.py,sha256=UGs3uORw3iyn0YJ8kzab-veEZToA6d-ByXYuqEleWsA,560
|
|
23
23
|
pyntcli/store/store.py,sha256=Fbc7yxjht0EJ89eGF8eMgNQJ3sgYRTPmj2-sWQ5UUPs,1766
|
|
@@ -32,8 +32,8 @@ pyntcli/ui/ui_thread.py,sha256=JAonXc6aOFawaEixghclxHSCHZBieEWfZzsPef_ZNMI,4796
|
|
|
32
32
|
tests/conftest.py,sha256=gToq5K74GtgeGQXjFvXSzMaE6axBYxAzcFG5XJPOXjI,427
|
|
33
33
|
tests/auth/test_login.py,sha256=M6JRFTQRZrL6M2-iph_r-aBSQMMiFDncQbVYeObBFYU,3296
|
|
34
34
|
tests/store/test_cred_store.py,sha256=_7-917EtNC9eKEumO2_lt-7KuDmCwOZFaowCm7DbA_A,254
|
|
35
|
-
pyntcli-0.1.
|
|
36
|
-
pyntcli-0.1.
|
|
37
|
-
pyntcli-0.1.
|
|
38
|
-
pyntcli-0.1.
|
|
39
|
-
pyntcli-0.1.
|
|
35
|
+
pyntcli-0.1.69.dist-info/METADATA,sha256=xM_Sx70gTTpDlPcPl_k7GNFEGzuKze0KnqAfbXY5Gv8,438
|
|
36
|
+
pyntcli-0.1.69.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
37
|
+
pyntcli-0.1.69.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
|
|
38
|
+
pyntcli-0.1.69.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
|
|
39
|
+
pyntcli-0.1.69.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|