[pdm-devel] [PATCH proxmox v3 3/3] pve-api-types: regenerate
Stefan Hanreich
s.hanreich at proxmox.com
Thu Nov 20 12:06:33 CET 2025
Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
Tested-by: Hannes Dürr <h.duerr at proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner at proxmox.com>
---
pve-api-types/src/generated/code.rs | 25 +++++++
pve-api-types/src/generated/types.rs | 104 +++++++++++++++++++++++----
2 files changed, 116 insertions(+), 13 deletions(-)
diff --git a/pve-api-types/src/generated/code.rs b/pve-api-types/src/generated/code.rs
index 07728f3f..0f73aa97 100644
--- a/pve-api-types/src/generated/code.rs
+++ b/pve-api-types/src/generated/code.rs
@@ -329,8 +329,11 @@
/// - /nodes/{node}/scan/pbs
/// - /nodes/{node}/scan/zfs
/// - /nodes/{node}/sdn
+/// - /nodes/{node}/sdn/vnets
+/// - /nodes/{node}/sdn/vnets/{vnet}
/// - /nodes/{node}/sdn/zones
/// - /nodes/{node}/sdn/zones/{zone}
+/// - /nodes/{node}/sdn/zones/{zone}/bridges
/// - /nodes/{node}/sdn/zones/{zone}/content
/// - /nodes/{node}/services
/// - /nodes/{node}/services/{service}
@@ -472,6 +475,16 @@ pub trait PveClient {
Err(Error::Other("get_task_status not implemented"))
}
+ /// Get the MAC VRF for a VNet in an EVPN zone.
+ async fn get_vnet_mac_vrf(&self, node: &str, vnet: &str) -> Result<Vec<SdnVnetMacVrf>, Error> {
+ Err(Error::Other("get_vnet_mac_vrf not implemented"))
+ }
+
+ /// Get the IP VRF of an EVPN zone.
+ async fn get_zone_ip_vrf(&self, node: &str, zone: &str) -> Result<Vec<SdnZoneIpVrf>, Error> {
+ Err(Error::Other("get_zone_ip_vrf not implemented"))
+ }
+
/// List available updates.
async fn list_available_updates(&self, node: &str) -> Result<Vec<AptUpdateInfo>, Error> {
Err(Error::Other("list_available_updates not implemented"))
@@ -974,6 +987,18 @@ where
Ok(self.0.get(url).await?.expect_json()?.data)
}
+ /// Get the MAC VRF for a VNet in an EVPN zone.
+ async fn get_vnet_mac_vrf(&self, node: &str, vnet: &str) -> Result<Vec<SdnVnetMacVrf>, Error> {
+ let url = &format!("/api2/extjs/nodes/{node}/sdn/vnets/{vnet}/mac-vrf");
+ Ok(self.0.get(url).await?.expect_json()?.data)
+ }
+
+ /// Get the IP VRF of an EVPN zone.
+ async fn get_zone_ip_vrf(&self, node: &str, zone: &str) -> Result<Vec<SdnZoneIpVrf>, Error> {
+ let url = &format!("/api2/extjs/nodes/{node}/sdn/zones/{zone}/ip-vrf");
+ Ok(self.0.get(url).await?.expect_json()?.data)
+ }
+
/// List available updates.
async fn list_available_updates(&self, node: &str) -> Result<Vec<AptUpdateInfo>, Error> {
let url = &format!("/api2/extjs/nodes/{node}/apt/update");
diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs
index 6b6fd11a..1867b497 100644
--- a/pve-api-types/src/generated/types.rs
+++ b/pve-api-types/src/generated/types.rs
@@ -12162,6 +12162,46 @@ pub struct SdnVnet {
pub zone: Option<String>,
}
+const_regex! {
+
+SDN_VNET_MAC_VRF_MAC_RE = r##"^(?i)[a-f0-9][02468ace](?::[a-f0-9]{2}){5}$"##;
+
+}
+
+#[test]
+fn test_regex_compilation_31() {
+ use regex::Regex;
+ let _: &Regex = &SDN_VNET_MAC_VRF_MAC_RE;
+}
+#[api(
+ properties: {
+ ip: {
+ format: &ApiStringFormat::VerifyFn(verifiers::verify_ip),
+ type: String,
+ },
+ mac: {
+ format: &ApiStringFormat::Pattern(&SDN_VNET_MAC_VRF_MAC_RE),
+ type: String,
+ },
+ nexthop: {
+ format: &ApiStringFormat::VerifyFn(verifiers::verify_ip),
+ type: String,
+ },
+ },
+)]
+/// Object.
+#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
+pub struct SdnVnetMacVrf {
+ /// The IP address of the MAC VRF entry.
+ pub ip: String,
+
+ /// The MAC address of the MAC VRF entry.
+ pub mac: String,
+
+ /// The IP address of the nexthop.
+ pub nexthop: String,
+}
+
#[api(
properties: {
alias: {
@@ -12241,7 +12281,7 @@ SDN_ZONE_EXITNODES_PRIMARY_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##;
}
#[test]
-fn test_regex_compilation_31() {
+fn test_regex_compilation_32() {
use regex::Regex;
let _: &Regex = &SDN_ZONE_EXITNODES_RE;
let _: &Regex = &SDN_ZONE_EXITNODES_PRIMARY_RE;
@@ -12510,6 +12550,44 @@ pub enum SdnZoneDhcp {
serde_plain::derive_display_from_serialize!(SdnZoneDhcp);
serde_plain::derive_fromstr_from_deserialize!(SdnZoneDhcp);
+#[api(
+ properties: {
+ ip: {
+ format: &ApiStringFormat::VerifyFn(verifiers::verify_cidr),
+ type: String,
+ },
+ metric: {
+ type: Integer,
+ },
+ nexthops: {
+ items: {
+ description: "the interface name or ip address of the next hop",
+ type: String,
+ },
+ type: Array,
+ },
+ protocol: {
+ type: String,
+ },
+ },
+)]
+/// Object.
+#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
+pub struct SdnZoneIpVrf {
+ /// The CIDR of the route table entry.
+ pub ip: String,
+
+ /// This route's metric.
+ #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
+ pub metric: i64,
+
+ /// A list of nexthops for the route table entry.
+ pub nexthops: Vec<String>,
+
+ /// The protocol where this route was learned from (e.g. BGP).
+ pub protocol: String,
+}
+
const_regex! {
SDN_ZONE_PENDING_EXITNODES_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##;
@@ -12518,7 +12596,7 @@ SDN_ZONE_PENDING_EXITNODES_PRIMARY_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9]
}
#[test]
-fn test_regex_compilation_32() {
+fn test_regex_compilation_33() {
use regex::Regex;
let _: &Regex = &SDN_ZONE_PENDING_EXITNODES_RE;
let _: &Regex = &SDN_ZONE_PENDING_EXITNODES_PRIMARY_RE;
@@ -12848,7 +12926,7 @@ START_QEMU_TARGETSTORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9]):(?i:[a-z][a-z
}
#[test]
-fn test_regex_compilation_33() {
+fn test_regex_compilation_34() {
use regex::Regex;
let _: &Regex = &START_QEMU_MIGRATEDFROM_RE;
let _: &Regex = &START_QEMU_TARGETSTORAGE_RE;
@@ -13022,7 +13100,7 @@ STOP_QEMU_MIGRATEDFROM_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##;
}
#[test]
-fn test_regex_compilation_34() {
+fn test_regex_compilation_35() {
use regex::Regex;
let _: &Regex = &STOP_QEMU_MIGRATEDFROM_RE;
}
@@ -13124,7 +13202,7 @@ STORAGE_INFO_STORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9])$"##;
}
#[test]
-fn test_regex_compilation_35() {
+fn test_regex_compilation_36() {
use regex::Regex;
let _: &Regex = &STORAGE_INFO_STORAGE_RE;
}
@@ -13466,7 +13544,7 @@ UPDATE_QEMU_CONFIG_VMSTATESTORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9])$"##;
}
#[test]
-fn test_regex_compilation_36() {
+fn test_regex_compilation_37() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_AFFINITY_RE;
let _: &Regex = &UPDATE_QEMU_CONFIG_BOOTDISK_RE;
@@ -14357,7 +14435,7 @@ UPDATE_QEMU_CONFIG_ASYNC_VMSTATESTORAGE_RE = r##"^(?i:[a-z][a-z0-9\-_.]*[a-z0-9]
}
#[test]
-fn test_regex_compilation_37() {
+fn test_regex_compilation_38() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_ASYNC_AFFINITY_RE;
let _: &Regex = &UPDATE_QEMU_CONFIG_ASYNC_BOOTDISK_RE;
@@ -15226,7 +15304,7 @@ UPDATE_QEMU_CONFIG_EFIDISK0_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##;
}
#[test]
-fn test_regex_compilation_38() {
+fn test_regex_compilation_39() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_EFIDISK0_SIZE_RE;
}
@@ -15303,7 +15381,7 @@ UPDATE_QEMU_CONFIG_IDE_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##;
}
#[test]
-fn test_regex_compilation_39() {
+fn test_regex_compilation_40() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_IDE_MODEL_RE;
let _: &Regex = &UPDATE_QEMU_CONFIG_IDE_SERIAL_RE;
@@ -15659,7 +15737,7 @@ UPDATE_QEMU_CONFIG_SATA_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##;
}
#[test]
-fn test_regex_compilation_40() {
+fn test_regex_compilation_41() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_SATA_SERIAL_RE;
let _: &Regex = &UPDATE_QEMU_CONFIG_SATA_SIZE_RE;
@@ -16004,7 +16082,7 @@ UPDATE_QEMU_CONFIG_SCSI_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##;
}
#[test]
-fn test_regex_compilation_41() {
+fn test_regex_compilation_42() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_SCSI_SERIAL_RE;
let _: &Regex = &UPDATE_QEMU_CONFIG_SCSI_SIZE_RE;
@@ -16404,7 +16482,7 @@ UPDATE_QEMU_CONFIG_TPMSTATE0_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##;
}
#[test]
-fn test_regex_compilation_42() {
+fn test_regex_compilation_43() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_TPMSTATE0_SIZE_RE;
}
@@ -16460,7 +16538,7 @@ UPDATE_QEMU_CONFIG_VIRTIO_SIZE_RE = r##"^(\d+(\.\d+)?)([KMGT])?$"##;
}
#[test]
-fn test_regex_compilation_43() {
+fn test_regex_compilation_44() {
use regex::Regex;
let _: &Regex = &UPDATE_QEMU_CONFIG_VIRTIO_SERIAL_RE;
let _: &Regex = &UPDATE_QEMU_CONFIG_VIRTIO_SIZE_RE;
--
2.47.3
More information about the pdm-devel
mailing list