Skip to content

Commit 0d7320e

Browse files
committed
update for ip_version field
1 parent 1beed5d commit 0d7320e

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

cli/docs/cli.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,6 +2330,14 @@
23302330
"long": "ip",
23312331
"help": "An IP address to reserve for use as a floating IP. This field is optional: when not set, an address will be automatically chosen from `pool`. If set, then the IP must be available in the resolved `pool`."
23322332
},
2333+
{
2334+
"long": "ip-version",
2335+
"values": [
2336+
"v4",
2337+
"v6"
2338+
],
2339+
"help": "IP version to use when allocating from the default pool. Only used when both `ip` and `pool` are not specified. Required if multiple default pools of different IP versions exist. Allocation fails if no pool of the requested version is available."
2340+
},
23332341
{
23342342
"long": "json-body",
23352343
"help": "Path to a file that contains the full json body."
@@ -3145,6 +3153,14 @@
31453153
"long": "instance",
31463154
"help": "Name or ID of the instance"
31473155
},
3156+
{
3157+
"long": "ip-version",
3158+
"values": [
3159+
"v4",
3160+
"v6"
3161+
],
3162+
"help": "IP version to use when allocating from the default pool. Only used when `pool` is not specified. Required if multiple default pools of different IP versions exist. Allocation fails if no pool of the requested version is available."
3163+
},
31483164
{
31493165
"long": "json-body",
31503166
"help": "Path to a file that contains the full json body."
@@ -4470,7 +4486,7 @@
44704486
"true",
44714487
"false"
44724488
],
4473-
"help": "When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo."
4489+
"help": "When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified.\n\nA silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total."
44744490
},
44754491
{
44764492
"long": "json-body",
@@ -4548,7 +4564,7 @@
45484564
"true",
45494565
"false"
45504566
],
4551-
"help": "When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo, so when a pool is made default, an existing default will remain linked but will no longer be the default."
4567+
"help": "When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified.\n\nA silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. When a pool is made default, an existing default of the same type and version will remain linked but will no longer be the default."
45524568
},
45534569
{
45544570
"long": "json-body",

cli/src/cmd_instance.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use async_trait::async_trait;
99
use clap::Parser;
1010
use oxide::types::{
1111
ByteCount, DiskBackend, DiskSource, ExternalIpCreate, InstanceCpuCount, InstanceDiskAttachment,
12-
Name, NameOrId,
12+
IpVersion, Name, NameOrId,
1313
};
1414

1515
use oxide::ClientInstancesExt;
@@ -277,7 +277,10 @@ impl crate::AuthenticatedCmd for CmdInstanceFromImage {
277277
.expect("valid disk name"),
278278
size: self.size.clone(),
279279
})
280-
.external_ips(vec![ExternalIpCreate::Ephemeral { pool: None }])
280+
.external_ips(vec![ExternalIpCreate::Ephemeral {
281+
ip_version: Some(IpVersion::V4),
282+
pool: None,
283+
}])
281284
.hostname(self.hostname.clone())
282285
.memory(self.memory.clone())
283286
.ncpus(self.ncpus.clone())

0 commit comments

Comments
 (0)