yellowdog-python-examples 7.18.3__tar.gz → 7.18.4__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-7.18.3/yellowdog_python_examples.egg-info → yellowdog_python_examples-7.18.4}/PKG-INFO +1 -1
- yellowdog_python_examples-7.18.4/yellowdog_cli/__init__.py +1 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/list.py +14 -4
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/show.py +9 -2
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/args.py +23 -13
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/entity_utils.py +27 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/load_config.py +4 -1
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/printing.py +14 -5
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/settings.py +3 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4/yellowdog_python_examples.egg-info}/PKG-INFO +1 -1
- yellowdog_python_examples-7.18.3/yellowdog_cli/__init__.py +0 -1
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/LICENSE +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/PYPI_README.md +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/README.md +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/pyproject.toml +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/requirements.txt +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/setup.cfg +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_create_remove.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_demos.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_dryruns.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_entrypoints.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_gui.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_list.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_objects.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_variable_processing.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/abort.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/admin.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/boost.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/cancel.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/cloudwizard.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/compare.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/create.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/delete.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/download.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/follow.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/format_json.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/hold.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/instantiate.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/jsonnet2json.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/provision.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/remove.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/resize.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/shutdown.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/start.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/submit.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/terminate.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/upload.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/__init__.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/check_imports.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/cloudwizard_aws.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/cloudwizard_aws_types.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/cloudwizard_azure.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/cloudwizard_common.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/cloudwizard_gcp.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/compact_json.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/config_types.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/csv_data.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/follow_utils.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/interactive.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/items.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/load_resources.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/misc_utils.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/property_names.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/provision_utils.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/rich_console_input_fixed.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/start_hold_common.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/submit_utils.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/type_check.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/upload_utils.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/validate_properties.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/variables.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/wrapper.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/ydid_utils.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/version.py +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_python_examples.egg-info/SOURCES.txt +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_python_examples.egg-info/dependency_links.txt +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_python_examples.egg-info/entry_points.txt +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_python_examples.egg-info/requires.txt +0 -0
- {yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/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: 7.18.
|
|
3
|
+
Version: 7.18.4
|
|
4
4
|
Summary: Python CLI commands using the YellowDog Python SDK
|
|
5
5
|
Author-email: YellowDog Limited <support@yellowdog.co>
|
|
6
6
|
Project-URL: Homepage, https://github.com/yellowdog/python-examples
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "7.18.4"
|
|
@@ -59,6 +59,7 @@ from yellowdog_cli.utils.entity_utils import (
|
|
|
59
59
|
get_user_groups,
|
|
60
60
|
list_matching_object_paths,
|
|
61
61
|
substitute_ids_for_names_in_crt,
|
|
62
|
+
substitute_image_family_id_for_name_in_cst,
|
|
62
63
|
)
|
|
63
64
|
from yellowdog_cli.utils.interactive import confirmed, select
|
|
64
65
|
from yellowdog_cli.utils.misc_utils import unpack_namespace_in_prefix
|
|
@@ -108,7 +109,8 @@ def main():
|
|
|
108
109
|
if ARGS_PARSER.output_file and ARGS_PARSER.details:
|
|
109
110
|
if exists(ARGS_PARSER.output_file):
|
|
110
111
|
if not confirmed(
|
|
111
|
-
f"Overwrite file '{ARGS_PARSER.output_file}' with
|
|
112
|
+
f"Overwrite file '{ARGS_PARSER.output_file}' with new "
|
|
113
|
+
"resource details?"
|
|
112
114
|
):
|
|
113
115
|
return
|
|
114
116
|
|
|
@@ -129,7 +131,7 @@ def main():
|
|
|
129
131
|
elif ARGS_PARSER.image_families:
|
|
130
132
|
list_image_families()
|
|
131
133
|
elif ARGS_PARSER.namespace_storage_configurations:
|
|
132
|
-
|
|
134
|
+
list_namespace_storage_configurations()
|
|
133
135
|
elif ARGS_PARSER.allowances:
|
|
134
136
|
list_allowances()
|
|
135
137
|
elif ARGS_PARSER.attribute_definitions:
|
|
@@ -627,7 +629,10 @@ def list_compute_source_templates():
|
|
|
627
629
|
cs_templates = select(CLIENT, sorted_objects(cs_templates))
|
|
628
630
|
cs_template_details = [
|
|
629
631
|
(
|
|
630
|
-
|
|
632
|
+
substitute_image_family_id_for_name_in_cst(
|
|
633
|
+
CLIENT,
|
|
634
|
+
CLIENT.compute_client.get_compute_source_template(cs_template.id),
|
|
635
|
+
),
|
|
631
636
|
RN_SOURCE_TEMPLATE,
|
|
632
637
|
)
|
|
633
638
|
for cs_template in cs_templates
|
|
@@ -716,7 +721,7 @@ def list_image_families():
|
|
|
716
721
|
)
|
|
717
722
|
|
|
718
723
|
|
|
719
|
-
def
|
|
724
|
+
def list_namespace_storage_configurations():
|
|
720
725
|
"""
|
|
721
726
|
List Storage Namespaces. For now, prints a table directly rather than
|
|
722
727
|
calling the printing module, due to it being a bit fiddly.
|
|
@@ -972,6 +977,11 @@ def list_roles():
|
|
|
972
977
|
print_log("Obtaining permissions for each role ...")
|
|
973
978
|
roles: List[Role] = [CLIENT.account_client.get_role(x.id) for x in role_summaries]
|
|
974
979
|
|
|
980
|
+
# Sort permissions alphabetically (contorting the type)
|
|
981
|
+
for role in roles:
|
|
982
|
+
role.permissions = list(role.permissions)
|
|
983
|
+
role.permissions.sort(key=lambda permission: permission.name)
|
|
984
|
+
|
|
975
985
|
if not ARGS_PARSER.details:
|
|
976
986
|
print_numbered_object_list(CLIENT, roles, object_type_name="Role")
|
|
977
987
|
return
|
|
@@ -7,7 +7,10 @@ Command to show the JSON details of YellowDog entities via their IDs.
|
|
|
7
7
|
from yellowdog_client.model import ConfiguredWorkerPool
|
|
8
8
|
|
|
9
9
|
from yellowdog_cli.list import get_keyring
|
|
10
|
-
from yellowdog_cli.utils.entity_utils import
|
|
10
|
+
from yellowdog_cli.utils.entity_utils import (
|
|
11
|
+
substitute_ids_for_names_in_crt,
|
|
12
|
+
substitute_image_family_id_for_name_in_cst,
|
|
13
|
+
)
|
|
11
14
|
from yellowdog_cli.utils.printing import print_error, print_log, print_yd_object
|
|
12
15
|
from yellowdog_cli.utils.settings import (
|
|
13
16
|
RESOURCE_PROPERTY_NAME,
|
|
@@ -60,8 +63,12 @@ def show_details(ydid: str, initial_indent: int = 0, with_final_comma: bool = Fa
|
|
|
60
63
|
ydid_type = get_ydid_type(ydid)
|
|
61
64
|
if ydid_type == YDIDType.COMPUTE_SOURCE_TEMPLATE:
|
|
62
65
|
print_log(f"Showing details of Compute Source Template ID '{ydid}'")
|
|
66
|
+
if ARGS_PARSER.substitute_ids:
|
|
67
|
+
print_log("Substituting Image Family ID with name")
|
|
63
68
|
print_yd_object(
|
|
64
|
-
|
|
69
|
+
substitute_image_family_id_for_name_in_cst(
|
|
70
|
+
CLIENT, CLIENT.compute_client.get_compute_source_template(ydid)
|
|
71
|
+
),
|
|
65
72
|
initial_indent=initial_indent,
|
|
66
73
|
with_final_comma=with_final_comma,
|
|
67
74
|
add_fields=({RESOURCE_PROPERTY_NAME: RN_SOURCE_TEMPLATE}),
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/args.py
RENAMED
|
@@ -7,7 +7,10 @@ import sys
|
|
|
7
7
|
from typing import List, Optional
|
|
8
8
|
|
|
9
9
|
from yellowdog_cli.__init__ import __version__
|
|
10
|
-
from yellowdog_cli.utils.settings import
|
|
10
|
+
from yellowdog_cli.utils.settings import (
|
|
11
|
+
DEFAULT_URL,
|
|
12
|
+
MAX_PARALLEL_TASK_BATCH_UPLOAD_THREADS,
|
|
13
|
+
)
|
|
11
14
|
from yellowdog_cli.version import DOCS_URL
|
|
12
15
|
|
|
13
16
|
|
|
@@ -66,24 +69,23 @@ class CLIParser:
|
|
|
66
69
|
"-k",
|
|
67
70
|
type=str,
|
|
68
71
|
required=False,
|
|
69
|
-
help="the
|
|
70
|
-
metavar="<app-key>",
|
|
72
|
+
help="the application key ID",
|
|
73
|
+
metavar="<app-key-id>",
|
|
71
74
|
)
|
|
72
75
|
parser.add_argument(
|
|
73
76
|
"--secret",
|
|
74
77
|
"-s",
|
|
75
78
|
required=False,
|
|
76
79
|
type=str,
|
|
77
|
-
help="the
|
|
78
|
-
metavar="<app-secret>",
|
|
80
|
+
help="the application key secret",
|
|
81
|
+
metavar="<app-key-secret>",
|
|
79
82
|
)
|
|
80
|
-
|
|
81
83
|
parser.add_argument(
|
|
82
84
|
"--url",
|
|
83
85
|
"-u",
|
|
84
86
|
type=str,
|
|
85
87
|
required=False,
|
|
86
|
-
help="the
|
|
88
|
+
help=f"the YellowDog Platform API URL (defaults to '{DEFAULT_URL}')",
|
|
87
89
|
metavar="<url>",
|
|
88
90
|
)
|
|
89
91
|
parser.add_argument(
|
|
@@ -401,6 +403,7 @@ class CLIParser:
|
|
|
401
403
|
"boost",
|
|
402
404
|
"hold",
|
|
403
405
|
"start",
|
|
406
|
+
"list",
|
|
404
407
|
]
|
|
405
408
|
):
|
|
406
409
|
parser.add_argument(
|
|
@@ -408,7 +411,10 @@ class CLIParser:
|
|
|
408
411
|
"-y",
|
|
409
412
|
action="store_true",
|
|
410
413
|
required=False,
|
|
411
|
-
help=
|
|
414
|
+
help=(
|
|
415
|
+
"perform modifying/destructive actions without "
|
|
416
|
+
"requiring user confirmation"
|
|
417
|
+
),
|
|
412
418
|
)
|
|
413
419
|
|
|
414
420
|
if any(module in sys.argv[0] for module in ["delete", "download"]):
|
|
@@ -671,7 +677,7 @@ class CLIParser:
|
|
|
671
677
|
"--auto-select-all",
|
|
672
678
|
action="store_true",
|
|
673
679
|
required=False,
|
|
674
|
-
help="
|
|
680
|
+
help="automatically select all listed objects (implies '--details')",
|
|
675
681
|
)
|
|
676
682
|
|
|
677
683
|
if any(module in sys.argv[0] for module in ["upload"]):
|
|
@@ -1171,8 +1177,10 @@ class CLIParser:
|
|
|
1171
1177
|
action="store_true",
|
|
1172
1178
|
required=False,
|
|
1173
1179
|
help=(
|
|
1174
|
-
"
|
|
1175
|
-
"
|
|
1180
|
+
"substitute compute source template IDs and image family IDs "
|
|
1181
|
+
"for names in detailed compute requirement templates, "
|
|
1182
|
+
"and image family IDs in compute source templates "
|
|
1183
|
+
"(implies '--details')"
|
|
1176
1184
|
),
|
|
1177
1185
|
)
|
|
1178
1186
|
parser.add_argument(
|
|
@@ -1180,8 +1188,10 @@ class CLIParser:
|
|
|
1180
1188
|
action="store_true",
|
|
1181
1189
|
required=False,
|
|
1182
1190
|
help=(
|
|
1183
|
-
"
|
|
1184
|
-
"
|
|
1191
|
+
"omit the YellowDog IDs of objects from their JSON "
|
|
1192
|
+
"representations, as well as other properties not "
|
|
1193
|
+
"required when capturing JSON for use with yd-create and yd-remove "
|
|
1194
|
+
"(implies '--details')"
|
|
1185
1195
|
),
|
|
1186
1196
|
)
|
|
1187
1197
|
|
|
@@ -528,6 +528,33 @@ def substitute_ids_for_names_in_crt(
|
|
|
528
528
|
return crt
|
|
529
529
|
|
|
530
530
|
|
|
531
|
+
def substitute_image_family_id_for_name_in_cst(
|
|
532
|
+
client: PlatformClient, cst: ComputeSourceTemplate
|
|
533
|
+
) -> ComputeSourceTemplate:
|
|
534
|
+
"""
|
|
535
|
+
Substitute Image Family IDs for namespace/name,
|
|
536
|
+
if option is selected.
|
|
537
|
+
"""
|
|
538
|
+
|
|
539
|
+
if not ARGS_PARSER.substitute_ids:
|
|
540
|
+
return cst
|
|
541
|
+
|
|
542
|
+
try:
|
|
543
|
+
cst.source.imageId = _get_image_family_name_from_id(client, cst.source.imageId)
|
|
544
|
+
return cst
|
|
545
|
+
except:
|
|
546
|
+
pass
|
|
547
|
+
|
|
548
|
+
try:
|
|
549
|
+
# Google uses a different property name
|
|
550
|
+
cst.source.image = _get_image_family_name_from_id(client, cst.source.image)
|
|
551
|
+
return cst
|
|
552
|
+
except:
|
|
553
|
+
pass
|
|
554
|
+
|
|
555
|
+
return cst
|
|
556
|
+
|
|
557
|
+
|
|
531
558
|
@lru_cache
|
|
532
559
|
def _get_source_template_name_from_id(
|
|
533
560
|
client: PlatformClient, cst_id: Optional[str]
|
|
@@ -118,7 +118,10 @@ def load_config_common() -> ConfigCommon:
|
|
|
118
118
|
]:
|
|
119
119
|
if args_parser_value is not None:
|
|
120
120
|
common_section[key_name] = args_parser_value
|
|
121
|
-
print_log(
|
|
121
|
+
print_log(
|
|
122
|
+
f"Using '{key_name}' provided on command line "
|
|
123
|
+
"(or automatically set)"
|
|
124
|
+
)
|
|
122
125
|
elif os.environ.get(env_var_name, None) is not None:
|
|
123
126
|
common_section[key_name] = os.environ[env_var_name]
|
|
124
127
|
print_log(f"Using '{key_name}' provided via the environment")
|
|
@@ -73,7 +73,10 @@ from yellowdog_cli.utils.settings import (
|
|
|
73
73
|
NAMESPACE_OBJECT_STORE_PREFIX_SEPARATOR,
|
|
74
74
|
PROP_CREATED_TIME,
|
|
75
75
|
PROP_ID,
|
|
76
|
+
PROP_INSTANCE_PRICING,
|
|
76
77
|
PROP_RESOURCE,
|
|
78
|
+
PROP_SUPPORTING_RESOURCE_CREATED,
|
|
79
|
+
PROP_TRAITS,
|
|
77
80
|
WARNING_STYLE,
|
|
78
81
|
)
|
|
79
82
|
from yellowdog_cli.utils.ydid_utils import YDIDType
|
|
@@ -1067,16 +1070,22 @@ def print_yd_object(
|
|
|
1067
1070
|
|
|
1068
1071
|
def remove_unused_props(d):
|
|
1069
1072
|
"""
|
|
1070
|
-
Helper function to remove the 'id' and
|
|
1071
|
-
recursively.
|
|
1073
|
+
Helper function to remove the 'id' and other properties
|
|
1074
|
+
not required for 'yd-create' and 'yd-remove', recursively.
|
|
1072
1075
|
"""
|
|
1073
1076
|
if isinstance(d, dict):
|
|
1074
|
-
# Create a new dictionary omitting
|
|
1075
|
-
# keys
|
|
1077
|
+
# Create a new dictionary omitting redundant properties
|
|
1076
1078
|
return {
|
|
1077
1079
|
k: remove_unused_props(v)
|
|
1078
1080
|
for k, v in d.items()
|
|
1079
|
-
if k
|
|
1081
|
+
if k
|
|
1082
|
+
not in [
|
|
1083
|
+
PROP_ID,
|
|
1084
|
+
PROP_CREATED_TIME,
|
|
1085
|
+
PROP_INSTANCE_PRICING,
|
|
1086
|
+
PROP_SUPPORTING_RESOURCE_CREATED,
|
|
1087
|
+
PROP_TRAITS,
|
|
1088
|
+
]
|
|
1080
1089
|
}
|
|
1081
1090
|
elif isinstance(d, list):
|
|
1082
1091
|
# Recursively process each item in the list
|
|
@@ -146,6 +146,7 @@ PROP_ID = "id"
|
|
|
146
146
|
PROP_IMAGE = "image"
|
|
147
147
|
PROP_IMAGES_ID = "imagesId"
|
|
148
148
|
PROP_IMAGE_ID = "imageId"
|
|
149
|
+
PROP_INSTANCE_PRICING = "instancePricing"
|
|
149
150
|
PROP_KEYRING = "keyring"
|
|
150
151
|
PROP_KEYRING_NAME = "keyringName"
|
|
151
152
|
PROP_NAME = "name"
|
|
@@ -159,6 +160,8 @@ PROP_ROLES = "roles"
|
|
|
159
160
|
PROP_SOURCE = "source"
|
|
160
161
|
PROP_SOURCES = "sources"
|
|
161
162
|
PROP_SOURCE_CREATED_FROM = "sourceCreatedFromId"
|
|
163
|
+
PROP_SUPPORTING_RESOURCE_CREATED = "supportingResourceCreated"
|
|
162
164
|
PROP_TITLE = "title"
|
|
165
|
+
PROP_TRAITS = "traits"
|
|
163
166
|
PROP_TYPE = "type"
|
|
164
167
|
PROP_UNITS = "units"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: yellowdog-python-examples
|
|
3
|
-
Version: 7.18.
|
|
3
|
+
Version: 7.18.4
|
|
4
4
|
Summary: Python CLI commands using the YellowDog Python SDK
|
|
5
5
|
Author-email: YellowDog Limited <support@yellowdog.co>
|
|
6
6
|
Project-URL: Homepage, https://github.com/yellowdog/python-examples
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "7.18.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_create_remove.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/tests/test_entrypoints.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/abort.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/admin.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/boost.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/cancel.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/cloudwizard.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/compare.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/create.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/delete.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/download.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/follow.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/format_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/instantiate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/jsonnet2json.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/provision.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/remove.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/resize.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/shutdown.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/start.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/submit.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/terminate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/upload.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/items.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/utils/wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.18.3 → yellowdog_python_examples-7.18.4}/yellowdog_cli/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|