From 3e478c9b5b12a09d097e1c2a21088de72a6a061e Mon Sep 17 00:00:00 2001 From: "oxide-reflector-bot[bot]" <130185838+oxide-reflector-bot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:28:54 -0800 Subject: [PATCH] Bump dependencies, progenitor to 69158f7d, oxide.json to omicron:c9ade9dc (#916) --- Cargo.lock | 20 +++++------ cli/docs/cli.json | 8 +++++ cli/src/generated_cli.rs | 22 ++++++++++++ oxide.json | 28 ++++++++++++--- sdk/src/generated_sdk.rs | 75 ++++++++++++++++++++++++++++++++++++---- 5 files changed, 132 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 73127994..0367bc94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,7 +1514,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.7", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -2226,7 +2226,7 @@ version = "5.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23d385da3c602d29036d2f70beed71c36604df7570be17fed4c5b839616785bf" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "chrono", "getrandom", "http 1.1.0", @@ -2668,7 +2668,7 @@ dependencies = [ [[package]] name = "progenitor" version = "0.8.0" -source = "git+https://github.com/oxidecomputer/progenitor#dfc6e0f2ab9f407e927be791c4fa57cf4e0c1549" +source = "git+https://github.com/oxidecomputer/progenitor#69158f7dc1424d2f7d416be5dc2a5d18dfd83bf4" dependencies = [ "progenitor-client 0.8.0 (git+https://github.com/oxidecomputer/progenitor)", "progenitor-impl", @@ -2693,7 +2693,7 @@ dependencies = [ [[package]] name = "progenitor-client" version = "0.8.0" -source = "git+https://github.com/oxidecomputer/progenitor#dfc6e0f2ab9f407e927be791c4fa57cf4e0c1549" +source = "git+https://github.com/oxidecomputer/progenitor#69158f7dc1424d2f7d416be5dc2a5d18dfd83bf4" dependencies = [ "bytes", "futures-core", @@ -2707,7 +2707,7 @@ dependencies = [ [[package]] name = "progenitor-impl" version = "0.8.0" -source = "git+https://github.com/oxidecomputer/progenitor#dfc6e0f2ab9f407e927be791c4fa57cf4e0c1549" +source = "git+https://github.com/oxidecomputer/progenitor#69158f7dc1424d2f7d416be5dc2a5d18dfd83bf4" dependencies = [ "heck", "http 1.1.0", @@ -2728,7 +2728,7 @@ dependencies = [ [[package]] name = "progenitor-macro" version = "0.8.0" -source = "git+https://github.com/oxidecomputer/progenitor#dfc6e0f2ab9f407e927be791c4fa57cf4e0c1549" +source = "git+https://github.com/oxidecomputer/progenitor#69158f7dc1424d2f7d416be5dc2a5d18dfd83bf4" dependencies = [ "openapiv3", "proc-macro2", @@ -4053,7 +4053,7 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typify" version = "0.2.0" -source = "git+https://github.com/oxidecomputer/typify#a1986aaa2275bc71ee4f660c9ddf82d6aa29caca" +source = "git+https://github.com/oxidecomputer/typify#66dda53814434f544ec6f47b04ea4bc1b8dc37df" dependencies = [ "typify-impl", "typify-macro", @@ -4062,7 +4062,7 @@ dependencies = [ [[package]] name = "typify-impl" version = "0.2.0" -source = "git+https://github.com/oxidecomputer/typify#a1986aaa2275bc71ee4f660c9ddf82d6aa29caca" +source = "git+https://github.com/oxidecomputer/typify#66dda53814434f544ec6f47b04ea4bc1b8dc37df" dependencies = [ "heck", "log", @@ -4081,7 +4081,7 @@ dependencies = [ [[package]] name = "typify-macro" version = "0.2.0" -source = "git+https://github.com/oxidecomputer/typify#a1986aaa2275bc71ee4f660c9ddf82d6aa29caca" +source = "git+https://github.com/oxidecomputer/typify#66dda53814434f544ec6f47b04ea4bc1b8dc37df" dependencies = [ "proc-macro2", "quote", @@ -4397,7 +4397,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/cli/docs/cli.json b/cli/docs/cli.json index 83853c27..61199c3e 100644 --- a/cli/docs/cli.json +++ b/cli/docs/cli.json @@ -2140,6 +2140,14 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "memory", + "help": "The amount of memory to assign to this instance.; unit suffixes are in powers of two (1k = 1024 bytes) for example: 6GiB, 512k, 2048mib" + }, + { + "long": "ncpus", + "help": "The number of CPUs to assign to this instance." + }, { "long": "profile", "help": "Configuration profile to use for commands", diff --git a/cli/src/generated_cli.rs b/cli/src/generated_cli.rs index 605f97ee..b5dcf11a 100644 --- a/cli/src/generated_cli.rs +++ b/cli/src/generated_cli.rs @@ -1587,6 +1587,20 @@ impl Cli { .required(true) .help("Name or ID of the instance"), ) + .arg( + clap::Arg::new("memory") + .long("memory") + .value_parser(clap::value_parser!(types::ByteCount)) + .required_unless_present("json-body") + .help("The amount of memory to assign to this instance."), + ) + .arg( + clap::Arg::new("ncpus") + .long("ncpus") + .value_parser(clap::value_parser!(types::InstanceCpuCount)) + .required_unless_present("json-body") + .help("The number of CPUs to assign to this instance."), + ) .arg( clap::Arg::new("project") .long("project") @@ -8253,6 +8267,14 @@ impl Cli { request = request.instance(value.clone()); } + if let Some(value) = matches.get_one::("memory") { + request = request.body_map(|body| body.memory(value.clone())) + } + + if let Some(value) = matches.get_one::("ncpus") { + request = request.body_map(|body| body.ncpus(value.clone())) + } + if let Some(value) = matches.get_one::("project") { request = request.project(value.clone()); } diff --git a/oxide.json b/oxide.json index a272b916..79186e37 100644 --- a/oxide.json +++ b/oxide.json @@ -13217,7 +13217,7 @@ "type": "object", "properties": { "private_key": { - "description": "request signing private key (base64 encoded der file)", + "description": "request signing RSA private key in PKCS#1 format (base64 encoded der file)", "type": "string" }, "public_cert": { @@ -16491,8 +16491,28 @@ "$ref": "#/components/schemas/NameOrId" } ] + }, + "memory": { + "description": "The amount of memory to assign to this instance.", + "allOf": [ + { + "$ref": "#/components/schemas/ByteCount" + } + ] + }, + "ncpus": { + "description": "The number of CPUs to assign to this instance.", + "allOf": [ + { + "$ref": "#/components/schemas/InstanceCpuCount" + } + ] } - } + }, + "required": [ + "memory", + "ncpus" + ] }, "InternetGateway": { "description": "An internet gateway provides a path between VPC networks and external networks.", @@ -17167,7 +17187,7 @@ }, "fec": { "nullable": true, - "description": "The forward error correction mode of the link.", + "description": "The requested forward-error correction method. If this is not specified, the standard FEC for the underlying media will be applied if it can be determined.", "allOf": [ { "$ref": "#/components/schemas/LinkFec" @@ -20411,7 +20431,7 @@ }, "fec": { "nullable": true, - "description": "The forward error correction mode of the link.", + "description": "The requested forward-error correction method. If this is not specified, the standard FEC for the underlying media will be applied if it can be determined.", "allOf": [ { "$ref": "#/components/schemas/LinkFec" diff --git a/sdk/src/generated_sdk.rs b/sdk/src/generated_sdk.rs index 3ace96d8..1e9b09ff 100644 --- a/sdk/src/generated_sdk.rs +++ b/sdk/src/generated_sdk.rs @@ -5946,8 +5946,8 @@ pub mod types { /// ], /// "properties": { /// "private_key": { - /// "description": "request signing private key (base64 encoded der - /// file)", + /// "description": "request signing RSA private key in PKCS#1 format + /// (base64 encoded der file)", /// "type": "string" /// }, /// "public_cert": { @@ -5963,7 +5963,8 @@ pub mod types { :: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, schemars :: JsonSchema, )] pub struct DerEncodedKeyPair { - /// request signing private key (base64 encoded der file) + /// request signing RSA private key in PKCS#1 format (base64 encoded der + /// file) pub private_key: String, /// request signing public certificate (base64 encoded der file) pub public_cert: String, @@ -13021,6 +13022,10 @@ pub mod types { /// "description": "Parameters of an `Instance` that can be reconfigured /// after creation.", /// "type": "object", + /// "required": [ + /// "memory", + /// "ncpus" + /// ], /// "properties": { /// "auto_restart_policy": { /// "description": "Sets the auto-restart policy for this @@ -13063,6 +13068,22 @@ pub mod types { /// ] /// } /// ] + /// }, + /// "memory": { + /// "description": "The amount of memory to assign to this instance.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "ncpus": { + /// "description": "The number of CPUs to assign to this instance.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceCpuCount" + /// } + /// ] /// } /// } /// } @@ -13094,6 +13115,10 @@ pub mod types { /// If not provided, unset the instance's boot disk. #[serde(default, skip_serializing_if = "Option::is_none")] pub boot_disk: Option, + /// The amount of memory to assign to this instance. + pub memory: ByteCount, + /// The number of CPUs to assign to this instance. + pub ncpus: InstanceCpuCount, } impl From<&InstanceUpdate> for InstanceUpdate { @@ -15020,7 +15045,9 @@ pub mod types { /// "type": "boolean" /// }, /// "fec": { - /// "description": "The forward error correction mode of the link.", + /// "description": "The requested forward-error correction method. If + /// this is not specified, the standard FEC for the underlying media will be + /// applied if it can be determined.", /// "oneOf": [ /// { /// "type": "null" @@ -15082,7 +15109,9 @@ pub mod types { pub struct LinkConfigCreate { /// Whether or not to set autonegotiation pub autoneg: bool, - /// The forward error correction mode of the link. + /// The requested forward-error correction method. If this is not + /// specified, the standard FEC for the underlying media will be applied + /// if it can be determined. #[serde(default, skip_serializing_if = "Option::is_none")] pub fec: Option, /// The link-layer discovery protocol (LLDP) configuration for the link. @@ -23673,7 +23702,9 @@ pub mod types { /// "type": "boolean" /// }, /// "fec": { - /// "description": "The forward error correction mode of the link.", + /// "description": "The requested forward-error correction method. If + /// this is not specified, the standard FEC for the underlying media will be + /// applied if it can be determined.", /// "oneOf": [ /// { /// "type": "null" @@ -23738,7 +23769,9 @@ pub mod types { pub struct SwitchPortLinkConfig { /// Whether or not the link has autonegotiation enabled. pub autoneg: bool, - /// The forward error correction mode of the link. + /// The requested forward-error correction method. If this is not + /// specified, the standard FEC for the underlying media will be applied + /// if it can be determined. #[serde(default, skip_serializing_if = "Option::is_none")] pub fec: Option, /// The name of this link. @@ -37205,6 +37238,8 @@ pub mod types { pub struct InstanceUpdate { auto_restart_policy: Result, String>, boot_disk: Result, String>, + memory: Result, + ncpus: Result, } impl Default for InstanceUpdate { @@ -37212,6 +37247,8 @@ pub mod types { Self { auto_restart_policy: Ok(Default::default()), boot_disk: Ok(Default::default()), + memory: Err("no value supplied for memory".to_string()), + ncpus: Err("no value supplied for ncpus".to_string()), } } } @@ -37240,6 +37277,26 @@ pub mod types { .map_err(|e| format!("error converting supplied value for boot_disk: {}", e)); self } + pub fn memory(mut self, value: T) -> Self + where + T: std::convert::TryInto, + T::Error: std::fmt::Display, + { + self.memory = value + .try_into() + .map_err(|e| format!("error converting supplied value for memory: {}", e)); + self + } + pub fn ncpus(mut self, value: T) -> Self + where + T: std::convert::TryInto, + T::Error: std::fmt::Display, + { + self.ncpus = value + .try_into() + .map_err(|e| format!("error converting supplied value for ncpus: {}", e)); + self + } } impl std::convert::TryFrom for super::InstanceUpdate { @@ -37248,6 +37305,8 @@ pub mod types { Ok(Self { auto_restart_policy: value.auto_restart_policy?, boot_disk: value.boot_disk?, + memory: value.memory?, + ncpus: value.ncpus?, }) } } @@ -37257,6 +37316,8 @@ pub mod types { Self { auto_restart_policy: Ok(value.auto_restart_policy), boot_disk: Ok(value.boot_disk), + memory: Ok(value.memory), + ncpus: Ok(value.ncpus), } } }