nextmv 1.0.0.dev3__py3-none-any.whl → 1.0.0.dev4__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.
- nextmv/__about__.py +1 -1
- nextmv/cli/CONTRIBUTING.md +81 -29
- nextmv/cli/cloud/acceptance/create.py +20 -22
- nextmv/cli/cloud/acceptance/delete.py +7 -8
- nextmv/cli/cloud/acceptance/get.py +9 -10
- nextmv/cli/cloud/acceptance/list.py +3 -3
- nextmv/cli/cloud/acceptance/update.py +6 -6
- nextmv/cli/cloud/account/__init__.py +3 -3
- nextmv/cli/cloud/account/create.py +11 -11
- nextmv/cli/cloud/account/delete.py +6 -7
- nextmv/cli/cloud/account/get.py +3 -3
- nextmv/cli/cloud/account/update.py +5 -5
- nextmv/cli/cloud/app/create.py +25 -26
- nextmv/cli/cloud/app/delete.py +5 -6
- nextmv/cli/cloud/app/exists.py +2 -2
- nextmv/cli/cloud/app/get.py +2 -2
- nextmv/cli/cloud/app/list.py +3 -3
- nextmv/cli/cloud/app/push.py +269 -45
- nextmv/cli/cloud/app/update.py +12 -12
- nextmv/cli/cloud/batch/create.py +26 -28
- nextmv/cli/cloud/batch/delete.py +5 -6
- nextmv/cli/cloud/batch/get.py +8 -8
- nextmv/cli/cloud/batch/list.py +3 -3
- nextmv/cli/cloud/batch/metadata.py +4 -4
- nextmv/cli/cloud/batch/update.py +6 -6
- nextmv/cli/cloud/data/__init__.py +1 -1
- nextmv/cli/cloud/data/upload.py +15 -15
- nextmv/cli/cloud/ensemble/__init__.py +2 -0
- nextmv/cli/cloud/ensemble/create.py +21 -22
- nextmv/cli/cloud/ensemble/delete.py +5 -6
- nextmv/cli/cloud/ensemble/get.py +4 -4
- nextmv/cli/cloud/ensemble/list.py +63 -0
- nextmv/cli/cloud/ensemble/update.py +9 -9
- nextmv/cli/cloud/input_set/create.py +20 -22
- nextmv/cli/cloud/input_set/get.py +3 -3
- nextmv/cli/cloud/input_set/list.py +3 -3
- nextmv/cli/cloud/input_set/update.py +24 -24
- nextmv/cli/cloud/instance/create.py +14 -15
- nextmv/cli/cloud/instance/delete.py +5 -6
- nextmv/cli/cloud/instance/exists.py +2 -2
- nextmv/cli/cloud/instance/get.py +2 -2
- nextmv/cli/cloud/instance/list.py +3 -3
- nextmv/cli/cloud/instance/update.py +14 -14
- nextmv/cli/cloud/managed_input/create.py +14 -16
- nextmv/cli/cloud/managed_input/delete.py +6 -7
- nextmv/cli/cloud/managed_input/get.py +3 -3
- nextmv/cli/cloud/managed_input/list.py +3 -3
- nextmv/cli/cloud/managed_input/update.py +9 -9
- nextmv/cli/cloud/run/cancel.py +2 -2
- nextmv/cli/cloud/run/create.py +32 -33
- nextmv/cli/cloud/run/get.py +8 -8
- nextmv/cli/cloud/run/input.py +4 -4
- nextmv/cli/cloud/run/list.py +6 -6
- nextmv/cli/cloud/run/logs.py +9 -10
- nextmv/cli/cloud/run/metadata.py +4 -4
- nextmv/cli/cloud/run/track.py +32 -33
- nextmv/cli/cloud/scenario/create.py +21 -21
- nextmv/cli/cloud/scenario/delete.py +5 -6
- nextmv/cli/cloud/scenario/get.py +8 -8
- nextmv/cli/cloud/scenario/list.py +3 -3
- nextmv/cli/cloud/scenario/metadata.py +4 -4
- nextmv/cli/cloud/scenario/update.py +6 -6
- nextmv/cli/cloud/secrets/create.py +17 -17
- nextmv/cli/cloud/secrets/delete.py +5 -6
- nextmv/cli/cloud/secrets/get.py +4 -4
- nextmv/cli/cloud/secrets/list.py +3 -3
- nextmv/cli/cloud/secrets/update.py +17 -20
- nextmv/cli/cloud/shadow/create.py +31 -31
- nextmv/cli/cloud/shadow/delete.py +5 -6
- nextmv/cli/cloud/shadow/get.py +2 -2
- nextmv/cli/cloud/shadow/list.py +3 -3
- nextmv/cli/cloud/shadow/metadata.py +4 -4
- nextmv/cli/cloud/shadow/start.py +3 -3
- nextmv/cli/cloud/shadow/stop.py +4 -6
- nextmv/cli/cloud/shadow/update.py +6 -6
- nextmv/cli/cloud/switchback/create.py +19 -15
- nextmv/cli/cloud/switchback/delete.py +5 -6
- nextmv/cli/cloud/switchback/get.py +3 -3
- nextmv/cli/cloud/switchback/list.py +3 -3
- nextmv/cli/cloud/switchback/metadata.py +6 -6
- nextmv/cli/cloud/switchback/start.py +4 -4
- nextmv/cli/cloud/switchback/stop.py +4 -6
- nextmv/cli/cloud/switchback/update.py +6 -6
- nextmv/cli/cloud/upload/create.py +2 -2
- nextmv/cli/cloud/version/create.py +9 -10
- nextmv/cli/cloud/version/delete.py +5 -6
- nextmv/cli/cloud/version/exists.py +2 -2
- nextmv/cli/cloud/version/get.py +2 -2
- nextmv/cli/cloud/version/list.py +3 -3
- nextmv/cli/cloud/version/update.py +8 -8
- nextmv/cli/community/clone.py +12 -10
- nextmv/cli/community/list.py +9 -9
- nextmv/cli/configuration/config.py +43 -10
- nextmv/cli/configuration/create.py +3 -3
- nextmv/cli/configuration/delete.py +7 -7
- nextmv/cli/configuration/list.py +3 -3
- nextmv/cli/confirm.py +32 -0
- nextmv/cli/main.py +27 -36
- nextmv/cli/message.py +2 -2
- nextmv/cli/version.py +1 -1
- nextmv/cloud/application/__init__.py +190 -54
- nextmv/cloud/application/_batch_scenario.py +2 -2
- nextmv/cloud/application/_instance.py +2 -2
- nextmv/cloud/application/_managed_input.py +1 -1
- nextmv/cloud/application/_shadow.py +1 -1
- nextmv/cloud/application/_switchback.py +11 -3
- nextmv/cloud/application/_version.py +3 -2
- nextmv/cloud/shadow.py +43 -4
- nextmv/cloud/switchback.py +46 -9
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/METADATA +1 -1
- nextmv-1.0.0.dev4.dist-info/RECORD +183 -0
- nextmv-1.0.0.dev3.dist-info/RECORD +0 -181
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/WHEEL +0 -0
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/entry_points.txt +0 -0
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/licenses/LICENSE +0 -0
|
@@ -58,27 +58,27 @@ def update(
|
|
|
58
58
|
[bold][underline]Examples[/underline][/bold]
|
|
59
59
|
|
|
60
60
|
- Update the name of an ensemble definition.
|
|
61
|
-
$ [
|
|
62
|
-
--ensemble-definition-id prod-ensemble --name "Updated Production Ensemble"[/
|
|
61
|
+
$ [dim]nextmv cloud ensemble update --app-id hare-app \\
|
|
62
|
+
--ensemble-definition-id prod-ensemble --name "Updated Production Ensemble"[/dim]
|
|
63
63
|
|
|
64
64
|
- Update the description of an ensemble definition.
|
|
65
|
-
$ [
|
|
65
|
+
$ [dim]nextmv cloud ensemble update --app-id hare-app \\
|
|
66
66
|
--ensemble-definition-id prod-ensemble \\
|
|
67
|
-
--description "Updated ensemble for production workloads"[/
|
|
67
|
+
--description "Updated ensemble for production workloads"[/dim]
|
|
68
68
|
|
|
69
69
|
- Update both name and description.
|
|
70
|
-
$ [
|
|
70
|
+
$ [dim]nextmv cloud ensemble update --app-id hare-app \\
|
|
71
71
|
--ensemble-definition-id prod-ensemble --name "Production Ensemble v2" \\
|
|
72
|
-
--description "Enhanced ensemble configuration for production"[/
|
|
72
|
+
--description "Enhanced ensemble configuration for production"[/dim]
|
|
73
73
|
|
|
74
74
|
- Update and save the result to a file.
|
|
75
|
-
$ [
|
|
75
|
+
$ [dim]nextmv cloud ensemble update --app-id hare-app \\
|
|
76
76
|
--ensemble-definition-id prod-ensemble --name "New Name" \\
|
|
77
|
-
--description "New Description" --output updated.json[/
|
|
77
|
+
--description "New Description" --output updated.json[/dim]
|
|
78
78
|
"""
|
|
79
79
|
|
|
80
80
|
if name is None and description is None:
|
|
81
|
-
error("Provide at least one option to update:
|
|
81
|
+
error("Provide at least one option to update: --name or --description.")
|
|
82
82
|
|
|
83
83
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
84
84
|
|
|
@@ -73,7 +73,7 @@ def create(
|
|
|
73
73
|
"--start-time",
|
|
74
74
|
formats=["%Y-%m-%dT%H:%M:%S%z"],
|
|
75
75
|
help="Start time for filtering runs in [magenta]RFC 3339[/magenta] format. "
|
|
76
|
-
"
|
|
76
|
+
"Object format: [dim]'2024-01-01T00:00:00Z'[/dim]",
|
|
77
77
|
metavar="START_TIME",
|
|
78
78
|
),
|
|
79
79
|
] = None,
|
|
@@ -83,7 +83,7 @@ def create(
|
|
|
83
83
|
"--end-time",
|
|
84
84
|
formats=["%Y-%m-%dT%H:%M:%S%z"],
|
|
85
85
|
help="End time for filtering runs in [magenta]RFC 3339[/magenta] format. "
|
|
86
|
-
"
|
|
86
|
+
"Object format: [dim]'2024-01-01T00:00:00Z'[/dim]",
|
|
87
87
|
metavar="END_TIME",
|
|
88
88
|
),
|
|
89
89
|
] = None,
|
|
@@ -96,13 +96,13 @@ def create(
|
|
|
96
96
|
metavar="MAXIMUM_RUNS",
|
|
97
97
|
),
|
|
98
98
|
] = 20,
|
|
99
|
-
|
|
99
|
+
managed_inputs: Annotated[
|
|
100
100
|
str | None,
|
|
101
101
|
typer.Option(
|
|
102
|
-
"--inputs",
|
|
103
|
-
help="
|
|
104
|
-
"format: [
|
|
105
|
-
metavar="
|
|
102
|
+
"--managed-inputs",
|
|
103
|
+
help="Managed inputs for the input set. Data should be valid [magenta]json[/magenta]. Object "
|
|
104
|
+
"format: [dim][{'id': 'id', 'name': 'name', 'description': 'description'}][/dim].",
|
|
105
|
+
metavar="MANAGED_INPUTS",
|
|
106
106
|
),
|
|
107
107
|
] = None,
|
|
108
108
|
profile: ProfileOption = None,
|
|
@@ -113,32 +113,30 @@ def create(
|
|
|
113
113
|
An input set is a collection of inputs that can be reused across multiple
|
|
114
114
|
experiments.
|
|
115
115
|
|
|
116
|
-
1.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
3. [code]--instance-id[/code] with [code]--start-time[/code] and [code]--end-time[/code]:
|
|
116
|
+
1. --run-ids: Create from a list of existing run IDs.
|
|
117
|
+
2. --managed-inputs: Create from existing managed inputs in the application.
|
|
118
|
+
3. --instance-id with --start-time and --end-time:
|
|
121
119
|
Create from instance runs matching the time range criteria.
|
|
122
120
|
|
|
123
121
|
[bold][underline]Examples[/underline][/bold]
|
|
124
122
|
|
|
125
123
|
- Create an input set for application [magenta]hare-app[/magenta] from runs.
|
|
126
124
|
A random input set ID will be generated if one is not provided.
|
|
127
|
-
$ [
|
|
128
|
-
--name "Hare Input Set" --run-ids run-1 --run-ids run-2 --run-ids run-3"[/
|
|
125
|
+
$ [dim]nextmv cloud input-set create --app-id hare-app \\
|
|
126
|
+
--name "Hare Input Set" --run-ids run-1 --run-ids run-2 --run-ids run-3"[/dim]
|
|
129
127
|
|
|
130
128
|
- Create an input set with a specific ID.
|
|
131
|
-
$ [
|
|
132
|
-
--name "Hare Input Set" --run-ids run-1 --run-ids run-2 --run-ids run-3"[/
|
|
129
|
+
$ [dim]nextmv cloud input-set create --app-id hare-app --input-set-id hare-input-set \\
|
|
130
|
+
--name "Hare Input Set" --run-ids run-1 --run-ids run-2 --run-ids run-3"[/dim]
|
|
133
131
|
|
|
134
132
|
- Create an input set using existing managed inputs.
|
|
135
|
-
$ [
|
|
136
|
-
--inputs '[{"id": "hare-input-1", "name": "hare input", "description": "hare description"}]'[/
|
|
133
|
+
$ [dim]nextmv cloud input-set create --app-id hare-app --name "Hare Input Set" \\
|
|
134
|
+
--managed-inputs '[{"id": "hare-input-1", "name": "hare input", "description": "hare description"}]'[/dim]
|
|
137
135
|
|
|
138
136
|
- Create an input set from runs using a specific instance and time range.
|
|
139
|
-
$ [
|
|
137
|
+
$ [dim]nextmv cloud input-set create --app-id hare-app --name "Hare Input Set" \\
|
|
140
138
|
--instance-id hare-instance --start-time "2024-01-01T00:00:00Z" \\
|
|
141
|
-
--end-time "2024-01-31T23:59:59Z"[/
|
|
139
|
+
--end-time "2024-01-31T23:59:59Z"[/dim]
|
|
142
140
|
"""
|
|
143
141
|
|
|
144
142
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -149,8 +147,8 @@ def create(
|
|
|
149
147
|
input_set_id = safe_id("input-set")
|
|
150
148
|
|
|
151
149
|
managed_inputs = []
|
|
152
|
-
if
|
|
153
|
-
for d in json.loads(
|
|
150
|
+
if managed_inputs is not None:
|
|
151
|
+
for d in json.loads(managed_inputs):
|
|
154
152
|
i = ManagedInput.from_dict(d)
|
|
155
153
|
if i is None:
|
|
156
154
|
error(f"[magenta]{d}[/magenta] is not a valid [yellow]ManagedInput[/yellow]")
|
|
@@ -39,12 +39,12 @@ def get(
|
|
|
39
39
|
[bold][underline]Examples[/underline][/bold]
|
|
40
40
|
|
|
41
41
|
- Get an input set with the ID [magenta]hare-input-set[/magenta].
|
|
42
|
-
$ [
|
|
42
|
+
$ [dim]nextmv cloud input-set get --app-id hare-app --input-set-id hare-input-set[/dim]
|
|
43
43
|
|
|
44
44
|
- Get an input set with the ID [magenta]hare-input-set[/magenta] and save
|
|
45
45
|
the information to a [magenta]input-set.json[/magenta] file.
|
|
46
|
-
$ [
|
|
47
|
-
--output input-set.json[/
|
|
46
|
+
$ [dim]nextmv cloud input-set get --app-id hare-app --input-set-id hare-input-set \\
|
|
47
|
+
--output input-set.json[/dim]
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
50
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -38,13 +38,13 @@ def list(
|
|
|
38
38
|
[bold][underline]Examples[/underline][/bold]
|
|
39
39
|
|
|
40
40
|
- List all input sets of application [magenta]hare-app[/magenta].
|
|
41
|
-
$ [
|
|
41
|
+
$ [dim]nextmv cloud input-set list --app-id hare-app[/dim]
|
|
42
42
|
|
|
43
43
|
- List all input sets using the profile named [magenta]hare[/magenta].
|
|
44
|
-
$ [
|
|
44
|
+
$ [dim]nextmv cloud input-set list --app-id hare-app --profile hare[/dim]
|
|
45
45
|
|
|
46
46
|
- List all input sets and save the information to a [magenta]input-sets.json[/magenta] file.
|
|
47
|
-
$ [
|
|
47
|
+
$ [dim]nextmv cloud input-set list --app-id hare-app --output input-sets.json[/dim]
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
50
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -38,13 +38,13 @@ def update(
|
|
|
38
38
|
metavar="DESCRIPTION",
|
|
39
39
|
),
|
|
40
40
|
] = None,
|
|
41
|
-
|
|
41
|
+
managed_inputs: Annotated[
|
|
42
42
|
str | None,
|
|
43
43
|
typer.Option(
|
|
44
|
-
"--inputs",
|
|
45
|
-
help="
|
|
46
|
-
"format: [
|
|
47
|
-
metavar="
|
|
44
|
+
"--managed-inputs",
|
|
45
|
+
help="Managed inputs for the input set. Data should be valid [magenta]json[/magenta]. Object "
|
|
46
|
+
"format: [dim][{'id': 'id', 'name': 'name', 'description': 'description'}][/dim].",
|
|
47
|
+
metavar="MANAGED_INPUTS",
|
|
48
48
|
),
|
|
49
49
|
] = None,
|
|
50
50
|
output: Annotated[
|
|
@@ -62,50 +62,50 @@ def update(
|
|
|
62
62
|
Updates a Nextmv Cloud input set.
|
|
63
63
|
|
|
64
64
|
This command updates the metadata of an existing input set. You can update
|
|
65
|
-
the name, description, or inputs of the input set.
|
|
65
|
+
the name, description, or managed inputs of the input set.
|
|
66
66
|
|
|
67
67
|
[bold][underline]Examples[/underline][/bold]
|
|
68
68
|
|
|
69
69
|
- Update an input set's name.
|
|
70
|
-
$ [
|
|
71
|
-
--input-set-id hare-input-set --name "New Name"[/
|
|
70
|
+
$ [dim]nextmv cloud input-set update --app-id hare-app \\
|
|
71
|
+
--input-set-id hare-input-set --name "New Name"[/dim]
|
|
72
72
|
|
|
73
73
|
- Update an input set's description.
|
|
74
|
-
$ [
|
|
75
|
-
--input-set-id hare-input-set --description "Updated description"[/
|
|
74
|
+
$ [dim]nextmv cloud input-set update --app-id hare-app \\
|
|
75
|
+
--input-set-id hare-input-set --description "Updated description"[/dim]
|
|
76
76
|
|
|
77
|
-
- Update an input set's inputs.
|
|
78
|
-
$ [
|
|
79
|
-
--inputs '[{"id": "hare-input-1", "name": "hare input", "description": "hare description"}]'[/
|
|
77
|
+
- Update an input set's managed inputs.
|
|
78
|
+
$ [dim]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
|
|
79
|
+
--managed-inputs '[{"id": "hare-input-1", "name": "hare input", "description": "hare description"}]'[/dim]
|
|
80
80
|
|
|
81
81
|
- Update both name and description.
|
|
82
|
-
$ [
|
|
83
|
-
--name "New Name" --description "Updated description"[/
|
|
82
|
+
$ [dim]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
|
|
83
|
+
--name "New Name" --description "Updated description"[/dim]
|
|
84
84
|
|
|
85
85
|
- Update and save to a file.
|
|
86
|
-
$ [
|
|
87
|
-
--name "New Name" --output updated_input_set.json[/
|
|
86
|
+
$ [dim]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
|
|
87
|
+
--name "New Name" --output updated_input_set.json[/dim]
|
|
88
88
|
"""
|
|
89
89
|
|
|
90
|
-
if name is None and description is None and
|
|
91
|
-
error("Provide at least one option:
|
|
90
|
+
if name is None and description is None and managed_inputs is None:
|
|
91
|
+
error("Provide at least one option: --name, --description, or --managed-inputs.")
|
|
92
92
|
|
|
93
93
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
94
94
|
in_progress(msg="Updating input set...")
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
if
|
|
98
|
-
for d in json.loads(
|
|
96
|
+
managed_input_list = []
|
|
97
|
+
if managed_inputs is not None:
|
|
98
|
+
for d in json.loads(managed_inputs):
|
|
99
99
|
i = ManagedInput.from_dict(d)
|
|
100
100
|
if i is None:
|
|
101
101
|
error(f"[magenta]{d}[/magenta] is not a valid [yellow]ManagedInput[/yellow]")
|
|
102
|
-
|
|
102
|
+
managed_input_list.append(i)
|
|
103
103
|
|
|
104
104
|
updated_input_set = cloud_app.update_input_set(
|
|
105
105
|
id=input_set_id,
|
|
106
106
|
name=name,
|
|
107
107
|
description=description,
|
|
108
|
-
inputs=
|
|
108
|
+
inputs=managed_input_list,
|
|
109
109
|
)
|
|
110
110
|
success(
|
|
111
111
|
f"Input set [magenta]{input_set_id}[/magenta] updated successfully in application [magenta]{app_id}[/magenta]."
|
|
@@ -131,36 +131,35 @@ def create(
|
|
|
131
131
|
"""
|
|
132
132
|
Create a new Nextmv Cloud application instance.
|
|
133
133
|
|
|
134
|
-
Use the
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
created previously.
|
|
134
|
+
Use the --exist-ok flag to avoid errors when creating an instance with an
|
|
135
|
+
ID that already exists. This is useful for scripts that need to ensure an
|
|
136
|
+
instance exists without worrying about whether it was created previously.
|
|
138
137
|
|
|
139
138
|
[bold][underline]Examples[/underline][/bold]
|
|
140
139
|
|
|
141
140
|
- Create an instance for application [magenta]hare-app[/magenta] version [magenta]v1[/magenta].
|
|
142
|
-
$ [
|
|
141
|
+
$ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 --instance-id prod[/dim]
|
|
143
142
|
|
|
144
143
|
- Create an instance with a specific name.
|
|
145
|
-
$ [
|
|
146
|
-
--instance-id prod --name "Production Instance"[/
|
|
144
|
+
$ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
145
|
+
--instance-id prod --name "Production Instance"[/dim]
|
|
147
146
|
|
|
148
147
|
- Create an instance with a name and description.
|
|
149
|
-
$ [
|
|
148
|
+
$ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
150
149
|
--instance-id prod --name "Production Instance" \\
|
|
151
|
-
--description "Instance for production routing jobs"[/
|
|
150
|
+
--description "Instance for production routing jobs"[/dim]
|
|
152
151
|
|
|
153
152
|
- Create an instance, or get it if it already exists.
|
|
154
|
-
$ [
|
|
155
|
-
--instance-id prod --exist-ok[/
|
|
153
|
+
$ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
154
|
+
--instance-id prod --exist-ok[/dim]
|
|
156
155
|
|
|
157
156
|
- Create an instance with configuration options.
|
|
158
|
-
$ [
|
|
159
|
-
--instance-id prod --execution-class 6c9500mb870s --priority 1[/
|
|
157
|
+
$ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
158
|
+
--instance-id prod --execution-class 6c9500mb870s --priority 1[/dim]
|
|
160
159
|
|
|
161
160
|
- Create an instance with runtime options.
|
|
162
|
-
$ [
|
|
163
|
-
--instance-id prod --options max_duration=30 --options timeout=60[/
|
|
161
|
+
$ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
162
|
+
--instance-id prod --options max_duration=30 --options timeout=60[/dim]
|
|
164
163
|
"""
|
|
165
164
|
|
|
166
165
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -5,9 +5,9 @@ This module defines the cloud instance delete command for the Nextmv CLI.
|
|
|
5
5
|
from typing import Annotated
|
|
6
6
|
|
|
7
7
|
import typer
|
|
8
|
-
from rich.prompt import Confirm
|
|
9
8
|
|
|
10
9
|
from nextmv.cli.configuration.config import build_app
|
|
10
|
+
from nextmv.cli.confirm import get_confirmation
|
|
11
11
|
from nextmv.cli.message import info, success
|
|
12
12
|
from nextmv.cli.options import AppIDOption, InstanceIDOption, ProfileOption
|
|
13
13
|
|
|
@@ -32,23 +32,22 @@ def delete(
|
|
|
32
32
|
"""
|
|
33
33
|
Deletes a Nextmv Cloud application instance.
|
|
34
34
|
|
|
35
|
-
This action is permanent and cannot be undone. Use the
|
|
35
|
+
This action is permanent and cannot be undone. Use the --yes
|
|
36
36
|
flag to skip the confirmation prompt.
|
|
37
37
|
|
|
38
38
|
[bold][underline]Examples[/underline][/bold]
|
|
39
39
|
|
|
40
40
|
- Delete the instance with the ID [magenta]prod[/magenta] from application [magenta]hare-app[/magenta].
|
|
41
|
-
$ [
|
|
41
|
+
$ [dim]nextmv cloud instance delete --app-id hare-app --instance-id prod[/dim]
|
|
42
42
|
|
|
43
43
|
- Delete the instance without confirmation prompt.
|
|
44
|
-
$ [
|
|
44
|
+
$ [dim]nextmv cloud instance delete --app-id hare-app --instance-id prod --yes[/dim]
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
if not yes:
|
|
48
|
-
confirm =
|
|
48
|
+
confirm = get_confirmation(
|
|
49
49
|
f"Are you sure you want to delete instance [magenta]{instance_id}[/magenta] "
|
|
50
50
|
f"from application [magenta]{app_id}[/magenta]? This action cannot be undone.",
|
|
51
|
-
default=False,
|
|
52
51
|
)
|
|
53
52
|
|
|
54
53
|
if not confirm:
|
|
@@ -27,10 +27,10 @@ def exists(
|
|
|
27
27
|
[bold][underline]Examples[/underline][/bold]
|
|
28
28
|
|
|
29
29
|
- Check if the instance with the ID [magenta]prod[/magenta] exists in application [magenta]hare-app[/magenta].
|
|
30
|
-
$ [
|
|
30
|
+
$ [dim]nextmv cloud instance exists --app-id hare-app --instance-id prod[/dim]
|
|
31
31
|
|
|
32
32
|
- Check if the instance exists using the profile named [magenta]hare[/magenta].
|
|
33
|
-
$ [
|
|
33
|
+
$ [dim]nextmv cloud instance exists --app-id hare-app --instance-id prod --profile hare[/dim]
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
nextmv/cli/cloud/instance/get.py
CHANGED
|
@@ -39,11 +39,11 @@ def get(
|
|
|
39
39
|
[bold][underline]Examples[/underline][/bold]
|
|
40
40
|
|
|
41
41
|
- Get the instance with the ID [magenta]prod[/magenta] from application [magenta]hare-app[/magenta].
|
|
42
|
-
$ [
|
|
42
|
+
$ [dim]nextmv cloud instance get --app-id hare-app --instance-id prod[/dim]
|
|
43
43
|
|
|
44
44
|
- Get the instance with the ID [magenta]prod[/magenta] and save the information to a
|
|
45
45
|
[magenta]instance.json[/magenta] file.
|
|
46
|
-
$ [
|
|
46
|
+
$ [dim]nextmv cloud instance get --app-id hare-app --instance-id prod --output instance.json[/dim]
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -35,13 +35,13 @@ def list(
|
|
|
35
35
|
[bold][underline]Examples[/underline][/bold]
|
|
36
36
|
|
|
37
37
|
- List all instances of application [magenta]hare-app[/magenta].
|
|
38
|
-
$ [
|
|
38
|
+
$ [dim]nextmv cloud instance list --app-id hare-app[/dim]
|
|
39
39
|
|
|
40
40
|
- List all instances using the profile named [magenta]hare[/magenta].
|
|
41
|
-
$ [
|
|
41
|
+
$ [dim]nextmv cloud instance list --app-id hare-app --profile hare[/dim]
|
|
42
42
|
|
|
43
43
|
- List all instances and save the information to a [magenta]instances.json[/magenta] file.
|
|
44
|
-
$ [
|
|
44
|
+
$ [dim]nextmv cloud instance list --app-id hare-app --output instances.json[/dim]
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -132,30 +132,30 @@ def update(
|
|
|
132
132
|
[bold][underline]Examples[/underline][/bold]
|
|
133
133
|
|
|
134
134
|
- Update an instance's name.
|
|
135
|
-
$ [
|
|
135
|
+
$ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod --name "Production Instance"[/dim]
|
|
136
136
|
|
|
137
137
|
- Update an instance's description.
|
|
138
|
-
$ [
|
|
139
|
-
--description "Instance for production routing jobs"[/
|
|
138
|
+
$ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
139
|
+
--description "Instance for production routing jobs"[/dim]
|
|
140
140
|
|
|
141
141
|
- Update an instance to use a different version.
|
|
142
|
-
$ [
|
|
142
|
+
$ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod --version-id v2[/dim]
|
|
143
143
|
|
|
144
144
|
- Update an instance's name and description at once.
|
|
145
|
-
$ [
|
|
146
|
-
--name "Production Instance" --description "Instance for production routing jobs"[/
|
|
145
|
+
$ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
146
|
+
--name "Production Instance" --description "Instance for production routing jobs"[/dim]
|
|
147
147
|
|
|
148
148
|
- Update an instance and save the updated information to a [magenta]updated_instance.json[/magenta] file.
|
|
149
|
-
$ [
|
|
150
|
-
--name "Production Instance" --output updated_instance.json[/
|
|
149
|
+
$ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
150
|
+
--name "Production Instance" --output updated_instance.json[/dim]
|
|
151
151
|
|
|
152
152
|
- Update an instance's execution class and priority.
|
|
153
|
-
$ [
|
|
154
|
-
--execution-class 6c9500mb870s --priority 1[/
|
|
153
|
+
$ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
154
|
+
--execution-class 6c9500mb870s --priority 1[/dim]
|
|
155
155
|
|
|
156
156
|
- Update an instance's runtime options.
|
|
157
|
-
$ [
|
|
158
|
-
--options max_duration=30 --options timeout=60[/
|
|
157
|
+
$ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
158
|
+
--options max_duration=30 --options timeout=60[/dim]
|
|
159
159
|
"""
|
|
160
160
|
|
|
161
161
|
# Check if any configuration options are provided
|
|
@@ -173,8 +173,8 @@ def update(
|
|
|
173
173
|
|
|
174
174
|
if name is None and description is None and version_id is None and not has_config_options:
|
|
175
175
|
error(
|
|
176
|
-
"Provide at least one option to update:
|
|
177
|
-
"
|
|
176
|
+
"Provide at least one option to update: --name, --description, "
|
|
177
|
+
"--version-id, or any [magenta]Instance configuration[/magenta] option."
|
|
178
178
|
)
|
|
179
179
|
|
|
180
180
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -62,8 +62,7 @@ def create(
|
|
|
62
62
|
typer.Option(
|
|
63
63
|
"--run-id",
|
|
64
64
|
"-r",
|
|
65
|
-
help="ID of the run to use for the managed input. "
|
|
66
|
-
"Either [code]--upload-id[/code] or [code]--run-id[/code] must be specified.",
|
|
65
|
+
help="ID of the run to use for the managed input. Either --upload-id or --run-id must be specified.",
|
|
67
66
|
envvar="NEXTMV_RUN_ID",
|
|
68
67
|
metavar="RUN_ID",
|
|
69
68
|
),
|
|
@@ -73,8 +72,7 @@ def create(
|
|
|
73
72
|
typer.Option(
|
|
74
73
|
"--upload-id",
|
|
75
74
|
"-u",
|
|
76
|
-
help="ID of the upload to use for the managed input. "
|
|
77
|
-
"Either [code]--upload-id[/code] or [code]--run-id[/code] must be specified.",
|
|
75
|
+
help="ID of the upload to use for the managed input. Either --upload-id or --run-id must be specified.",
|
|
78
76
|
metavar="UPLOAD_ID",
|
|
79
77
|
),
|
|
80
78
|
] = None,
|
|
@@ -84,8 +82,8 @@ def create(
|
|
|
84
82
|
Create a new Nextmv Cloud application managed input.
|
|
85
83
|
|
|
86
84
|
A managed input can be created from either an upload or a run. Use the
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
--upload-id flag to create from an upload, or the --run-id flag to create
|
|
86
|
+
from a run output.
|
|
89
87
|
|
|
90
88
|
You can get an upload ID by using the [code]nextmv cloud upload
|
|
91
89
|
create[/code] command. The [magenta].upload_id[/magenta] field in the
|
|
@@ -100,26 +98,26 @@ def create(
|
|
|
100
98
|
[bold][underline]Examples[/underline][/bold]
|
|
101
99
|
|
|
102
100
|
- Create a managed input from an upload.
|
|
103
|
-
$ [
|
|
104
|
-
--upload-id upl_123456789[/
|
|
101
|
+
$ [dim]nextmv cloud managed-input create --app-id hare-app --name "Test Input 1" \
|
|
102
|
+
--upload-id upl_123456789[/dim]
|
|
105
103
|
|
|
106
104
|
- Create a managed input from a run.
|
|
107
|
-
$ [
|
|
108
|
-
--run-id run_123456789[/
|
|
105
|
+
$ [dim]nextmv cloud managed-input create --app-id hare-app --name "Baseline Run" \
|
|
106
|
+
--run-id run_123456789[/dim]
|
|
109
107
|
|
|
110
108
|
- Create a managed input with a specific ID and description.
|
|
111
|
-
$ [
|
|
112
|
-
--managed-input-id inp_custom --description "Test case for validation" --upload-id upl_123456789[/
|
|
109
|
+
$ [dim]nextmv cloud managed-input create --app-id hare-app --name "Test Input" \\
|
|
110
|
+
--managed-input-id inp_custom --description "Test case for validation" --upload-id upl_123456789[/dim]
|
|
113
111
|
|
|
114
112
|
- Create a managed input with custom format.
|
|
115
|
-
$ [
|
|
116
|
-
--upload-id upl_123456789 --content-format csv[/
|
|
113
|
+
$ [dim]nextmv cloud managed-input create --app-id hare-app --name "CSV Input" \\
|
|
114
|
+
--upload-id upl_123456789 --content-format csv[/dim]
|
|
117
115
|
"""
|
|
118
116
|
|
|
119
117
|
if upload_id is None and run_id is None:
|
|
120
118
|
error(
|
|
121
|
-
"Either
|
|
122
|
-
"Use
|
|
119
|
+
"Either --upload-id or --run-id must be specified. "
|
|
120
|
+
"Use nextmv cloud upload create to create an upload first, "
|
|
123
121
|
"or specify an existing run ID."
|
|
124
122
|
)
|
|
125
123
|
|
|
@@ -5,9 +5,9 @@ This module defines the cloud managed-input delete command for the Nextmv CLI.
|
|
|
5
5
|
from typing import Annotated
|
|
6
6
|
|
|
7
7
|
import typer
|
|
8
|
-
from rich.prompt import Confirm
|
|
9
8
|
|
|
10
9
|
from nextmv.cli.configuration.config import build_app
|
|
10
|
+
from nextmv.cli.confirm import get_confirmation
|
|
11
11
|
from nextmv.cli.message import info, success
|
|
12
12
|
from nextmv.cli.options import AppIDOption, ManagedInputIDOption, ProfileOption
|
|
13
13
|
|
|
@@ -32,25 +32,24 @@ def delete(
|
|
|
32
32
|
"""
|
|
33
33
|
Deletes a Nextmv Cloud application managed input.
|
|
34
34
|
|
|
35
|
-
This action is permanent and cannot be undone. Use the
|
|
35
|
+
This action is permanent and cannot be undone. Use the --yes
|
|
36
36
|
flag to skip the confirmation prompt.
|
|
37
37
|
|
|
38
38
|
[bold][underline]Examples[/underline][/bold]
|
|
39
39
|
|
|
40
40
|
- Delete the managed input with the ID [magenta]inp_123456789[/magenta] from application
|
|
41
41
|
[magenta]hare-app[/magenta].
|
|
42
|
-
$ [
|
|
43
|
-
--managed-input-id inp_123456789[/
|
|
42
|
+
$ [dim]nextmv cloud managed-input delete --app-id hare-app \
|
|
43
|
+
--managed-input-id inp_123456789[/dim]
|
|
44
44
|
|
|
45
45
|
- Delete the managed input without confirmation prompt.
|
|
46
|
-
$ [
|
|
46
|
+
$ [dim]nextmv cloud managed-input delete --app-id hare-app --managed-input-id inp_123456789 --yes[/dim]
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
if not yes:
|
|
50
|
-
confirm =
|
|
50
|
+
confirm = get_confirmation(
|
|
51
51
|
f"Are you sure you want to delete managed input [magenta]{managed_input_id}[/magenta] "
|
|
52
52
|
f"from application [magenta]{app_id}[/magenta]? This action cannot be undone.",
|
|
53
|
-
default=False,
|
|
54
53
|
)
|
|
55
54
|
|
|
56
55
|
if not confirm:
|
|
@@ -39,12 +39,12 @@ def get(
|
|
|
39
39
|
[bold][underline]Examples[/underline][/bold]
|
|
40
40
|
|
|
41
41
|
- Get the managed input with the ID [magenta]inp_123456789[/magenta] from application [magenta]hare-app[/magenta].
|
|
42
|
-
$ [
|
|
42
|
+
$ [dim]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789[/dim]
|
|
43
43
|
|
|
44
44
|
- Get the managed input with the ID [magenta]inp_123456789[/magenta] and save the information to a
|
|
45
45
|
[magenta]managed_input.json[/magenta] file.
|
|
46
|
-
$ [
|
|
47
|
-
--output managed_input.json[/
|
|
46
|
+
$ [dim]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789 \
|
|
47
|
+
--output managed_input.json[/dim]
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
50
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -35,13 +35,13 @@ def list(
|
|
|
35
35
|
[bold][underline]Examples[/underline][/bold]
|
|
36
36
|
|
|
37
37
|
- List all managed inputs of application [magenta]hare-app[/magenta].
|
|
38
|
-
$ [
|
|
38
|
+
$ [dim]nextmv cloud managed-input list --app-id hare-app[/dim]
|
|
39
39
|
|
|
40
40
|
- List all managed inputs using the profile named [magenta]hare[/magenta].
|
|
41
|
-
$ [
|
|
41
|
+
$ [dim]nextmv cloud managed-input list --app-id hare-app --profile hare[/dim]
|
|
42
42
|
|
|
43
43
|
- List all managed inputs and save the information to a [magenta]managed_inputs.json[/magenta] file.
|
|
44
|
-
$ [
|
|
44
|
+
$ [dim]nextmv cloud managed-input list --app-id hare-app --output managed_inputs.json[/dim]
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -54,24 +54,24 @@ def update(
|
|
|
54
54
|
[bold][underline]Examples[/underline][/bold]
|
|
55
55
|
|
|
56
56
|
- Update a managed input's name.
|
|
57
|
-
$ [
|
|
58
|
-
--managed-input-id inp_123456789 --name "Updated Test Input"[/
|
|
57
|
+
$ [dim]nextmv cloud managed-input update --app-id hare-app \
|
|
58
|
+
--managed-input-id inp_123456789 --name "Updated Test Input"[/dim]
|
|
59
59
|
|
|
60
60
|
- Update a managed input's description.
|
|
61
|
-
$ [
|
|
62
|
-
--description "Updated test case for validation"[/
|
|
61
|
+
$ [dim]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
|
|
62
|
+
--description "Updated test case for validation"[/dim]
|
|
63
63
|
|
|
64
64
|
- Update a managed input's name and description at once.
|
|
65
|
-
$ [
|
|
66
|
-
--name "Updated Test Input" --description "Updated test case for validation"[/
|
|
65
|
+
$ [dim]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
|
|
66
|
+
--name "Updated Test Input" --description "Updated test case for validation"[/dim]
|
|
67
67
|
|
|
68
68
|
- Update a managed input and save the updated information to a [magenta]updated_managed_input.json[/magenta] file.
|
|
69
|
-
$ [
|
|
70
|
-
--name "Updated Test Input" --output updated_managed_input.json[/
|
|
69
|
+
$ [dim]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
|
|
70
|
+
--name "Updated Test Input" --output updated_managed_input.json[/dim]
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
73
|
if name is None and description is None:
|
|
74
|
-
error("Provide at least one option to update:
|
|
74
|
+
error("Provide at least one option to update: --name or --description.")
|
|
75
75
|
|
|
76
76
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
77
77
|
|