nextmv 1.0.0__py3-none-any.whl → 1.0.0.dev0__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/__entrypoint__.py +2 -1
- nextmv/__init__.py +4 -0
- nextmv/cli/CONTRIBUTING.md +40 -112
- nextmv/cli/cloud/__init__.py +0 -4
- nextmv/cli/cloud/acceptance/create.py +22 -20
- nextmv/cli/cloud/acceptance/delete.py +12 -8
- nextmv/cli/cloud/acceptance/get.py +10 -9
- 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 +8 -7
- nextmv/cli/cloud/account/get.py +3 -3
- nextmv/cli/cloud/account/update.py +5 -5
- nextmv/cli/cloud/app/create.py +26 -25
- nextmv/cli/cloud/app/delete.py +7 -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 +54 -349
- nextmv/cli/cloud/app/update.py +12 -12
- nextmv/cli/cloud/batch/create.py +28 -26
- nextmv/cli/cloud/batch/delete.py +10 -6
- nextmv/cli/cloud/batch/get.py +9 -9
- 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 +0 -2
- nextmv/cli/cloud/ensemble/create.py +22 -21
- nextmv/cli/cloud/ensemble/delete.py +10 -6
- nextmv/cli/cloud/ensemble/get.py +4 -4
- nextmv/cli/cloud/ensemble/update.py +9 -9
- nextmv/cli/cloud/input_set/__init__.py +0 -2
- nextmv/cli/cloud/input_set/create.py +22 -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 +15 -14
- nextmv/cli/cloud/instance/delete.py +7 -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 +16 -14
- nextmv/cli/cloud/managed_input/delete.py +8 -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 +40 -34
- 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 +10 -9
- nextmv/cli/cloud/run/metadata.py +4 -4
- nextmv/cli/cloud/run/track.py +33 -32
- nextmv/cli/cloud/scenario/create.py +21 -21
- nextmv/cli/cloud/scenario/delete.py +10 -6
- nextmv/cli/cloud/scenario/get.py +9 -9
- 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 +10 -6
- nextmv/cli/cloud/secrets/get.py +4 -4
- nextmv/cli/cloud/secrets/list.py +3 -3
- nextmv/cli/cloud/secrets/update.py +20 -17
- nextmv/cli/cloud/upload/create.py +2 -2
- nextmv/cli/cloud/version/create.py +10 -9
- nextmv/cli/cloud/version/delete.py +7 -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/__init__.py +1 -1
- nextmv/cli/community/clone.py +204 -20
- nextmv/cli/community/list.py +125 -60
- nextmv/cli/configuration/config.py +10 -43
- nextmv/cli/configuration/create.py +7 -7
- nextmv/cli/configuration/delete.py +8 -8
- nextmv/cli/configuration/list.py +3 -3
- nextmv/cli/main.py +36 -26
- nextmv/cli/message.py +54 -71
- nextmv/cli/options.py +0 -28
- nextmv/cli/version.py +1 -1
- nextmv/cloud/__init__.py +38 -14
- nextmv/cloud/acceptance_test.py +65 -1
- nextmv/cloud/account.py +6 -1
- nextmv/cloud/application/__init__.py +75 -18
- nextmv/cloud/application/_acceptance.py +8 -13
- nextmv/cloud/application/_batch_scenario.py +19 -4
- nextmv/cloud/application/_input_set.py +6 -42
- nextmv/cloud/application/_instance.py +3 -3
- nextmv/cloud/application/_managed_input.py +2 -2
- nextmv/cloud/application/_version.py +3 -4
- nextmv/cloud/batch_experiment.py +1 -3
- nextmv/cloud/integration.py +4 -7
- nextmv/deprecated.py +3 -5
- nextmv/input.py +52 -0
- nextmv/local/runner.py +1 -1
- nextmv/model.py +11 -50
- nextmv/options.py +256 -11
- nextmv/output.py +62 -0
- nextmv/run.py +10 -1
- nextmv/status.py +51 -1
- {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/METADATA +4 -5
- nextmv-1.0.0.dev0.dist-info/RECORD +158 -0
- nextmv/cli/cloud/ensemble/list.py +0 -63
- nextmv/cli/cloud/input_set/delete.py +0 -64
- nextmv/cli/cloud/shadow/__init__.py +0 -33
- nextmv/cli/cloud/shadow/create.py +0 -184
- nextmv/cli/cloud/shadow/delete.py +0 -64
- nextmv/cli/cloud/shadow/get.py +0 -61
- nextmv/cli/cloud/shadow/list.py +0 -63
- nextmv/cli/cloud/shadow/metadata.py +0 -66
- nextmv/cli/cloud/shadow/start.py +0 -43
- nextmv/cli/cloud/shadow/stop.py +0 -53
- nextmv/cli/cloud/shadow/update.py +0 -96
- nextmv/cli/cloud/switchback/__init__.py +0 -33
- nextmv/cli/cloud/switchback/create.py +0 -151
- nextmv/cli/cloud/switchback/delete.py +0 -64
- nextmv/cli/cloud/switchback/get.py +0 -62
- nextmv/cli/cloud/switchback/list.py +0 -63
- nextmv/cli/cloud/switchback/metadata.py +0 -68
- nextmv/cli/cloud/switchback/start.py +0 -43
- nextmv/cli/cloud/switchback/stop.py +0 -53
- nextmv/cli/cloud/switchback/update.py +0 -96
- nextmv/cli/confirm.py +0 -34
- nextmv/cloud/application/_shadow.py +0 -320
- nextmv/cloud/application/_switchback.py +0 -332
- nextmv/cloud/community.py +0 -446
- nextmv/cloud/shadow.py +0 -254
- nextmv/cloud/switchback.py +0 -228
- nextmv-1.0.0.dist-info/RECORD +0 -185
- nextmv-1.0.0.dist-info/entry_points.txt +0 -2
- {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/WHEEL +0 -0
- {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/licenses/LICENSE +0 -0
|
@@ -38,13 +38,13 @@ def update(
|
|
|
38
38
|
metavar="DESCRIPTION",
|
|
39
39
|
),
|
|
40
40
|
] = None,
|
|
41
|
-
|
|
41
|
+
inputs: Annotated[
|
|
42
42
|
str | None,
|
|
43
43
|
typer.Option(
|
|
44
|
-
"--
|
|
45
|
-
help="
|
|
46
|
-
"format: [
|
|
47
|
-
metavar="
|
|
44
|
+
"--inputs",
|
|
45
|
+
help="Inputs for the input set. Data should be valid [magenta]json[/magenta]. Object "
|
|
46
|
+
"format: [magenta][{'id': 'id', 'name': 'name', 'description': 'description'}][/magenta].",
|
|
47
|
+
metavar="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
|
|
65
|
+
the name, description, or 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
|
+
$ [green]nextmv cloud input-set update --app-id hare-app \\
|
|
71
|
+
--input-set-id hare-input-set --name "New Name"[/green]
|
|
72
72
|
|
|
73
73
|
- Update an input set's description.
|
|
74
|
-
$ [
|
|
75
|
-
--input-set-id hare-input-set --description "Updated description"[/
|
|
74
|
+
$ [green]nextmv cloud input-set update --app-id hare-app \\
|
|
75
|
+
--input-set-id hare-input-set --description "Updated description"[/green]
|
|
76
76
|
|
|
77
|
-
- Update an input set's
|
|
78
|
-
$ [
|
|
79
|
-
--
|
|
77
|
+
- Update an input set's inputs.
|
|
78
|
+
$ [green]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
|
|
79
|
+
--inputs '[{"id": "hare-input-1", "name": "hare input", "description": "hare description"}]'[/green]
|
|
80
80
|
|
|
81
81
|
- Update both name and description.
|
|
82
|
-
$ [
|
|
83
|
-
--name "New Name" --description "Updated description"[/
|
|
82
|
+
$ [green]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
|
|
83
|
+
--name "New Name" --description "Updated description"[/green]
|
|
84
84
|
|
|
85
85
|
- Update and save to a file.
|
|
86
|
-
$ [
|
|
87
|
-
--name "New Name" --output updated_input_set.json[/
|
|
86
|
+
$ [green]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
|
|
87
|
+
--name "New Name" --output updated_input_set.json[/green]
|
|
88
88
|
"""
|
|
89
89
|
|
|
90
|
-
if name is None and description is None and
|
|
91
|
-
error("Provide at least one option: --name, --description, or --
|
|
90
|
+
if name is None and description is None and inputs is None:
|
|
91
|
+
error("Provide at least one option: [code]--name[/code], [code]--description[/code], or [code]--inputs[/code].")
|
|
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_inputs = []
|
|
97
|
+
if inputs is not None:
|
|
98
|
+
for d in json.loads(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_inputs.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_inputs,
|
|
109
109
|
)
|
|
110
110
|
success(
|
|
111
111
|
f"Input set [magenta]{input_set_id}[/magenta] updated successfully in application [magenta]{app_id}[/magenta]."
|
|
@@ -131,35 +131,36 @@ def create(
|
|
|
131
131
|
"""
|
|
132
132
|
Create a new Nextmv Cloud application instance.
|
|
133
133
|
|
|
134
|
-
Use the --exist-ok flag to avoid errors when creating an
|
|
135
|
-
ID that already exists. This is useful for scripts that
|
|
136
|
-
instance exists without worrying about whether it was
|
|
134
|
+
Use the [code]--exist-ok[/code] flag to avoid errors when creating an
|
|
135
|
+
instance with an ID that already exists. This is useful for scripts that
|
|
136
|
+
need to ensure an instance exists without worrying about whether it was
|
|
137
|
+
created previously.
|
|
137
138
|
|
|
138
139
|
[bold][underline]Examples[/underline][/bold]
|
|
139
140
|
|
|
140
141
|
- Create an instance for application [magenta]hare-app[/magenta] version [magenta]v1[/magenta].
|
|
141
|
-
$ [
|
|
142
|
+
$ [green]nextmv cloud instance create --app-id hare-app --version-id v1 --instance-id prod[/green]
|
|
142
143
|
|
|
143
144
|
- Create an instance with a specific name.
|
|
144
|
-
$ [
|
|
145
|
-
--instance-id prod --name "Production Instance"[/
|
|
145
|
+
$ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
146
|
+
--instance-id prod --name "Production Instance"[/green]
|
|
146
147
|
|
|
147
148
|
- Create an instance with a name and description.
|
|
148
|
-
$ [
|
|
149
|
+
$ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
149
150
|
--instance-id prod --name "Production Instance" \\
|
|
150
|
-
--description "Instance for production routing jobs"[/
|
|
151
|
+
--description "Instance for production routing jobs"[/green]
|
|
151
152
|
|
|
152
153
|
- Create an instance, or get it if it already exists.
|
|
153
|
-
$ [
|
|
154
|
-
--instance-id prod --exist-ok[/
|
|
154
|
+
$ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
155
|
+
--instance-id prod --exist-ok[/green]
|
|
155
156
|
|
|
156
157
|
- Create an instance with configuration options.
|
|
157
|
-
$ [
|
|
158
|
-
--instance-id prod --execution-class 6c9500mb870s --priority 1[/
|
|
158
|
+
$ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
159
|
+
--instance-id prod --execution-class 6c9500mb870s --priority 1[/green]
|
|
159
160
|
|
|
160
161
|
- Create an instance with runtime options.
|
|
161
|
-
$ [
|
|
162
|
-
--instance-id prod --options max_duration=30 --options timeout=60[/
|
|
162
|
+
$ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
|
|
163
|
+
--instance-id prod --options max_duration=30 --options timeout=60[/green]
|
|
163
164
|
"""
|
|
164
165
|
|
|
165
166
|
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
|
|
8
9
|
|
|
9
10
|
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,26 +32,27 @@ 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 --yes
|
|
35
|
+
This action is permanent and cannot be undone. Use the [code]--yes[/code]
|
|
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
|
+
$ [green]nextmv cloud instance delete --app-id hare-app --instance-id prod[/green]
|
|
42
42
|
|
|
43
43
|
- Delete the instance without confirmation prompt.
|
|
44
|
-
$ [
|
|
44
|
+
$ [green]nextmv cloud instance delete --app-id hare-app --instance-id prod --yes[/green]
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
if not yes:
|
|
48
|
-
confirm =
|
|
48
|
+
confirm = Confirm.ask(
|
|
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,
|
|
51
52
|
)
|
|
52
53
|
|
|
53
54
|
if not confirm:
|
|
54
|
-
info(f"Instance [magenta]{instance_id}[/magenta] will not be deleted.")
|
|
55
|
+
info(msg=f"Instance [magenta]{instance_id}[/magenta] will not be deleted.", emoji=":bulb:")
|
|
55
56
|
return
|
|
56
57
|
|
|
57
58
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -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
|
+
$ [green]nextmv cloud instance exists --app-id hare-app --instance-id prod[/green]
|
|
31
31
|
|
|
32
32
|
- Check if the instance exists using the profile named [magenta]hare[/magenta].
|
|
33
|
-
$ [
|
|
33
|
+
$ [green]nextmv cloud instance exists --app-id hare-app --instance-id prod --profile hare[/green]
|
|
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
|
+
$ [green]nextmv cloud instance get --app-id hare-app --instance-id prod[/green]
|
|
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
|
+
$ [green]nextmv cloud instance get --app-id hare-app --instance-id prod --output instance.json[/green]
|
|
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
|
+
$ [green]nextmv cloud instance list --app-id hare-app[/green]
|
|
39
39
|
|
|
40
40
|
- List all instances using the profile named [magenta]hare[/magenta].
|
|
41
|
-
$ [
|
|
41
|
+
$ [green]nextmv cloud instance list --app-id hare-app --profile hare[/green]
|
|
42
42
|
|
|
43
43
|
- List all instances and save the information to a [magenta]instances.json[/magenta] file.
|
|
44
|
-
$ [
|
|
44
|
+
$ [green]nextmv cloud instance list --app-id hare-app --output instances.json[/green]
|
|
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
|
+
$ [green]nextmv cloud instance update --app-id hare-app --instance-id prod --name "Production Instance"[/green]
|
|
136
136
|
|
|
137
137
|
- Update an instance's description.
|
|
138
|
-
$ [
|
|
139
|
-
--description "Instance for production routing jobs"[/
|
|
138
|
+
$ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
139
|
+
--description "Instance for production routing jobs"[/green]
|
|
140
140
|
|
|
141
141
|
- Update an instance to use a different version.
|
|
142
|
-
$ [
|
|
142
|
+
$ [green]nextmv cloud instance update --app-id hare-app --instance-id prod --version-id v2[/green]
|
|
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
|
+
$ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
146
|
+
--name "Production Instance" --description "Instance for production routing jobs"[/green]
|
|
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
|
+
$ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
150
|
+
--name "Production Instance" --output updated_instance.json[/green]
|
|
151
151
|
|
|
152
152
|
- Update an instance's execution class and priority.
|
|
153
|
-
$ [
|
|
154
|
-
--execution-class 6c9500mb870s --priority 1[/
|
|
153
|
+
$ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
154
|
+
--execution-class 6c9500mb870s --priority 1[/green]
|
|
155
155
|
|
|
156
156
|
- Update an instance's runtime options.
|
|
157
|
-
$ [
|
|
158
|
-
--options max_duration=30 --options timeout=60[/
|
|
157
|
+
$ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
|
|
158
|
+
--options max_duration=30 --options timeout=60[/green]
|
|
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: --name, --description, "
|
|
177
|
-
"--version-id, or any [magenta]Instance configuration[/magenta] option."
|
|
176
|
+
"Provide at least one option to update: [code]--name[/code], [code]--description[/code], "
|
|
177
|
+
"[code]--version-id[/code], or any [magenta]Instance configuration[/magenta] option."
|
|
178
178
|
)
|
|
179
179
|
|
|
180
180
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -62,7 +62,8 @@ 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.
|
|
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.",
|
|
66
67
|
envvar="NEXTMV_RUN_ID",
|
|
67
68
|
metavar="RUN_ID",
|
|
68
69
|
),
|
|
@@ -72,7 +73,8 @@ def create(
|
|
|
72
73
|
typer.Option(
|
|
73
74
|
"--upload-id",
|
|
74
75
|
"-u",
|
|
75
|
-
help="ID of the upload to use for the managed input.
|
|
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.",
|
|
76
78
|
metavar="UPLOAD_ID",
|
|
77
79
|
),
|
|
78
80
|
] = None,
|
|
@@ -82,8 +84,8 @@ def create(
|
|
|
82
84
|
Create a new Nextmv Cloud application managed input.
|
|
83
85
|
|
|
84
86
|
A managed input can be created from either an upload or a run. Use the
|
|
85
|
-
--upload-id flag to create from an upload, or the
|
|
86
|
-
from a run output.
|
|
87
|
+
[code]--upload-id[/code] flag to create from an upload, or the
|
|
88
|
+
[code]--run-id[/code] flag to create from a run output.
|
|
87
89
|
|
|
88
90
|
You can get an upload ID by using the [code]nextmv cloud upload
|
|
89
91
|
create[/code] command. The [magenta].upload_id[/magenta] field in the
|
|
@@ -98,26 +100,26 @@ def create(
|
|
|
98
100
|
[bold][underline]Examples[/underline][/bold]
|
|
99
101
|
|
|
100
102
|
- Create a managed input from an upload.
|
|
101
|
-
$ [
|
|
102
|
-
--upload-id upl_123456789[/
|
|
103
|
+
$ [green]nextmv cloud managed-input create --app-id hare-app --name "Test Input 1" \
|
|
104
|
+
--upload-id upl_123456789[/green]
|
|
103
105
|
|
|
104
106
|
- Create a managed input from a run.
|
|
105
|
-
$ [
|
|
106
|
-
--run-id run_123456789[/
|
|
107
|
+
$ [green]nextmv cloud managed-input create --app-id hare-app --name "Baseline Run" \
|
|
108
|
+
--run-id run_123456789[/green]
|
|
107
109
|
|
|
108
110
|
- Create a managed input with a specific ID and description.
|
|
109
|
-
$ [
|
|
110
|
-
--managed-input-id inp_custom --description "Test case for validation" --upload-id upl_123456789[/
|
|
111
|
+
$ [green]nextmv cloud managed-input create --app-id hare-app --name "Test Input" \\
|
|
112
|
+
--managed-input-id inp_custom --description "Test case for validation" --upload-id upl_123456789[/green]
|
|
111
113
|
|
|
112
114
|
- Create a managed input with custom format.
|
|
113
|
-
$ [
|
|
114
|
-
--upload-id upl_123456789 --content-format csv[/
|
|
115
|
+
$ [green]nextmv cloud managed-input create --app-id hare-app --name "CSV Input" \\
|
|
116
|
+
--upload-id upl_123456789 --content-format csv[/green]
|
|
115
117
|
"""
|
|
116
118
|
|
|
117
119
|
if upload_id is None and run_id is None:
|
|
118
120
|
error(
|
|
119
|
-
"Either --upload-id or --run-id must be specified. "
|
|
120
|
-
"Use nextmv cloud upload create to create an upload first, "
|
|
121
|
+
"Either [code]--upload-id[/code] or [code]--run-id[/code] must be specified. "
|
|
122
|
+
"Use [code]nextmv cloud upload create[/code] to create an upload first, "
|
|
121
123
|
"or specify an existing run ID."
|
|
122
124
|
)
|
|
123
125
|
|
|
@@ -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
|
|
8
9
|
|
|
9
10
|
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,28 +32,29 @@ 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 --yes
|
|
35
|
+
This action is permanent and cannot be undone. Use the [code]--yes[/code]
|
|
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
|
+
$ [green]nextmv cloud managed-input delete --app-id hare-app \
|
|
43
|
+
--managed-input-id inp_123456789[/green]
|
|
44
44
|
|
|
45
45
|
- Delete the managed input without confirmation prompt.
|
|
46
|
-
$ [
|
|
46
|
+
$ [green]nextmv cloud managed-input delete --app-id hare-app --managed-input-id inp_123456789 --yes[/green]
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
if not yes:
|
|
50
|
-
confirm =
|
|
50
|
+
confirm = Confirm.ask(
|
|
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,
|
|
53
54
|
)
|
|
54
55
|
|
|
55
56
|
if not confirm:
|
|
56
|
-
info(f"Managed input [magenta]{managed_input_id}[/magenta] will not be deleted.")
|
|
57
|
+
info(msg=f"Managed input [magenta]{managed_input_id}[/magenta] will not be deleted.", emoji=":bulb:")
|
|
57
58
|
return
|
|
58
59
|
|
|
59
60
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
@@ -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
|
+
$ [green]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789[/green]
|
|
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
|
+
$ [green]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789 \
|
|
47
|
+
--output managed_input.json[/green]
|
|
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
|
+
$ [green]nextmv cloud managed-input list --app-id hare-app[/green]
|
|
39
39
|
|
|
40
40
|
- List all managed inputs using the profile named [magenta]hare[/magenta].
|
|
41
|
-
$ [
|
|
41
|
+
$ [green]nextmv cloud managed-input list --app-id hare-app --profile hare[/green]
|
|
42
42
|
|
|
43
43
|
- List all managed inputs and save the information to a [magenta]managed_inputs.json[/magenta] file.
|
|
44
|
-
$ [
|
|
44
|
+
$ [green]nextmv cloud managed-input list --app-id hare-app --output managed_inputs.json[/green]
|
|
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
|
+
$ [green]nextmv cloud managed-input update --app-id hare-app \
|
|
58
|
+
--managed-input-id inp_123456789 --name "Updated Test Input"[/green]
|
|
59
59
|
|
|
60
60
|
- Update a managed input's description.
|
|
61
|
-
$ [
|
|
62
|
-
--description "Updated test case for validation"[/
|
|
61
|
+
$ [green]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
|
|
62
|
+
--description "Updated test case for validation"[/green]
|
|
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
|
+
$ [green]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"[/green]
|
|
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
|
+
$ [green]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
|
|
70
|
+
--name "Updated Test Input" --output updated_managed_input.json[/green]
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
73
|
if name is None and description is None:
|
|
74
|
-
error("Provide at least one option to update: --name or --description.")
|
|
74
|
+
error("Provide at least one option to update: [code]--name[/code] or [code]--description[/code].")
|
|
75
75
|
|
|
76
76
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
|
77
77
|
|
nextmv/cli/cloud/run/cancel.py
CHANGED
|
@@ -24,11 +24,11 @@ def cancel(
|
|
|
24
24
|
[bold][underline]Examples[/underline][/bold]
|
|
25
25
|
|
|
26
26
|
- Cancel the run with ID [magenta]burrow-123[/magenta] belonging to an app with ID [magenta]hare-app[/magenta].
|
|
27
|
-
$ [
|
|
27
|
+
$ [green]nextmv cloud run cancel --app-id hare-app --run-id burrow-123[/green]
|
|
28
28
|
|
|
29
29
|
- Cancel the run with ID [magenta]burrow-123[/magenta] belonging to an app with ID [magenta]hare-app[/magenta].
|
|
30
30
|
Use the profile named [magenta]hare[/magenta].
|
|
31
|
-
$ [
|
|
31
|
+
$ [green]nextmv cloud run cancel --app-id hare-app --run-id burrow-123 --profile hare[/green]
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
cloud_app = build_app(app_id=app_id, profile=profile)
|