tft-cli 0.0.22__py3-none-any.whl → 0.0.24__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.
- tft/cli/commands.py +522 -93
- tft/cli/commands.py.backup +2211 -0
- tft/cli/config.py +3 -1
- tft/cli/tool.py +1 -0
- tft/cli/utils.py +21 -4
- {tft_cli-0.0.22.dist-info → tft_cli-0.0.24.dist-info}/METADATA +7 -6
- tft_cli-0.0.24.dist-info/RECORD +11 -0
- tft_cli-0.0.22.dist-info/RECORD +0 -10
- {tft_cli-0.0.22.dist-info → tft_cli-0.0.24.dist-info}/LICENSE +0 -0
- {tft_cli-0.0.22.dist-info → tft_cli-0.0.24.dist-info}/WHEEL +0 -0
- {tft_cli-0.0.22.dist-info → tft_cli-0.0.24.dist-info}/entry_points.txt +0 -0
tft/cli/config.py
CHANGED
|
@@ -17,6 +17,8 @@ settings = LazySettings(
|
|
|
17
17
|
WATCH_TICK=3,
|
|
18
18
|
DEFAULT_API_TIMEOUT=10,
|
|
19
19
|
DEFAULT_API_RETRIES=7,
|
|
20
|
+
# default reservation duration in minutes
|
|
21
|
+
DEFAULT_RESERVATION_DURATION=30,
|
|
20
22
|
# should lead to delays of 0.5, 1, 2, 4, 8, 16, 32 seconds
|
|
21
23
|
DEFAULT_RETRY_BACKOFF_FACTOR=1,
|
|
22
24
|
# system CA certificates path, default for RHEL variants
|
|
@@ -24,5 +26,5 @@ settings = LazySettings(
|
|
|
24
26
|
# Testing Farm sanity test,
|
|
25
27
|
TESTING_FARM_TESTS_GIT_URL="https://gitlab.com/testing-farm/tests",
|
|
26
28
|
TESTING_FARM_SANITY_PLAN="/testing-farm/sanity",
|
|
27
|
-
PUBLIC_IP_CHECKER_URL="
|
|
29
|
+
PUBLIC_IP_CHECKER_URL="https://ipv4.icanhazip.com",
|
|
28
30
|
)
|
tft/cli/tool.py
CHANGED
|
@@ -17,6 +17,7 @@ app.command()(commands.reserve)
|
|
|
17
17
|
app.command()(commands.run)
|
|
18
18
|
app.command()(commands.version)
|
|
19
19
|
app.command()(commands.watch)
|
|
20
|
+
app.command()(commands.encrypt)
|
|
20
21
|
|
|
21
22
|
# This command is available only for the container based deployment
|
|
22
23
|
if os.path.exists(settings.CONTAINER_SIGN):
|
tft/cli/utils.py
CHANGED
|
@@ -69,10 +69,29 @@ def hw_constraints(hardware: List[str]) -> Dict[Any, Any]:
|
|
|
69
69
|
if not path or not value:
|
|
70
70
|
exit_error(f"cannot parse hardware constraint `{raw_constraint}`")
|
|
71
71
|
|
|
72
|
+
path_splitted = path.split('.')
|
|
73
|
+
first_key = path_splitted[0]
|
|
74
|
+
|
|
75
|
+
# Special handling for network and disk as they are lists
|
|
76
|
+
if first_key in ("network", "disk"):
|
|
77
|
+
if first_key not in constraints:
|
|
78
|
+
constraints[first_key] = []
|
|
79
|
+
|
|
80
|
+
if len(path_splitted) > 1:
|
|
81
|
+
new_dict = {}
|
|
82
|
+
current = new_dict
|
|
83
|
+
# Handle all nested levels except the last one
|
|
84
|
+
for key in path_splitted[1:-1]:
|
|
85
|
+
current[key] = {}
|
|
86
|
+
current = current[key]
|
|
87
|
+
# Set the final value
|
|
88
|
+
current[path_splitted[-1]] = value
|
|
89
|
+
constraints[first_key].append(new_dict)
|
|
90
|
+
continue
|
|
91
|
+
|
|
72
92
|
# Walk the path, step by step, and initialize containers along the way. The last step is not
|
|
73
93
|
# a name of another nested container, but actually a name in the last container.
|
|
74
94
|
container: Any = constraints
|
|
75
|
-
path_splitted = path.split('.')
|
|
76
95
|
|
|
77
96
|
while len(path_splitted) > 1:
|
|
78
97
|
step = path_splitted.pop(0)
|
|
@@ -91,9 +110,7 @@ def hw_constraints(hardware: List[str]) -> Dict[Any, Any]:
|
|
|
91
110
|
value_mixed = False
|
|
92
111
|
|
|
93
112
|
container[path_splitted.pop()] = value_mixed
|
|
94
|
-
|
|
95
|
-
# automatically convert disk and network values to a list, as the standard requires
|
|
96
|
-
return {key: value if key not in ("disk", "network") else [value] for key, value in constraints.items()}
|
|
113
|
+
return constraints
|
|
97
114
|
|
|
98
115
|
|
|
99
116
|
def options_from_file(filepath) -> Dict[str, str]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tft-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.24
|
|
4
4
|
Summary: Testing Farm CLI tool
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: Miroslav Vadkerti
|
|
@@ -11,11 +11,12 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.9
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Requires-Dist: click (>=8.0.4,<
|
|
14
|
+
Requires-Dist: click (>=8.0.4,<9.0.0)
|
|
15
15
|
Requires-Dist: colorama (>=0.4.4,<0.5.0)
|
|
16
|
-
Requires-Dist: dynaconf (>=3.1.
|
|
16
|
+
Requires-Dist: dynaconf (>=3.1.2,<4.0.0)
|
|
17
17
|
Requires-Dist: requests (>=2.27.1,<3.0.0)
|
|
18
|
-
Requires-Dist: rich (>=12
|
|
19
|
-
Requires-Dist: ruamel-yaml (>=0.18.
|
|
18
|
+
Requires-Dist: rich (>=12)
|
|
19
|
+
Requires-Dist: ruamel-yaml (>=0.18.5,<0.19.0)
|
|
20
20
|
Requires-Dist: setuptools
|
|
21
|
-
Requires-Dist:
|
|
21
|
+
Requires-Dist: shellingham (>=1.3.0,<2.0.0)
|
|
22
|
+
Requires-Dist: typer (>=0.11)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
tft/cli/__init__.py,sha256=uEJkNJbqC583PBtNI30kxWdeOr3Wj6zJzIYKf0AD72I,92
|
|
2
|
+
tft/cli/commands.py,sha256=MaImy2RpS8S6kwlWZbeFtSOpVZTL9xAXj2ngsB1045M,79678
|
|
3
|
+
tft/cli/commands.py.backup,sha256=z7mkUNEvA71k0LFxe8wcrfVsvRFSZJPMt6j9zpbR1q0,83805
|
|
4
|
+
tft/cli/config.py,sha256=JiVLrgM4REWdljA9DjAuH4fNR1ekE7Crv2oM6vBPt9Q,1254
|
|
5
|
+
tft/cli/tool.py,sha256=nuz57u3yE4fKgdMgNtAFM7PCTcF6PSNFBQbCYDzxBOw,897
|
|
6
|
+
tft/cli/utils.py,sha256=KAk52TRCqHvrIZEKTpJn7HWskeEU4yvNEVlfnkfgMW4,8191
|
|
7
|
+
tft_cli-0.0.24.dist-info/LICENSE,sha256=YpVAQfXkIyzQAdm5LZkI6L5UWqLppa6O8_tgDSdoabQ,574
|
|
8
|
+
tft_cli-0.0.24.dist-info/METADATA,sha256=Q7cjteFX3oSiWp-Vb1ZCv0WfaH1ZEK3pD5nYE9YMhn8,789
|
|
9
|
+
tft_cli-0.0.24.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
|
10
|
+
tft_cli-0.0.24.dist-info/entry_points.txt,sha256=xzdebHkH5Bx-YRf-XPMsIoVpvgfUqqcRQGuo8DFkiao,49
|
|
11
|
+
tft_cli-0.0.24.dist-info/RECORD,,
|
tft_cli-0.0.22.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
tft/cli/__init__.py,sha256=uEJkNJbqC583PBtNI30kxWdeOr3Wj6zJzIYKf0AD72I,92
|
|
2
|
-
tft/cli/commands.py,sha256=mRIeB9JsvRHhiAGJUxXLFMTKuvEt2AGN8AhVujBQcZo,62824
|
|
3
|
-
tft/cli/config.py,sha256=CQrqucLMNlRrjK_y5WY6vLbAYA5TcnHG_kw8CgJ09OA,1165
|
|
4
|
-
tft/cli/tool.py,sha256=wFcVxe1NRGW8stputOZlKMasZHjpysas7f0sgpEzipQ,865
|
|
5
|
-
tft/cli/utils.py,sha256=iWQnjA5rYhwMaz8cP_zmfJ5HihTbaKE3XzZk0N4nfcE,7664
|
|
6
|
-
tft_cli-0.0.22.dist-info/LICENSE,sha256=YpVAQfXkIyzQAdm5LZkI6L5UWqLppa6O8_tgDSdoabQ,574
|
|
7
|
-
tft_cli-0.0.22.dist-info/METADATA,sha256=1FC__NfxUWFgQUr-8R1glWqIKi3kBvsSpZrM4rEBUEM,762
|
|
8
|
-
tft_cli-0.0.22.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
|
9
|
-
tft_cli-0.0.22.dist-info/entry_points.txt,sha256=xzdebHkH5Bx-YRf-XPMsIoVpvgfUqqcRQGuo8DFkiao,49
|
|
10
|
-
tft_cli-0.0.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|