[pdm-devel] [PATCH proxmox 3/3] pve-api-types: extend ClusterResourceNetworkType

Stefan Hanreich s.hanreich at proxmox.com
Fri Nov 7 15:40:08 CET 2025


Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 pve-api-types/src/sdn.rs | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pve-api-types/src/sdn.rs b/pve-api-types/src/sdn.rs
index 000da6f5..8188c35f 100644
--- a/pve-api-types/src/sdn.rs
+++ b/pve-api-types/src/sdn.rs
@@ -1,4 +1,4 @@
-use crate::{SdnController, SdnVnet, SdnZone};
+use crate::{ClusterResourceNetworkType, SdnController, SdnVnet, SdnZone};
 
 impl SdnVnet {
     /// returns the tag from the pending property if it has a value, otherwise it returns self.tag
@@ -31,3 +31,12 @@ impl SdnController {
             .or(self.asn)
     }
 }
+
+impl ClusterResourceNetworkType {
+    pub fn as_str(&self) -> &'static str {
+        match self {
+            ClusterResourceNetworkType::Fabric => "fabric",
+            ClusterResourceNetworkType::Zone => "zone",
+        }
+    }
+}
-- 
2.47.3




More information about the pdm-devel mailing list