From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 406FD1FF191 for ; Tue, 21 Oct 2025 15:50:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 789B61FC92; Tue, 21 Oct 2025 15:50:57 +0200 (CEST) From: Hannes Laimer To: pdm-devel@lists.proxmox.com Date: Tue, 21 Oct 2025 15:50:17 +0200 Message-ID: <20251021135018.88877-4-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251021135018.88877-1-h.laimer@proxmox.com> References: <20251021135018.88877-1-h.laimer@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761054614258 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.043 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH proxmox 3/3] pve-api-types: regenerate X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Signed-off-by: Hannes Laimer --- pve-api-types/src/generated/code.rs | 2 +- pve-api-types/src/generated/types.rs | 335 ++++++++++++++------------- 2 files changed, 173 insertions(+), 164 deletions(-) diff --git a/pve-api-types/src/generated/code.rs b/pve-api-types/src/generated/code.rs index 8b3c6696..788e4bf5 100644 --- a/pve-api-types/src/generated/code.rs +++ b/pve-api-types/src/generated/code.rs @@ -900,7 +900,7 @@ where .maybe_arg("since", &p_since) .maybe_arg("source", &p_source) .maybe_arg("start", &p_start) - .maybe_arg("statusfilter", &p_statusfilter) + .maybe_list_arg("statusfilter", &p_statusfilter) .maybe_arg("typefilter", &p_typefilter) .maybe_arg("until", &p_until) .maybe_arg("userfilter", &p_userfilter) diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs index 98cb012b..66177998 100644 --- a/pve-api-types/src/generated/types.rs +++ b/pve-api-types/src/generated/types.rs @@ -1027,9 +1027,13 @@ fn test_regex_compilation_5() { type: String, }, "isis-ifaces": { - format: &ApiStringFormat::Pattern(&CREATE_CONTROLLER_ISIS_IFACES_RE), + items: { + description: "List item of type pve-iface.", + format: &ApiStringFormat::Pattern(&CREATE_CONTROLLER_ISIS_IFACES_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, "isis-net": { format: &ApiStringFormat::Pattern(&CREATE_CONTROLLER_ISIS_NET_RE), @@ -1050,9 +1054,13 @@ fn test_regex_compilation_5() { type: String, }, peers: { - format: &ApiStringFormat::VerifyFn(verifiers::verify_ip), + items: { + description: "List item of type ip.", + format: &ApiStringFormat::VerifyFn(verifiers::verify_ip), + type: String, + }, optional: true, - type: String, + type: Array, }, type: { type: ListControllersType, @@ -1099,7 +1107,7 @@ pub struct CreateController { /// Comma-separated list of interfaces where IS-IS should be active. #[serde(default, skip_serializing_if = "Option::is_none")] #[serde(rename = "isis-ifaces")] - pub isis_ifaces: Option, + pub isis_ifaces: Option>, /// Network Entity title for this node in the IS-IS network. #[serde(default, skip_serializing_if = "Option::is_none")] @@ -1121,7 +1129,7 @@ pub struct CreateController { /// peers address list. #[serde(default, skip_serializing_if = "Option::is_none")] - pub peers: Option, + pub peers: Option>, #[serde(rename = "type")] pub ty: ListControllersType, @@ -1381,9 +1389,13 @@ fn test_regex_compilation_6() { type: Integer, }, exitnodes: { - format: &ApiStringFormat::Pattern(&CREATE_ZONE_EXITNODES_RE), + items: { + description: "List item of type pve-node.", + format: &ApiStringFormat::Pattern(&CREATE_ZONE_EXITNODES_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, "exitnodes-local-routing": { default: false, @@ -1417,23 +1429,35 @@ fn test_regex_compilation_6() { type: Integer, }, nodes: { - format: &ApiStringFormat::Pattern(&CREATE_ZONE_NODES_RE), + items: { + description: "List item of type pve-node.", + format: &ApiStringFormat::Pattern(&CREATE_ZONE_NODES_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, peers: { - format: &ApiStringFormat::VerifyFn(verifiers::verify_ip), + items: { + description: "List item of type ip.", + format: &ApiStringFormat::VerifyFn(verifiers::verify_ip), + type: String, + }, optional: true, - type: String, + type: Array, }, reversedns: { optional: true, type: String, }, "rt-import": { - format: &ApiStringFormat::VerifyFn(verifiers::verify_sdn_bgp_rt), + items: { + description: "List item of type pve-sdn-bgp-rt.", + format: &ApiStringFormat::VerifyFn(verifiers::verify_sdn_bgp_rt), + type: String, + }, optional: true, - type: String, + type: Array, }, tag: { minimum: 0, @@ -1515,7 +1539,7 @@ pub struct CreateZone { /// List of cluster node names. #[serde(default, skip_serializing_if = "Option::is_none")] - pub exitnodes: Option, + pub exitnodes: Option>, /// Allow exitnodes to connect to EVPN guests. #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] @@ -1552,12 +1576,12 @@ pub struct CreateZone { /// List of cluster node names. #[serde(default, skip_serializing_if = "Option::is_none")] - pub nodes: Option, + pub nodes: Option>, /// Comma-separated list of peers, that are part of the VXLAN zone. Usually /// the IPs of the nodes. #[serde(default, skip_serializing_if = "Option::is_none")] - pub peers: Option, + pub peers: Option>, /// reverse dns api server #[serde(default, skip_serializing_if = "Option::is_none")] @@ -1566,7 +1590,7 @@ pub struct CreateZone { /// List of Route Targets that should be imported into the VRF of the zone. #[serde(default, skip_serializing_if = "Option::is_none")] #[serde(rename = "rt-import")] - pub rt_import: Option, + pub rt_import: Option>, /// Service-VLAN Tag (outer VLAN) #[serde(deserialize_with = "proxmox_serde::perl::deserialize_u64")] @@ -1610,101 +1634,6 @@ pub enum IsRunning { serde_plain::derive_display_from_serialize!(IsRunning); serde_plain::derive_fromstr_from_deserialize!(IsRunning); -const LIST_STORAGES_CONTENT: Schema = - proxmox_schema::ArraySchema::new("list", &StorageContent::API_SCHEMA).schema(); - -mod list_storages_content { - use serde::{Deserialize, Deserializer, Serialize, Serializer}; - - #[doc(hidden)] - pub trait Ser: Sized { - fn ser(&self, serializer: S) -> Result; - fn de<'de, D>(deserializer: D) -> Result - where - D: Deserializer<'de>; - } - - impl Deserialize<'a>> Ser for Vec { - fn ser(&self, serializer: S) -> Result - where - S: Serializer, - { - super::stringlist::serialize(&self[..], serializer, &super::LIST_STORAGES_CONTENT) - } - - fn de<'de, D>(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - super::stringlist::deserialize(deserializer, &super::LIST_STORAGES_CONTENT) - } - } - - impl Ser for Option { - fn ser(&self, serializer: S) -> Result - where - S: Serializer, - { - match self { - None => serializer.serialize_none(), - Some(inner) => inner.ser(serializer), - } - } - - fn de<'de, D>(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - use std::fmt; - use std::marker::PhantomData; - - struct V(PhantomData); - - impl<'de, T: Ser> serde::de::Visitor<'de> for V { - type Value = Option; - - fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("an optional string") - } - - fn visit_none(self) -> Result { - Ok(None) - } - - fn visit_some(self, deserializer: D) -> Result - where - D: Deserializer<'de>, - { - T::de(deserializer).map(Some) - } - - fn visit_str(self, value: &str) -> Result { - use serde::de::IntoDeserializer; - T::de(value.into_deserializer()).map(Some) - } - } - - deserializer.deserialize_option(V::(PhantomData)) - } - } - - pub fn serialize(this: &T, serializer: S) -> Result - where - S: serde::Serializer, - T: Ser, - { - this.ser(serializer) - } - - pub fn deserialize<'de, T, D>(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - T: Ser, - { - T::de(deserializer) - } -} - #[api] /// Only list sdn controllers of specific type #[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)] @@ -1864,9 +1793,13 @@ fn test_regex_compilation_7() { type: Integer, }, statusfilter: { - format: &ApiStringFormat::Pattern(&LIST_TASKS_STATUSFILTER_RE), + items: { + description: "List item of type pve-task-status-type.", + format: &ApiStringFormat::Pattern(&LIST_TASKS_STATUSFILTER_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, typefilter: { optional: true, @@ -1916,7 +1849,7 @@ pub struct ListTasks { /// List of Task States that should be returned. #[serde(default, skip_serializing_if = "Option::is_none")] - pub statusfilter: Option, + pub statusfilter: Option>, /// Only list tasks of this type (e.g., vzstart, vzdump). #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3450,6 +3383,7 @@ pub struct LxcStatus { const_regex! { MIGRATE_LXC_TARGET_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##; +MIGRATE_LXC_TARGET_STORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9]):(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|1$"##; } @@ -3457,6 +3391,7 @@ MIGRATE_LXC_TARGET_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##; fn test_regex_compilation_12() { use regex::Regex; let _: &Regex = &MIGRATE_LXC_TARGET_RE; + let _: &Regex = &MIGRATE_LXC_TARGET_STORAGE_RE; } #[api( properties: { @@ -3477,9 +3412,13 @@ fn test_regex_compilation_12() { type: String, }, "target-storage": { - format: &ApiStringFormat::VerifyFn(verifiers::verify_storage_pair), + items: { + description: "List item of type storage-pair.", + format: &ApiStringFormat::Pattern(&MIGRATE_LXC_TARGET_STORAGE_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, timeout: { default: 180, @@ -3514,7 +3453,7 @@ pub struct MigrateLxc { /// '1' will map each source storage to itself. #[serde(default, skip_serializing_if = "Option::is_none")] #[serde(rename = "target-storage")] - pub target_storage: Option, + pub target_storage: Option>, /// Timeout in seconds for shutdown for restart migration #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")] @@ -3525,6 +3464,7 @@ pub struct MigrateLxc { const_regex! { MIGRATE_QEMU_TARGET_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##; +MIGRATE_QEMU_TARGETSTORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9]):(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|1$"##; } @@ -3532,6 +3472,7 @@ MIGRATE_QEMU_TARGET_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##; fn test_regex_compilation_13() { use regex::Regex; let _: &Regex = &MIGRATE_QEMU_TARGET_RE; + let _: &Regex = &MIGRATE_QEMU_TARGETSTORAGE_RE; } #[api( properties: { @@ -3562,9 +3503,13 @@ fn test_regex_compilation_13() { type: String, }, targetstorage: { - format: &ApiStringFormat::VerifyFn(verifiers::verify_storage_pair), + items: { + description: "List item of type storage-pair.", + format: &ApiStringFormat::Pattern(&MIGRATE_QEMU_TARGETSTORAGE_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, "with-conntrack-state": { default: false, @@ -3609,7 +3554,7 @@ pub struct MigrateQemu { /// ID maps all source storages to that storage. Providing the special value /// '1' will map each source storage to itself. #[serde(default, skip_serializing_if = "Option::is_none")] - pub targetstorage: Option, + pub targetstorage: Option>, /// Whether to migrate conntrack entries for running VMs. #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] @@ -9762,6 +9707,19 @@ pub struct ReloadSdn { pub release_lock: Option, } +const_regex! { + +REMOTE_MIGRATE_LXC_TARGET_BRIDGE_RE = r##"^[-_.\w\d]+:[-_.\w\d]+|[-_.\w\d]+|1$"##; +REMOTE_MIGRATE_LXC_TARGET_STORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9]):(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|1$"##; + +} + +#[test] +fn test_regex_compilation_26() { + use regex::Regex; + let _: &Regex = &REMOTE_MIGRATE_LXC_TARGET_BRIDGE_RE; + let _: &Regex = &REMOTE_MIGRATE_LXC_TARGET_STORAGE_RE; +} #[api( properties: { bwlimit: { @@ -9781,16 +9739,24 @@ pub struct ReloadSdn { optional: true, }, "target-bridge": { - format: &ApiStringFormat::VerifyFn(verifiers::verify_bridge_pair), - type: String, + items: { + description: "List item of type bridge-pair.", + format: &ApiStringFormat::Pattern(&REMOTE_MIGRATE_LXC_TARGET_BRIDGE_RE), + type: String, + }, + type: Array, }, "target-endpoint": { format: &ApiStringFormat::PropertyString(&ProxmoxRemote::API_SCHEMA), type: String, }, "target-storage": { - format: &ApiStringFormat::VerifyFn(verifiers::verify_storage_pair), - type: String, + items: { + description: "List item of type storage-pair.", + format: &ApiStringFormat::Pattern(&REMOTE_MIGRATE_LXC_TARGET_STORAGE_RE), + type: String, + }, + type: Array, }, "target-vmid": { maximum: 999999999, @@ -9834,7 +9800,7 @@ pub struct RemoteMigrateLxc { /// maps all source bridges to that bridge. Providing the special value '1' /// will map each source bridge to itself. #[serde(rename = "target-bridge")] - pub target_bridge: String, + pub target_bridge: Vec, /// Remote target endpoint #[serde(rename = "target-endpoint")] @@ -9844,7 +9810,7 @@ pub struct RemoteMigrateLxc { /// ID maps all source storages to that storage. Providing the special value /// '1' will map each source storage to itself. #[serde(rename = "target-storage")] - pub target_storage: String, + pub target_storage: Vec, /// The (unique) ID of the VM. #[serde(deserialize_with = "proxmox_serde::perl::deserialize_u32")] @@ -9858,6 +9824,19 @@ pub struct RemoteMigrateLxc { pub timeout: Option, } +const_regex! { + +REMOTE_MIGRATE_QEMU_TARGET_BRIDGE_RE = r##"^[-_.\w\d]+:[-_.\w\d]+|[-_.\w\d]+|1$"##; +REMOTE_MIGRATE_QEMU_TARGET_STORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9]):(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|1$"##; + +} + +#[test] +fn test_regex_compilation_27() { + use regex::Regex; + let _: &Regex = &REMOTE_MIGRATE_QEMU_TARGET_BRIDGE_RE; + let _: &Regex = &REMOTE_MIGRATE_QEMU_TARGET_STORAGE_RE; +} #[api( properties: { bwlimit: { @@ -9874,16 +9853,24 @@ pub struct RemoteMigrateLxc { optional: true, }, "target-bridge": { - format: &ApiStringFormat::VerifyFn(verifiers::verify_bridge_pair), - type: String, + items: { + description: "List item of type bridge-pair.", + format: &ApiStringFormat::Pattern(&REMOTE_MIGRATE_QEMU_TARGET_BRIDGE_RE), + type: String, + }, + type: Array, }, "target-endpoint": { format: &ApiStringFormat::PropertyString(&ProxmoxRemote::API_SCHEMA), type: String, }, "target-storage": { - format: &ApiStringFormat::VerifyFn(verifiers::verify_storage_pair), - type: String, + items: { + description: "List item of type storage-pair.", + format: &ApiStringFormat::Pattern(&REMOTE_MIGRATE_QEMU_TARGET_STORAGE_RE), + type: String, + }, + type: Array, }, "target-vmid": { maximum: 999999999, @@ -9917,7 +9904,7 @@ pub struct RemoteMigrateQemu { /// maps all source bridges to that bridge. Providing the special value '1' /// will map each source bridge to itself. #[serde(rename = "target-bridge")] - pub target_bridge: String, + pub target_bridge: Vec, /// Remote target endpoint #[serde(rename = "target-endpoint")] @@ -9927,7 +9914,7 @@ pub struct RemoteMigrateQemu { /// ID maps all source storages to that storage. Providing the special value /// '1' will map each source storage to itself. #[serde(rename = "target-storage")] - pub target_storage: String, + pub target_storage: Vec, /// The (unique) ID of the VM. #[serde(deserialize_with = "proxmox_serde::perl::deserialize_u32")] @@ -10162,7 +10149,7 @@ SDN_CONTROLLER_ISIS_NET_RE = r##"^[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){3,9}\.[a-fA-F } #[test] -fn test_regex_compilation_26() { +fn test_regex_compilation_28() { use regex::Regex; let _: &Regex = &SDN_CONTROLLER_ISIS_IFACES_RE; let _: &Regex = &SDN_CONTROLLER_ISIS_NET_RE; @@ -10315,7 +10302,7 @@ SDN_CONTROLLER_PENDING_ISIS_NET_RE = r##"^[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){3,9}\ } #[test] -fn test_regex_compilation_27() { +fn test_regex_compilation_29() { use regex::Regex; let _: &Regex = &SDN_CONTROLLER_PENDING_ISIS_IFACES_RE; let _: &Regex = &SDN_CONTROLLER_PENDING_ISIS_NET_RE; @@ -10610,7 +10597,7 @@ SDN_ZONE_EXITNODES_PRIMARY_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##; } #[test] -fn test_regex_compilation_28() { +fn test_regex_compilation_30() { use regex::Regex; let _: &Regex = &SDN_ZONE_EXITNODES_RE; let _: &Regex = &SDN_ZONE_EXITNODES_PRIMARY_RE; @@ -10884,7 +10871,7 @@ SDN_ZONE_PENDING_EXITNODES_PRIMARY_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9] } #[test] -fn test_regex_compilation_29() { +fn test_regex_compilation_31() { use regex::Regex; let _: &Regex = &SDN_ZONE_PENDING_EXITNODES_RE; let _: &Regex = &SDN_ZONE_PENDING_EXITNODES_PRIMARY_RE; @@ -11209,13 +11196,15 @@ pub struct StartLxc { const_regex! { START_QEMU_MIGRATEDFROM_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##; +START_QEMU_TARGETSTORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9]):(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|(?i:[a-z][a-z0-9\-_.]*[a-z0-9])|1$"##; } #[test] -fn test_regex_compilation_30() { +fn test_regex_compilation_32() { use regex::Regex; let _: &Regex = &START_QEMU_MIGRATEDFROM_RE; + let _: &Regex = &START_QEMU_TARGETSTORAGE_RE; } #[api( properties: { @@ -11256,9 +11245,13 @@ fn test_regex_compilation_30() { type: String, }, targetstorage: { - format: &ApiStringFormat::VerifyFn(verifiers::verify_storage_pair), + items: { + description: "List item of type storage-pair.", + format: &ApiStringFormat::Pattern(&START_QEMU_TARGETSTORAGE_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, timeout: { default: 30, @@ -11316,7 +11309,7 @@ pub struct StartQemu { /// ID maps all source storages to that storage. Providing the special value /// '1' will map each source storage to itself. #[serde(default, skip_serializing_if = "Option::is_none")] - pub targetstorage: Option, + pub targetstorage: Option>, /// Wait maximal timeout seconds. #[serde(deserialize_with = "proxmox_serde::perl::deserialize_u64")] @@ -11379,7 +11372,7 @@ STOP_QEMU_MIGRATEDFROM_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##; } #[test] -fn test_regex_compilation_31() { +fn test_regex_compilation_33() { use regex::Regex; let _: &Regex = &STOP_QEMU_MIGRATEDFROM_RE; } @@ -11478,7 +11471,7 @@ STORAGE_INFO_STORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9])$"##; } #[test] -fn test_regex_compilation_32() { +fn test_regex_compilation_34() { use regex::Regex; let _: &Regex = &STORAGE_INFO_STORAGE_RE; } @@ -11756,7 +11749,7 @@ UPDATE_QEMU_CONFIG_VMSTATESTORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9])$"##; } #[test] -fn test_regex_compilation_33() { +fn test_regex_compilation_35() { use regex::Regex; let _: &Regex = &UPDATE_QEMU_CONFIG_AFFINITY_RE; let _: &Regex = &UPDATE_QEMU_CONFIG_BOOTDISK_RE; @@ -11882,9 +11875,13 @@ fn test_regex_compilation_33() { type: Integer, }, delete: { - format: &ApiStringFormat::Pattern(&UPDATE_QEMU_CONFIG_DELETE_RE), + items: { + description: "List item of type pve-configid.", + format: &ApiStringFormat::Pattern(&UPDATE_QEMU_CONFIG_DELETE_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, description: { max_length: 8192, @@ -11989,9 +11986,13 @@ fn test_regex_compilation_33() { type: String, }, nameserver: { - format: &ApiStringFormat::VerifyFn(verifiers::verify_address), + items: { + description: "List item of type address.", + format: &ApiStringFormat::VerifyFn(verifiers::verify_address), + type: String, + }, optional: true, - type: String, + type: Array, }, net: { type: QemuConfigNetArray, @@ -12023,9 +12024,13 @@ fn test_regex_compilation_33() { optional: true, }, revert: { - format: &ApiStringFormat::Pattern(&UPDATE_QEMU_CONFIG_REVERT_RE), + items: { + description: "List item of type pve-configid.", + format: &ApiStringFormat::Pattern(&UPDATE_QEMU_CONFIG_REVERT_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, rng0: { format: &ApiStringFormat::PropertyString(&PveQmRng::API_SCHEMA), @@ -12104,9 +12109,13 @@ fn test_regex_compilation_33() { optional: true, }, tags: { - format: &ApiStringFormat::Pattern(&UPDATE_QEMU_CONFIG_TAGS_RE), + items: { + description: "List item of type pve-tag.", + format: &ApiStringFormat::Pattern(&UPDATE_QEMU_CONFIG_TAGS_RE), + type: String, + }, optional: true, - type: String, + type: Array, }, tdf: { default: false, @@ -12274,7 +12283,7 @@ pub struct UpdateQemuConfig { /// A list of settings you want to delete. #[serde(default, skip_serializing_if = "Option::is_none")] - pub delete: Option, + pub delete: Option>, /// Description for the VM. Shown in the web-interface VM's summary. This is /// saved as comment inside the configuration file. @@ -12413,7 +12422,7 @@ pub struct UpdateQemuConfig { /// automatically use the setting from the host if neither searchdomain nor /// nameserver are set. #[serde(default, skip_serializing_if = "Option::is_none")] - pub nameserver: Option, + pub nameserver: Option>, /// Specify network devices. #[serde(flatten)] @@ -12453,7 +12462,7 @@ pub struct UpdateQemuConfig { /// Revert a pending change. #[serde(default, skip_serializing_if = "Option::is_none")] - pub revert: Option, + pub revert: Option>, /// Configure a VirtIO-based Random Number Generator. #[serde(default, skip_serializing_if = "Option::is_none")] @@ -12538,7 +12547,7 @@ pub struct UpdateQemuConfig { /// Tags of the VM. This is only meta information. #[serde(default, skip_serializing_if = "Option::is_none")] - pub tags: Option, + pub tags: Option>, /// Enable/disable time drift fix. #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] @@ -12649,7 +12658,7 @@ UPDATE_QEMU_CONFIG_EFIDISK0_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##; } #[test] -fn test_regex_compilation_34() { +fn test_regex_compilation_36() { use regex::Regex; let _: &Regex = &UPDATE_QEMU_CONFIG_EFIDISK0_SIZE_RE; } @@ -12726,7 +12735,7 @@ UPDATE_QEMU_CONFIG_IDE_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##; } #[test] -fn test_regex_compilation_35() { +fn test_regex_compilation_37() { use regex::Regex; let _: &Regex = &UPDATE_QEMU_CONFIG_IDE_MODEL_RE; let _: &Regex = &UPDATE_QEMU_CONFIG_IDE_SERIAL_RE; @@ -13082,7 +13091,7 @@ UPDATE_QEMU_CONFIG_SATA_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##; } #[test] -fn test_regex_compilation_36() { +fn test_regex_compilation_38() { use regex::Regex; let _: &Regex = &UPDATE_QEMU_CONFIG_SATA_SERIAL_RE; let _: &Regex = &UPDATE_QEMU_CONFIG_SATA_SIZE_RE; @@ -13427,7 +13436,7 @@ UPDATE_QEMU_CONFIG_SCSI_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##; } #[test] -fn test_regex_compilation_37() { +fn test_regex_compilation_39() { use regex::Regex; let _: &Regex = &UPDATE_QEMU_CONFIG_SCSI_SERIAL_RE; let _: &Regex = &UPDATE_QEMU_CONFIG_SCSI_SIZE_RE; @@ -13827,7 +13836,7 @@ UPDATE_QEMU_CONFIG_TPMSTATE0_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##; } #[test] -fn test_regex_compilation_38() { +fn test_regex_compilation_40() { use regex::Regex; let _: &Regex = &UPDATE_QEMU_CONFIG_TPMSTATE0_SIZE_RE; } @@ -13883,7 +13892,7 @@ UPDATE_QEMU_CONFIG_VIRTIO_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##; } #[test] -fn test_regex_compilation_39() { +fn test_regex_compilation_41() { use regex::Regex; let _: &Regex = &UPDATE_QEMU_CONFIG_VIRTIO_SERIAL_RE; let _: &Regex = &UPDATE_QEMU_CONFIG_VIRTIO_SIZE_RE; -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel