Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion onekey_client/cli/firmware_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@
@click.option(
"--sbom", help="Firmware SBOM", type=click.Path(exists=True, path_type=Path)
)
@click.option(
"--enable-monitoring",
is_flag=True,
default=False,
show_default=True,
help="Enable the monitoring for the uploaded firmware"
)
@click.option(
"--timeout",
default=60,
show_default=True,
help="Define the timeout (in s) for uploading the image"
)
@click.argument(
"filename", type=click.Path(exists=True, path_type=Path), required=False
)
Expand All @@ -48,6 +61,8 @@ def upload_firmware(
version: str | None,
name: str | None,
sbom: Path | None,
enable_monitoring : bool | False,
timeout: int | 60,
filename: Path | None,
):
"""Upload a firmware / SBOM to the ONEKEY platform."""
Expand Down Expand Up @@ -79,7 +94,7 @@ def upload_firmware(

try:
res = client.upload_firmware(
metadata, filename, sbom_path=sbom, enable_monitoring=False
metadata, filename, sbom_path=sbom, enable_monitoring=enable_monitoring, timeout=timeout
)
click.echo(res["id"])
except QueryError as e:
Expand Down