yellowdog-python-examples 8.3.0__tar.gz → 8.3.1__tar.gz
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.
- {yellowdog_python_examples-8.3.0/yellowdog_python_examples.egg-info → yellowdog_python_examples-8.3.1}/PKG-INFO +2 -2
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/requirements.txt +1 -1
- yellowdog_python_examples-8.3.1/yellowdog_cli/__init__.py +1 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/abort.py +11 -11
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/admin.py +2 -2
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/boost.py +3 -3
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/cancel.py +9 -9
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/cloudwizard.py +4 -4
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/compare.py +6 -6
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/create.py +54 -52
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/delete.py +10 -10
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/download.py +15 -15
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/finish.py +9 -9
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/instantiate.py +19 -17
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/list.py +41 -41
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/provision.py +28 -28
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/remove.py +28 -26
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/resize.py +9 -9
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/show.py +25 -25
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/shutdown.py +9 -9
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/submit.py +29 -29
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/terminate.py +8 -8
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/upload.py +11 -11
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/cloudwizard_aws.py +32 -32
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/cloudwizard_azure.py +27 -27
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/cloudwizard_common.py +12 -10
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/cloudwizard_gcp.py +8 -8
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/csv_data.py +7 -7
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/entity_utils.py +20 -20
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/follow_utils.py +5 -5
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/interactive.py +8 -8
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/load_config.py +11 -11
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/load_resources.py +4 -4
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/misc_utils.py +3 -3
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/printing.py +10 -9
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/provision_utils.py +2 -2
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/settings.py +1 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/start_hold_common.py +7 -7
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/submit_utils.py +5 -5
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/upload_utils.py +3 -3
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/variables.py +5 -5
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/wrapper.py +7 -7
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1/yellowdog_python_examples.egg-info}/PKG-INFO +2 -2
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_python_examples.egg-info/requires.txt +1 -1
- yellowdog_python_examples-8.3.0/yellowdog_cli/__init__.py +0 -1
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/LICENSE +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/PYPI_README.md +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/README.md +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/pyproject.toml +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/setup.cfg +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_create_remove.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_demos.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_dryruns.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_entrypoints.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_gui.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_list.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_objects.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/tests/test_variable_processing.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/application.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/follow.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/format_json.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/hold.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/jsonnet2json.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/start.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/__init__.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/args.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/check_imports.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/cloudwizard_aws_types.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/compact_json.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/config_types.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/items.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/property_names.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/rich_console_input_fixed.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/type_check.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/validate_properties.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/utils/ydid_utils.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/version.py +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_python_examples.egg-info/SOURCES.txt +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_python_examples.egg-info/dependency_links.txt +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_python_examples.egg-info/entry_points.txt +0 -0
- {yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_python_examples.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: yellowdog-python-examples
|
|
3
|
-
Version: 8.3.
|
|
3
|
+
Version: 8.3.1
|
|
4
4
|
Summary: Python CLI commands using the YellowDog Python SDK
|
|
5
5
|
Author-email: YellowDog Limited <support@yellowdog.co>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -26,7 +26,7 @@ Requires-Dist: requests
|
|
|
26
26
|
Requires-Dist: rich==13.9.4
|
|
27
27
|
Requires-Dist: tabulate>=0.9.0
|
|
28
28
|
Requires-Dist: toml
|
|
29
|
-
Requires-Dist: yellowdog-sdk>=
|
|
29
|
+
Requires-Dist: yellowdog-sdk>=12.0.0
|
|
30
30
|
Provides-Extra: jsonnet
|
|
31
31
|
Requires-Dist: jsonnet; extra == "jsonnet"
|
|
32
32
|
Provides-Extra: cloudwizard
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "8.3.1"
|
|
@@ -21,7 +21,7 @@ from yellowdog_cli.utils.entity_utils import (
|
|
|
21
21
|
from yellowdog_cli.utils.interactive import confirmed, select
|
|
22
22
|
from yellowdog_cli.utils.printing import (
|
|
23
23
|
print_error,
|
|
24
|
-
|
|
24
|
+
print_info,
|
|
25
25
|
print_warning,
|
|
26
26
|
sorted_objects,
|
|
27
27
|
)
|
|
@@ -36,7 +36,7 @@ def main():
|
|
|
36
36
|
_abort_tasks_by_name_or_id(ARGS_PARSER.task_id_list)
|
|
37
37
|
return
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
print_info(
|
|
40
40
|
"Finding active Work Requirements in "
|
|
41
41
|
f"namespace '{CONFIG_COMMON.namespace}' with tags "
|
|
42
42
|
f"including '{CONFIG_COMMON.name_tag}'"
|
|
@@ -66,7 +66,7 @@ def main():
|
|
|
66
66
|
override_quiet=True,
|
|
67
67
|
)
|
|
68
68
|
else:
|
|
69
|
-
|
|
69
|
+
print_info("No matching Work Requirements found")
|
|
70
70
|
|
|
71
71
|
if len(selected_work_requirement_summaries) == 1:
|
|
72
72
|
abort_tasks_selectively(selected_work_requirement_summaries[0])
|
|
@@ -78,7 +78,7 @@ def abort_tasks_selectively(
|
|
|
78
78
|
"""
|
|
79
79
|
Abort selected Tasks in a Work Requirements
|
|
80
80
|
"""
|
|
81
|
-
|
|
81
|
+
print_info(f"Aborting Tasks in Work Requirement '{wr_summary.name}'")
|
|
82
82
|
|
|
83
83
|
task_search = TaskSearch(
|
|
84
84
|
workRequirementId=wr_summary.id,
|
|
@@ -91,7 +91,7 @@ def abort_tasks_selectively(
|
|
|
91
91
|
CLIENT, sorted_objects(tasks), parent=wr_summary, override_quiet=True
|
|
92
92
|
)
|
|
93
93
|
else:
|
|
94
|
-
|
|
94
|
+
print_info(
|
|
95
95
|
"No currently executing Tasks in this Work Requirement",
|
|
96
96
|
override_quiet=True,
|
|
97
97
|
)
|
|
@@ -101,7 +101,7 @@ def abort_tasks_selectively(
|
|
|
101
101
|
for task in tasks:
|
|
102
102
|
try:
|
|
103
103
|
CLIENT.work_client.cancel_task(task, abort=True)
|
|
104
|
-
|
|
104
|
+
print_info(
|
|
105
105
|
f"Aborted Task '{task.name}' in Task Group"
|
|
106
106
|
f" '{get_task_group_name(CLIENT, wr_summary, task)}' in Work"
|
|
107
107
|
f" Requirement '{wr_summary.name}'"
|
|
@@ -111,9 +111,9 @@ def abort_tasks_selectively(
|
|
|
111
111
|
print_error(f"Unable to abort Task '{task.name}': {e}")
|
|
112
112
|
|
|
113
113
|
if aborted_tasks == 0:
|
|
114
|
-
|
|
114
|
+
print_info("No Tasks Aborted")
|
|
115
115
|
elif aborted_tasks > 1:
|
|
116
|
-
|
|
116
|
+
print_info(f"Aborted {aborted_tasks} Tasks")
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
def _abort_tasks_by_name_or_id(task_id_list: List[str]):
|
|
@@ -131,15 +131,15 @@ def _abort_tasks_by_name_or_id(task_id_list: List[str]):
|
|
|
131
131
|
|
|
132
132
|
try:
|
|
133
133
|
CLIENT.work_client.cancel_task_by_id(task_id, abort=True)
|
|
134
|
-
|
|
134
|
+
print_info(f"Cancelled and aborted Task '{task_id}'")
|
|
135
135
|
aborted_count += 1
|
|
136
136
|
except Exception as e:
|
|
137
137
|
print_error(f"Unable to cancel and abort Task '{task_id}': {e}")
|
|
138
138
|
|
|
139
139
|
if aborted_count > 1:
|
|
140
|
-
|
|
140
|
+
print_info(f"Cancelled and aborted {aborted_count} Tasks")
|
|
141
141
|
elif aborted_count == 0:
|
|
142
|
-
|
|
142
|
+
print_info("No Tasks cancelled and aborted")
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
# Entry point
|
|
@@ -6,7 +6,7 @@ Skeleton CLI for admin commands (YellowDog only)
|
|
|
6
6
|
|
|
7
7
|
import requests
|
|
8
8
|
|
|
9
|
-
from yellowdog_cli.utils.printing import print_error,
|
|
9
|
+
from yellowdog_cli.utils.printing import print_error, print_info
|
|
10
10
|
from yellowdog_cli.utils.wrapper import ARGS_PARSER, CONFIG_COMMON, main_wrapper
|
|
11
11
|
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ def main():
|
|
|
24
24
|
},
|
|
25
25
|
)
|
|
26
26
|
if response.status_code == 200:
|
|
27
|
-
|
|
27
|
+
print_info(f"Refreshed Work Requirement '{wr_id}'")
|
|
28
28
|
else:
|
|
29
29
|
print_error(f"Failed to refresh Work Requirement '{wr_id}'")
|
|
30
30
|
raise Exception(f"{response.text}")
|
|
@@ -5,7 +5,7 @@ A script to boost allowances.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from yellowdog_cli.utils.interactive import confirmed
|
|
8
|
-
from yellowdog_cli.utils.printing import print_error,
|
|
8
|
+
from yellowdog_cli.utils.printing import print_error, print_info, print_warning
|
|
9
9
|
from yellowdog_cli.utils.wrapper import ARGS_PARSER, CLIENT, main_wrapper
|
|
10
10
|
from yellowdog_cli.utils.ydid_utils import YDIDType, get_ydid_type
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ def main():
|
|
|
26
26
|
CLIENT.allowances_client.boost_allowance_by_id(
|
|
27
27
|
allowance, ARGS_PARSER.boost_hours
|
|
28
28
|
)
|
|
29
|
-
|
|
29
|
+
print_info(
|
|
30
30
|
f"Boosted Allowance {allowance} by {ARGS_PARSER.boost_hours} hours"
|
|
31
31
|
)
|
|
32
32
|
count += 1
|
|
@@ -34,7 +34,7 @@ def main():
|
|
|
34
34
|
print_error(f"Unable to boost Allowance {allowance}: {e}")
|
|
35
35
|
|
|
36
36
|
if count > 1:
|
|
37
|
-
|
|
37
|
+
print_info(f"Boosted {count} allowances by {ARGS_PARSER.boost_hours} hours")
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
# Standalone entry point
|
|
@@ -19,7 +19,7 @@ from yellowdog_cli.utils.entity_utils import (
|
|
|
19
19
|
from yellowdog_cli.utils.follow_utils import follow_ids
|
|
20
20
|
from yellowdog_cli.utils.interactive import confirmed, select
|
|
21
21
|
from yellowdog_cli.utils.misc_utils import link_entity
|
|
22
|
-
from yellowdog_cli.utils.printing import print_error,
|
|
22
|
+
from yellowdog_cli.utils.printing import print_error, print_info, print_warning
|
|
23
23
|
from yellowdog_cli.utils.wrapper import ARGS_PARSER, CLIENT, CONFIG_COMMON, main_wrapper
|
|
24
24
|
from yellowdog_cli.utils.ydid_utils import YDIDType, get_ydid_type
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ def main():
|
|
|
30
30
|
_cancel_work_requirements_by_name_or_id(ARGS_PARSER.work_requirement_names)
|
|
31
31
|
return
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
print_info(
|
|
34
34
|
"Cancelling Work Requirements in namespace "
|
|
35
35
|
f"'{CONFIG_COMMON.namespace}' with tags "
|
|
36
36
|
f"including '{CONFIG_COMMON.name_tag}'"
|
|
@@ -73,7 +73,7 @@ def main():
|
|
|
73
73
|
CLIENT.work_client.get_work_requirement_by_id(work_summary.id)
|
|
74
74
|
)
|
|
75
75
|
cancelled_count += 1
|
|
76
|
-
|
|
76
|
+
print_info(
|
|
77
77
|
f"Cancelled {link_entity(CONFIG_COMMON.url, work_requirement)} "
|
|
78
78
|
f"('{work_summary.name}')"
|
|
79
79
|
f"{'' if not ARGS_PARSER.abort else ' and aborted all allocated tasks'}"
|
|
@@ -85,22 +85,22 @@ def main():
|
|
|
85
85
|
)
|
|
86
86
|
|
|
87
87
|
elif work_summary.status == WorkRequirementStatus.CANCELLING:
|
|
88
|
-
|
|
88
|
+
print_info(
|
|
89
89
|
f"Work Requirement '{work_summary.name}' is already cancelling"
|
|
90
90
|
)
|
|
91
91
|
cancelling_count += 1
|
|
92
92
|
work_requirement_ids.append(work_summary.id)
|
|
93
93
|
|
|
94
94
|
if cancelled_count > 1:
|
|
95
|
-
|
|
95
|
+
print_info(f"Cancelled {cancelled_count} Work Requirement(s)")
|
|
96
96
|
elif cancelled_count == 0 and cancelling_count == 0:
|
|
97
|
-
|
|
97
|
+
print_info("No Work Requirements to cancel")
|
|
98
98
|
|
|
99
99
|
if ARGS_PARSER.follow:
|
|
100
100
|
follow_ids(work_requirement_ids)
|
|
101
101
|
|
|
102
102
|
else:
|
|
103
|
-
|
|
103
|
+
print_info("No Work Requirements to cancel")
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
def _cancel_work_requirements_by_name_or_id(names_or_ids: List[str]):
|
|
@@ -148,7 +148,7 @@ def _cancel_work_requirements_by_name_or_id(names_or_ids: List[str]):
|
|
|
148
148
|
|
|
149
149
|
work_requirement_summaries.append(work_requirement_summary)
|
|
150
150
|
if work_requirement_summary.status == WorkRequirementStatus.CANCELLING:
|
|
151
|
-
|
|
151
|
+
print_info(f"Work Requirement '{name_or_id}' is already cancelling")
|
|
152
152
|
else:
|
|
153
153
|
if not confirmed(
|
|
154
154
|
f"Cancel Work Requirement '{name_or_id}'"
|
|
@@ -159,7 +159,7 @@ def _cancel_work_requirements_by_name_or_id(names_or_ids: List[str]):
|
|
|
159
159
|
CLIENT.work_client.cancel_work_requirement_by_id(
|
|
160
160
|
work_requirement_summary.id, ARGS_PARSER.abort
|
|
161
161
|
)
|
|
162
|
-
|
|
162
|
+
print_info(
|
|
163
163
|
f"Cancelled Work Requirement '{name_or_id}'"
|
|
164
164
|
f"{'' if not ARGS_PARSER.abort else ' and aborted all allocated tasks'}"
|
|
165
165
|
)
|
{yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/cloudwizard.py
RENAMED
|
@@ -8,7 +8,7 @@ from yellowdog_cli.utils.check_imports import check_cloudwizard_imports
|
|
|
8
8
|
from yellowdog_cli.utils.cloudwizard_aws import AWSConfig
|
|
9
9
|
from yellowdog_cli.utils.cloudwizard_azure import AzureConfig
|
|
10
10
|
from yellowdog_cli.utils.cloudwizard_gcp import GCPConfig
|
|
11
|
-
from yellowdog_cli.utils.printing import print_error,
|
|
11
|
+
from yellowdog_cli.utils.printing import print_error, print_info, print_warning
|
|
12
12
|
from yellowdog_cli.utils.wrapper import ARGS_PARSER, CLIENT, main_wrapper
|
|
13
13
|
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ def main():
|
|
|
21
21
|
check_cloudwizard_imports()
|
|
22
22
|
|
|
23
23
|
if ARGS_PARSER.cloud_provider.lower() in ["aws", "amazon"]:
|
|
24
|
-
|
|
24
|
+
print_info(f"YellowDog automated cloud provider setup/teardown for 'AWS'")
|
|
25
25
|
cloud_provider_config = AWSConfig(
|
|
26
26
|
client=CLIENT,
|
|
27
27
|
region_name=ARGS_PARSER.region_name,
|
|
@@ -30,7 +30,7 @@ def main():
|
|
|
30
30
|
)
|
|
31
31
|
|
|
32
32
|
elif ARGS_PARSER.cloud_provider.lower() in ["gcp", "gce", "google"]:
|
|
33
|
-
|
|
33
|
+
print_info(f"YellowDog automated cloud provider setup/teardown for 'GCP'")
|
|
34
34
|
if ARGS_PARSER.credentials_file is None:
|
|
35
35
|
print_error(
|
|
36
36
|
"Credentials file ('--credentials-file') must be supplied for GCP"
|
|
@@ -43,7 +43,7 @@ def main():
|
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
elif ARGS_PARSER.cloud_provider.lower() in ["azure", "microsoft"]:
|
|
46
|
-
|
|
46
|
+
print_info(f"YellowDog automated cloud provider setup/teardown for 'Azure'")
|
|
47
47
|
cloud_provider_config = AzureConfig(
|
|
48
48
|
client=CLIENT,
|
|
49
49
|
instance_type=ARGS_PARSER.instance_type,
|
{yellowdog_python_examples-8.3.0 → yellowdog_python_examples-8.3.1}/yellowdog_cli/compare.py
RENAMED
|
@@ -27,7 +27,7 @@ from yellowdog_client.model import (
|
|
|
27
27
|
from yellowdog_cli.utils.entity_utils import get_worker_pool_by_id
|
|
28
28
|
from yellowdog_cli.utils.printing import (
|
|
29
29
|
indent,
|
|
30
|
-
|
|
30
|
+
print_info,
|
|
31
31
|
print_table_core,
|
|
32
32
|
print_warning,
|
|
33
33
|
)
|
|
@@ -134,7 +134,7 @@ class MatchReport:
|
|
|
134
134
|
match_str = "MAYBE MATCHING"
|
|
135
135
|
else:
|
|
136
136
|
match_str = "NON-MATCHING"
|
|
137
|
-
|
|
137
|
+
print_info(
|
|
138
138
|
f"Detailed comparison report for {match_str} ({self.worker_pool_status}) Worker Pool "
|
|
139
139
|
f"'{self.worker_pool_name}' ({self.worker_pool_id})",
|
|
140
140
|
override_quiet=True,
|
|
@@ -634,7 +634,7 @@ def _compare_task_group(task_group: TaskGroup, worker_pools: WorkerPools):
|
|
|
634
634
|
"""
|
|
635
635
|
Compare a Task Group.
|
|
636
636
|
"""
|
|
637
|
-
|
|
637
|
+
print_info(
|
|
638
638
|
f"Comparing Task Group '{task_group.name}' ({task_group.id})",
|
|
639
639
|
override_quiet=True,
|
|
640
640
|
)
|
|
@@ -645,7 +645,7 @@ def _compare_task_group(task_group: TaskGroup, worker_pools: WorkerPools):
|
|
|
645
645
|
|
|
646
646
|
if len(match_reports) > 1:
|
|
647
647
|
# Summary report
|
|
648
|
-
|
|
648
|
+
print_info("Summary of Worker Pool matches:", override_quiet=True)
|
|
649
649
|
header_row = [
|
|
650
650
|
"",
|
|
651
651
|
"Worker Pool Name",
|
|
@@ -675,7 +675,7 @@ def _compare_task_group(task_group: TaskGroup, worker_pools: WorkerPools):
|
|
|
675
675
|
for match_report in match_reports:
|
|
676
676
|
match_report.print_detailed_report()
|
|
677
677
|
|
|
678
|
-
|
|
678
|
+
print_info("Task Group comparison complete")
|
|
679
679
|
|
|
680
680
|
|
|
681
681
|
@main_wrapper
|
|
@@ -700,7 +700,7 @@ def main():
|
|
|
700
700
|
# Work requirement
|
|
701
701
|
elif get_ydid_type(ARGS_PARSER.wr_or_tg_id) == YDIDType.WORK_REQUIREMENT:
|
|
702
702
|
work_requirement = _get_work_requirement_by_id(ARGS_PARSER.wr_or_tg_id)
|
|
703
|
-
|
|
703
|
+
print_info(
|
|
704
704
|
f"Comparing all Task Groups in Work Requirement '{work_requirement.name}' "
|
|
705
705
|
f"({work_requirement.id})",
|
|
706
706
|
override_quiet=True,
|