public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Rémi PAETA" <remi.paeta@comaite.com>
To: pve-devel@lists.proxmox.com
Subject: [RFC PATCH ve-rs 01/16] ve-config: sdn: add ovn zone type
Date: Tue, 13 Oct 2026 14:14:17 +0200	[thread overview]
Message-ID: <20261013121432.2642979-2-remi.paeta@comaite.com> (raw)
In-Reply-To: <20261013121432.2642979-1-remi.paeta@comaite.com>

pve-network gains an "ovn" zone type. An unknown zone type makes the
parsing of the whole SDN running configuration fail, so
proxmox-firewall would stop generating any rule on nodes with OVN
zones, for all guests.

The zone type does not need any specific handling: OVN zones only
carry vnets and subnets like the other zone types.

Signed-off-by: Rémi PAETA <remi.paeta@comaite.com>
---
 proxmox-ve-config/src/sdn/config.rs |  3 +++
 proxmox-ve-config/tests/sdn/main.rs | 28 ++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/proxmox-ve-config/src/sdn/config.rs b/proxmox-ve-config/src/sdn/config.rs
index 2f30cf2..5a5c291 100644
--- a/proxmox-ve-config/src/sdn/config.rs
+++ b/proxmox-ve-config/src/sdn/config.rs
@@ -69,6 +69,7 @@ pub enum ZoneType {
     Qinq,
     Vxlan,
     Evpn,
+    Ovn,
 }
 
 proxmox_serde::forward_deserialize_to_from_str!(ZoneType);
@@ -84,6 +85,7 @@ impl FromStr for ZoneType {
             "qinq" => Ok(ZoneType::Qinq),
             "vxlan" => Ok(ZoneType::Vxlan),
             "evpn" => Ok(ZoneType::Evpn),
+            "ovn" => Ok(ZoneType::Ovn),
             _ => Err(SdnConfigError::InvalidZoneType),
         }
     }
@@ -97,6 +99,7 @@ impl Display for ZoneType {
             ZoneType::Qinq => "qinq",
             ZoneType::Vxlan => "vxlan",
             ZoneType::Evpn => "evpn",
+            ZoneType::Ovn => "ovn",
         })
     }
 }
diff --git a/proxmox-ve-config/tests/sdn/main.rs b/proxmox-ve-config/tests/sdn/main.rs
index a5f6845..5585669 100644
--- a/proxmox-ve-config/tests/sdn/main.rs
+++ b/proxmox-ve-config/tests/sdn/main.rs
@@ -72,6 +72,34 @@ fn parse_running_config() {
     assert_eq!(sdn_config, parsed_config);
 }
 
+#[test]
+fn parse_running_config_ovn_zone() {
+    let running_config: RunningConfig = serde_json::from_str(
+        r#"{
+            "zones": { "ids": { "ovnzone": { "type": "ovn", "controller": "ovnctl", "ipam": "pve" } } },
+            "vnets": { "ids": { "ovnvnet": { "type": "vnet", "zone": "ovnzone" } } },
+            "subnets": { "ids": {} }
+        }"#,
+    )
+    .unwrap();
+
+    let parsed_config = SdnConfig::try_from(running_config).unwrap();
+
+    let sdn_config = SdnConfig::from_zones([ZoneConfig::from_vnets(
+        ZoneName::from_str("ovnzone").unwrap(),
+        ZoneType::Ovn,
+        [VnetConfig::new(
+            VnetName::from_str("ovnvnet").unwrap(),
+            None,
+        )],
+    )
+    .unwrap()])
+    .unwrap();
+
+    assert_eq!(sdn_config, parsed_config);
+    assert_eq!(ZoneType::Ovn.to_string(), "ovn");
+}
+
 #[test]
 fn sdn_config() {
     let mut sdn_config = SdnConfig::new();
-- 
2.47.3




  reply	other threads:[~2026-10-13 12:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  9:22 [RFC] sdn: OVN zone and controller plugins Rémi PAETA
2026-10-13 12:14 ` [RFC PATCH ve-rs/network/manager/docs 00/16] sdn: add " Rémi PAETA
2026-10-13 12:14   ` Rémi PAETA [this message]
2026-10-13 12:14   ` SPAM: [RFC PATCH network 02/16] sdn: controllers: add ovn plugin Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 03/16] sdn: zones: " Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 04/16] sdn: ovn: sync the northbound database on reload Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 05/16] sdn: ovn: configure the chassis on boot and on network reload Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 06/16] sdn: ovn: add port security Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 07/16] sdn: ovn: allow overriding the port security per vnet Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 08/16] sdn: subnets: refuse gateway, snat and dhcp on ovn zones Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 09/16] sdn: ovn: support ssl connections to the databases Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH network 10/16] sdn: ovn: bind guest ports to the chassis of their node Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH manager 11/16] ui: sdn: controller selector: allow filtering by controller type Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH manager 12/16] ui: sdn: add ovn controller Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH manager 13/16] ui: sdn: add ovn zone Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH manager 14/16] ui: sdn: vnet: add port security for ovn zones Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH manager 15/16] ui: sdn: vnet: disable isolate ports " Rémi PAETA
2026-10-13 12:14   ` [RFC PATCH docs 16/16] sdn: document ovn zones and controllers Rémi PAETA

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=20261013121432.2642979-2-remi.paeta@comaite.com \
    --to=remi.paeta@comaite.com \
    --cc=pve-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal