From: Hannes Laimer <h.laimer@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox 3/3] pve-api-types: regenerate
Date: Tue, 21 Oct 2025 15:50:17 +0200 [thread overview]
Message-ID: <20251021135018.88877-4-h.laimer@proxmox.com> (raw)
In-Reply-To: <20251021135018.88877-1-h.laimer@proxmox.com>
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
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<String>,
+ pub isis_ifaces: Option<Vec<String>>,
/// 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<String>,
+ pub peers: Option<Vec<String>>,
#[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<String>,
+ pub exitnodes: Option<Vec<String>>,
/// 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<String>,
+ pub nodes: Option<Vec<String>>,
/// 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<String>,
+ pub peers: Option<Vec<String>>,
/// 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<String>,
+ pub rt_import: Option<Vec<String>>,
/// 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<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>;
- fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: Deserializer<'de>;
- }
-
- impl<T: Serialize + for<'a> Deserialize<'a>> Ser for Vec<T> {
- fn ser<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: Serializer,
- {
- super::stringlist::serialize(&self[..], serializer, &super::LIST_STORAGES_CONTENT)
- }
-
- fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: Deserializer<'de>,
- {
- super::stringlist::deserialize(deserializer, &super::LIST_STORAGES_CONTENT)
- }
- }
-
- impl<T: Ser> Ser for Option<T> {
- fn ser<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: Serializer,
- {
- match self {
- None => serializer.serialize_none(),
- Some(inner) => inner.ser(serializer),
- }
- }
-
- fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: Deserializer<'de>,
- {
- use std::fmt;
- use std::marker::PhantomData;
-
- struct V<T: Ser>(PhantomData<T>);
-
- impl<'de, T: Ser> serde::de::Visitor<'de> for V<T> {
- type Value = Option<T>;
-
- fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("an optional string")
- }
-
- fn visit_none<E: serde::de::Error>(self) -> Result<Self::Value, E> {
- Ok(None)
- }
-
- fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
- where
- D: Deserializer<'de>,
- {
- T::de(deserializer).map(Some)
- }
-
- fn visit_str<E: serde::de::Error>(self, value: &str) -> Result<Self::Value, E> {
- use serde::de::IntoDeserializer;
- T::de(value.into_deserializer()).map(Some)
- }
- }
-
- deserializer.deserialize_option(V::<T>(PhantomData))
- }
- }
-
- pub fn serialize<T, S>(this: &T, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- T: Ser,
- {
- this.ser(serializer)
- }
-
- pub fn deserialize<'de, T, D>(deserializer: D) -> Result<T, D::Error>
- 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<String>,
+ pub statusfilter: Option<Vec<String>>,
/// 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<String>,
+ pub target_storage: Option<Vec<String>>,
/// 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<String>,
+ pub targetstorage: Option<Vec<String>>,
/// 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<bool>,
}
+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<String>,
/// 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<String>,
/// The (unique) ID of the VM.
#[serde(deserialize_with = "proxmox_serde::perl::deserialize_u32")]
@@ -9858,6 +9824,19 @@ pub struct RemoteMigrateLxc {
pub timeout: Option<i64>,
}
+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<String>,
/// 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<String>,
/// 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<String>,
+ pub targetstorage: Option<Vec<String>>,
/// 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<String>,
+ pub delete: Option<Vec<String>>,
/// 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<String>,
+ pub nameserver: Option<Vec<String>>,
/// 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<String>,
+ pub revert: Option<Vec<String>>,
/// 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<String>,
+ pub tags: Option<Vec<String>>,
/// 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
next prev parent reply other threads:[~2025-10-21 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 13:50 [pdm-devel] [PATCH proxmox{, -datacenter-manager} 0/4] generate Vec's for string-lists Hannes Laimer
2025-10-21 13:50 ` [pdm-devel] [PATCH proxmox 1/3] pve-api-types: schema2rust: generate arrays for types with format `-list` Hannes Laimer
2025-10-21 13:50 ` [pdm-devel] [PATCH proxmox 2/3] pve-api-types: add regex for both storage- and bridge-pair Hannes Laimer
2025-10-21 13:50 ` Hannes Laimer [this message]
2025-10-21 13:50 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] server: use types indead of string for migration parameters Hannes Laimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251021135018.88877-4-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox