Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Commit 0edf18c

Browse files
authored
Merge branch 'main' into snmp-fix
2 parents 9ac28bc + 4cb91c5 commit 0edf18c

24 files changed

Lines changed: 476 additions & 54 deletions

File tree

docs/source/cli/clients.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ self-signed certificates.
7979

8080
3. Those details can be installed as a secret on CI, or passed down to the final user.
8181

82-
Then the user can create the client using the [jmp client](./reference/jmp-client.md#jmp-client-create-config) CLI:
82+
Then the user can create the client using the [jmp client](./reference/jmp-client.md#jmp-client-config-create) CLI:
8383

8484
```bash
85-
$ jmp client create-config my-client
85+
$ jmp client config create my-client
8686
Enter a valid Jumpstarter service endpoint: devl.jumpstarter.dev
8787
Enter a Jumpstarter auth token (hidden): ***
8888
Enter a comma-separated list of allowed driver packages (optional):

docs/source/config/cli.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,30 +90,30 @@ please follow the instructions in the [Jumpstarter service CLI](../cli/clients.m
9090

9191
Importing a new client is as simple as copying the administrator provided yaml
9292
file to `~/.config/jumpstarter/clients/`, alternatively if we have the token
93-
and endpoint the `jmp client create <name>` command can be used to create
93+
and endpoint the `jmp client config create <name>` command can be used to create
9494
the config file.
9595

96-
To switch between different client configs, use the `jmp client use-config <name>` command:
96+
To switch between different client configs, use the `jmp client config use <name>` command:
9797

9898
```bash
99-
$ jmp client use-config another
99+
$ jmp client config use another
100100
Using client config '/home/jdoe/.config/jumpstarter/clients/another.yaml'
101101
```
102102

103-
All client configurations can be listed with `jmp client list-configs`:
103+
All client configurations can be listed with `jmp client config list`:
104104

105105
```bash
106-
$ jmp client list-configs
106+
$ jmp client config list
107107
CURRENT NAME ENDPOINT PATH
108108
* default jumpstarter1.my-lab.com:1443 /home/jdoe/.config/jumpstarter/clients/default.yaml
109109
myclient jumpstarter2.my-lab.com:1443 /home/jdoe/.config/jumpstarter/clients/myclient.yaml
110110
another jumpstarter3.my-lab.com:1443 /home/jdoe/.config/jumpstarter/clients/another.yaml
111111
```
112112

113-
Clients can also be removed using `jmp client delete-config <name>`:
113+
Clients can also be removed using `jmp client config delete <name>`:
114114

115115
```bash
116-
$ jmp client delete-config myclient
116+
$ jmp client config delete myclient
117117
Deleted client config '/home/jdoe/.config/jumpstarter/clients/myclient.yaml'
118118
```
119119

@@ -201,10 +201,10 @@ please follow the instructions in the [Jumpstarter service CLI](../cli/exporters
201201

202202
### Creating a exporter configuration file
203203
To create a new exporter configuration file from a know endpoint and
204-
token the `jmp exporter create <name>` command can be used.
204+
token the `jmp exporter config create <name>` command can be used.
205205

206206
```bash
207-
$ jmp exporter create myexporter
207+
$ jmp exporter config create myexporter
208208
Endpoint: grpc.jumpstarter.my.domain.com
209209
Token: <<token>>
210210
```
@@ -222,19 +222,19 @@ The path to a config can also be provided:
222222
jmp exporter run -c /etc/jumpstarter/exporters/another/exporter.yaml
223223
```
224224

225-
All exporter configurations can be listed with `jmp exporter list`:
225+
All exporter configurations can be listed with `jmp exporter config list`:
226226

227227
```bash
228-
$ jmp exporter list
228+
$ jmp exporter config list
229229
ALIAS PATH
230230
test-exporter-2 /etc/jumpstarter/exporters/test-exporter-2.yaml
231231
my-exporter /etc/jumpstarter/exporters/my-exporter.yaml
232232
```
233233

234-
Exporers can also be removed using `jmp exporter delete <name>`:
234+
Exporers can also be removed using `jmp exporter config delete <name>`:
235235

236236
```bash
237-
$ jmp exporter delete myexporter
237+
$ jmp exporter config delete myexporter
238238
Deleted exporter config '/etc/jumpstarter/exporters/myexporter.yaml'
239239
```
240240

docs/source/getting-started/setup-exporter-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To edit the config file with your default text editor, run the following command
5656

5757
```bash
5858
# Opens the config for "testing" in your default editor
59-
$ jmp exporter edit-config testing
59+
$ jmp exporter config edit testing
6060
```
6161

6262
Add the `storage` and `power` drivers under the `export` field in the config file.

docs/source/installation/python-package.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ $ alias jmp-client='podman run --rm -it -w /home \
8888
Then you can try:
8989

9090
```bash
91-
$ jmp-client list-configs
91+
$ jmp-client config list
9292
CURRENT NAME ENDPOINT PATH
9393
* default grpc.devel.jumpstarter.dev:443 /root/.config/jumpstarter/clients/default.yaml
9494
test grpc.devel.jumpstarter.dev:443 /root/.config/jumpstarter/clients/test.yaml
@@ -129,4 +129,4 @@ The Jumpstarter packages which can be installed are:
129129
| [`jumpstarter-driver-*`](https://github.com/jumpstarter-dev/jumpstarter/tree/main/packages) | All community and official driver packages that are distributed as part of Jumpstarter are prefixed with `jumpstarter-driver-*`. This includes drivers for PySerial, SD Wire, HTTP, CAN, and more. Driver packages only need to be installed on the exporter/client if they are used by your testing environment. All drivers are optional. |
130130
| [`jumpstarter-adapter-*`](https://github.com/jumpstarter-dev/jumpstarter/tree/main/packages) | All community and official adapter packages that are distributed as part of Jumpstarter are prefixed with `jumpstarter-adapter-*`. This includes adapters to redirect streams to local ports, unix sockets, perform ssh connections, etc. |
131131
| [`jumpstarter-imagehash`](https://github.com/jumpstarter-dev/jumpstarter/tree/main/packages/jumpstarter-imagehash) | A library to perform image checking from video inputs using the simple python imagehash library |
132-
| [`jumpstarter-testing`](https://github.com/jumpstarter-dev/jumpstarter/tree/main/packages/jumpstarter-testing) | Testing tools for writing Jumpstarter-powered tests with `pytest`.|
132+
| [`jumpstarter-testing`](https://github.com/jumpstarter-dev/jumpstarter/tree/main/packages/jumpstarter-testing) | Testing tools for writing Jumpstarter-powered tests with `pytest`.|

packages/jumpstarter-cli-client/jumpstarter_cli_client/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from jumpstarter_cli_common import AliasedGroup, opt_log_level, version
77
from jumpstarter_cli_common.exceptions import handle_exceptions
88

9-
from .client_config import create_client_config, delete_client_config, list_client_configs, use_client_config
109
from .client_exporter import list_client_exporters
1110
from .client_lease import client_lease
1211
from .client_login import client_login
1312
from .client_shell import client_shell
13+
from .config import config
1414
from jumpstarter.common.utils import env
1515

1616

@@ -38,11 +38,8 @@ def cli():
3838
sys.exit(1)
3939

4040

41-
client.add_command(create_client_config)
42-
client.add_command(delete_client_config)
43-
client.add_command(list_client_configs)
4441
client.add_command(list_client_exporters)
45-
client.add_command(use_client_config)
42+
client.add_command(config)
4643
client.add_command(client_lease)
4744
client.add_command(client_login)
4845
client.add_command(client_shell)

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_exporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def list_client_exporters(name: str | None, labels: list[(str, str)], output: Ou
2020
config = UserConfigV1Alpha1.load_or_create().config.current_client
2121
if not config:
2222
raise click.BadParameter(
23-
"no client specified, and no default client set: specify a client name, or use jmp client use-config ",
23+
"no client specified, and no default client set: specify a client name, or use jmp client config use",
2424
param_hint="name",
2525
)
2626

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_lease.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def lease_release(name, lease, all_leases):
4242
config = UserConfigV1Alpha1.load_or_create().config.current_client
4343
if not config:
4444
raise click.BadParameter(
45-
"no client specified, and no default client set: specify a client name, or use jmp client use-config ",
45+
"no client specified, and no default client set: specify a client name, or use jmp client config use",
4646
param_hint="name",
4747
)
4848

@@ -89,7 +89,7 @@ def lease_request(name, labels):
8989
config = UserConfigV1Alpha1.load_or_create().config.current_client
9090
if not config:
9191
raise click.BadParameter(
92-
"no client specified, and no default client set: specify a client name, or use jmp client use-config ",
92+
"no client specified, and no default client set: specify a client name, or use jmp client config use",
9393
param_hint="name",
9494
)
9595
lease = config.request_lease(metadata_filter=MetadataFilter(labels=dict(labels)))

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def client_shell(name: str, labels, lease_name):
2424
config = UserConfigV1Alpha1.load_or_create().config.current_client
2525
if not config:
2626
raise click.BadParameter(
27-
"no client specified, and no default client set: specify a client name, or use jmp client use-config ",
27+
"no client specified, and no default client set: specify a client name, or use jmp client config use",
2828
param_hint="name",
2929
)
3030

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_test.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ async def test_client():
1212
result = await runner.invoke(
1313
client,
1414
[
15-
"create-config",
15+
"config",
16+
"create",
1617
"test1",
1718
"--namespace",
1819
"default",
@@ -32,7 +33,8 @@ async def test_client():
3233
result = await runner.invoke(
3334
client,
3435
[
35-
"create-config",
36+
"config",
37+
"create",
3638
"test1",
3739
"--namespace",
3840
"default",
@@ -51,33 +53,33 @@ async def test_client():
5153
# create client interactively
5254
result = await runner.invoke(
5355
client,
54-
["create-config", "test2"],
56+
["config", "create", "test2"],
5557
input="default\ntest2\nexample.org:443\ndummytoken\njumpstarter.*,com.example.*\n",
5658
)
5759
assert result.exit_code == 0
5860

5961
# list clients
60-
result = await runner.invoke(client, ["list-configs"])
62+
result = await runner.invoke(client, ["config", "list"])
6163
assert result.exit_code == 0
6264
assert "* test1 example.com:443" in result.output
6365
assert " test2 example.org:443" in result.output
6466

6567
# set default client
66-
result = await runner.invoke(client, ["use-config", "test2"])
68+
result = await runner.invoke(client, ["config", "use", "test2"])
6769
assert result.exit_code == 0
6870

6971
# list clients
70-
result = await runner.invoke(client, ["list-configs"])
72+
result = await runner.invoke(client, ["config", "list"])
7173
assert result.exit_code == 0
7274
assert " test1 example.com:443" in result.output
7375
assert "* test2 example.org:443" in result.output
7476

7577
# delete default client
76-
result = await runner.invoke(client, ["delete-config", "test2"])
78+
result = await runner.invoke(client, ["config", "delete", "test2"])
7779
assert result.exit_code == 0
7880

7981
# list clients
80-
result = await runner.invoke(client, ["list-configs"])
82+
result = await runner.invoke(client, ["config", "list"])
8183
assert result.exit_code == 0
8284
assert "* test1 example.com:443" in result.output
8385
assert "* test2 example.org:443" not in result.output

packages/jumpstarter-cli-client/jumpstarter_cli_client/client_config.py renamed to packages/jumpstarter-cli-client/jumpstarter_cli_client/config.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020
)
2121

2222

23-
@click.command("create-config", short_help="Create a client config.")
23+
@click.group()
24+
def config():
25+
"""
26+
Modify jumpstarter client config files
27+
"""
28+
29+
30+
@config.command("create", short_help="Create a client config.")
2431
@click.argument("alias")
2532
@click.option(
2633
"--out",
@@ -115,7 +122,7 @@ def set_next_client(name: str):
115122
user_config.use_client(None)
116123

117124

118-
@click.command("delete-config", short_help="Delete a client config.")
125+
@config.command("delete", short_help="Delete a client config.")
119126
@click.argument("name", type=str)
120127
@opt_output_path_only
121128
@handle_exceptions
@@ -127,7 +134,7 @@ def delete_client_config(name: str, output: PathOutputType):
127134
click.echo(path)
128135

129136

130-
@click.command("list-configs", short_help="List available client configurations.")
137+
@config.command("list", short_help="List available client configurations.")
131138
@opt_output_all
132139
@handle_exceptions
133140
def list_client_configs(output: OutputType):
@@ -161,7 +168,7 @@ def make_row(c: ClientConfigV1Alpha1):
161168
click.echo(make_table(columns, rows))
162169

163170

164-
@click.command("use-config", short_help="Select the current client config.")
171+
@config.command("use", short_help="Select the current client config.")
165172
@click.argument("name", type=str)
166173
@opt_output_path_only
167174
@handle_exceptions

0 commit comments

Comments
 (0)