[pve-devel] [PATCH pve-network 07/17] test: isis: add test for standalone configuration

Gabriel Goller g.goller at proxmox.com
Fri Mar 28 18:13:22 CET 2025


From: Stefan Hanreich <s.hanreich at proxmox.com>

With how the config generation worked before, it was not possible to
create a standalone isis controller. Since each controller is now
responsible for creating its own configuration, it is possible to
create a standalone isis controller without having any evpn
controller. Add a test that covers that scenario.

Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
Co-authored-by: Gabriel Goller <g.goller at proxmox.com>
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---
 .../expected_controller_config                | 22 +++++++++++++++++++
 .../isis_standalone/expected_sdn_interfaces   |  1 +
 .../zones/evpn/isis_standalone/interfaces     | 12 ++++++++++
 .../zones/evpn/isis_standalone/sdn_config     | 21 ++++++++++++++++++
 4 files changed, 56 insertions(+)
 create mode 100644 src/test/zones/evpn/isis_standalone/expected_controller_config
 create mode 100644 src/test/zones/evpn/isis_standalone/expected_sdn_interfaces
 create mode 100644 src/test/zones/evpn/isis_standalone/interfaces
 create mode 100644 src/test/zones/evpn/isis_standalone/sdn_config

diff --git a/src/test/zones/evpn/isis_standalone/expected_controller_config b/src/test/zones/evpn/isis_standalone/expected_controller_config
new file mode 100644
index 000000000000..5c9bf1adfbae
--- /dev/null
+++ b/src/test/zones/evpn/isis_standalone/expected_controller_config
@@ -0,0 +1,22 @@
+frr version 8.5.2
+frr defaults datacenter
+hostname localhost
+log syslog informational
+service integrated-vtysh-config
+!
+!
+interface eth0
+ ip router isis isis1
+!
+interface eth1
+ ip router isis isis1
+!
+router isis isis1
+ net 47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00
+ redistribute ipv4 connected level-1
+ redistribute ipv6 connected level-1
+ log-adjacency-changes
+exit
+!
+line vty
+!
\ No newline at end of file
diff --git a/src/test/zones/evpn/isis_standalone/expected_sdn_interfaces b/src/test/zones/evpn/isis_standalone/expected_sdn_interfaces
new file mode 100644
index 000000000000..edc8ff918531
--- /dev/null
+++ b/src/test/zones/evpn/isis_standalone/expected_sdn_interfaces
@@ -0,0 +1 @@
+#version:1
diff --git a/src/test/zones/evpn/isis_standalone/interfaces b/src/test/zones/evpn/isis_standalone/interfaces
new file mode 100644
index 000000000000..41ae25fda5c3
--- /dev/null
+++ b/src/test/zones/evpn/isis_standalone/interfaces
@@ -0,0 +1,12 @@
+auto vmbr0
+iface vmbr0 inet static
+	address 192.168.0.1/24
+	gateway 192.168.0.254
+        bridge-ports eth0
+        bridge-stp off
+        bridge-fd 0
+
+auto dummy1
+iface dummy1 inet static
+        address 10.0.0.1/32
+        link-type dummy
\ No newline at end of file
diff --git a/src/test/zones/evpn/isis_standalone/sdn_config b/src/test/zones/evpn/isis_standalone/sdn_config
new file mode 100644
index 000000000000..331051f3a2c9
--- /dev/null
+++ b/src/test/zones/evpn/isis_standalone/sdn_config
@@ -0,0 +1,21 @@
+{
+    version => 1,
+    vnets => {
+    },
+    zones   => {
+    },
+    controllers  => {
+        ids => {
+            localhost => {
+                type => "isis",
+                'isis-domain' => 'isis1',
+                'isis-ifaces' => 'eth1,eth0',
+                'isis-net' => "47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00",
+		loopback => 'dummy1',
+                node => "localhost",
+            },
+        },
+    },
+    subnets => {
+    },
+}
-- 
2.39.5





More information about the pve-devel mailing list