Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions cli/docs/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3400,6 +3400,14 @@
"name": "from-image",
"about": "Launch an instance from a disk image.",
"args": [
{
"long": "anti-affinity-group",
"help": "Anti-affinity group(s) to add the instance to (may be specified multiple times)"
},
{
"long": "cpu-platform",
"help": "CPU platform to place the instance"
},
{
"long": "description",
"help": "Description of the instance"
Expand Down
14 changes: 12 additions & 2 deletions cli/src/cmd_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use anyhow::Result;
use async_trait::async_trait;
use clap::Parser;
use oxide::types::{
ByteCount, DiskBackend, DiskSource, ExternalIpCreate, InstanceCpuCount, InstanceDiskAttachment,
IpVersion, Name, NameOrId, PoolSelector,
ByteCount, DiskBackend, DiskSource, ExternalIpCreate, InstanceCpuCount, InstanceCpuPlatform,
InstanceDiskAttachment, IpVersion, Name, NameOrId, PoolSelector,
};

use oxide::ClientInstancesExt;
Expand Down Expand Up @@ -237,6 +237,14 @@ pub struct CmdInstanceFromImage {
#[clap(long)]
ncpus: InstanceCpuCount,

/// CPU platform to place the instance
#[clap(long)]
cpu_platform: Option<InstanceCpuPlatform>,

/// Anti-affinity group(s) to add the instance to (may be specified multiple times)
#[clap(long = "anti-affinity-group")]
anti_affinity_groups: Vec<NameOrId>,

/// Source image
#[clap(long)]
image: NameOrId,
Expand Down Expand Up @@ -286,6 +294,8 @@ impl crate::AuthenticatedCmd for CmdInstanceFromImage {
.hostname(self.hostname.clone())
.memory(self.memory.clone())
.ncpus(self.ncpus.clone())
.cpu_platform(self.cpu_platform)
.anti_affinity_groups(self.anti_affinity_groups.clone())
.start(self.start)
})
.send()
Expand Down
Loading