Skip to content

Commit

Permalink
Allow user to select threads for image upload (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
leftwo authored Oct 30, 2024
1 parent 8fe6ebf commit 6d53a72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cli/docs/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,10 @@
"long": "image-version",
"help": "The version of this image (e.g. 11, focal, a9e77e3a, 2023-04-06T14:23:34Z)"
},
{
"long": "parallelism",
"help": "The degree or parallelism to use during upload"
},
{
"long": "path",
"help": "Path to the file to import"
Expand Down
6 changes: 5 additions & 1 deletion cli/src/cmd_disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ pub struct CmdDiskImport {
/// The version of this image (e.g. 11, focal, a9e77e3a, 2023-04-06T14:23:34Z)
#[clap(long, requires_all = ["snapshot", "image", "image_description", "image_os"])]
image_version: Option<String>,

/// The degree or parallelism to use during upload
#[clap(long, default_value = "8", hide = true)]
parallelism: usize,
}

#[async_trait]
Expand All @@ -97,7 +101,7 @@ impl crate::AuthenticatedCmd for CmdDiskImport {
.disk_import()
.project(self.project.clone())
.description(self.description.clone())
.upload_thread_ct(8)
.upload_thread_ct(self.parallelism)
.disk(self.disk.clone())
.disk_info(disk_info.clone());

Expand Down

0 comments on commit 6d53a72

Please sign in to comment.