all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-ve-rs 3/3] ve-config: add integration tests for IS-IS fabrics
Date: Tue, 19 Aug 2025 15:19:02 +0200	[thread overview]
Message-ID: <20250819131916.324392-4-g.goller@proxmox.com> (raw)
In-Reply-To: <20250819131916.324392-1-g.goller@proxmox.com>

Add three integration tests for the IS-IS fabrics: a simple one, one
with dualstack ipv6 and ipv4, and one with ipv6 only.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 .../tests/fabric/cfg/isis_default/fabrics.cfg | 18 +++++++
 .../fabric/cfg/isis_dualstack/fabrics.cfg     | 22 ++++++++
 .../fabric/cfg/isis_ipv6_only/fabrics.cfg     | 18 +++++++
 proxmox-ve-config/tests/fabric/main.rs        | 51 +++++++++++++++++++
 .../snapshots/fabric__isis_default_pve.snap   | 36 +++++++++++++
 .../snapshots/fabric__isis_default_pve1.snap  | 35 +++++++++++++
 .../snapshots/fabric__isis_dualstack_pve.snap | 48 +++++++++++++++++
 .../snapshots/fabric__isis_ipv6_only_pve.snap | 36 +++++++++++++
 8 files changed, 264 insertions(+)
 create mode 100644 proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg
 create mode 100644 proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg
 create mode 100644 proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg
 create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap
 create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap
 create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap
 create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap

diff --git a/proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg b/proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg
new file mode 100644
index 000000000000..161831977bc6
--- /dev/null
+++ b/proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg
@@ -0,0 +1,18 @@
+isis_fabric: uwu
+        hello_interval 4
+        ip_prefix 192.168.2.0/24
+
+isis_node: uwu_pve
+        interfaces name=ens20,hello_multiplier=50
+        interfaces name=ens19
+        ip 192.168.2.8
+
+isis_node: uwu_pve1
+        interfaces name=ens19
+        interfaces name=ens20
+        ip 192.168.2.9
+
+isis_node: uwu_pve2
+        interfaces name=ens19
+        interfaces name=ens20
+        ip 192.168.2.10
diff --git a/proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg b/proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg
new file mode 100644
index 000000000000..c8a0458d2e88
--- /dev/null
+++ b/proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg
@@ -0,0 +1,22 @@
+isis_fabric: uwu
+        hello_interval 4
+        ip_prefix 192.168.2.0/24
+        ip6_prefix 2001:db8::0/64
+
+isis_node: uwu_pve
+        interfaces name=ens20,hello_multiplier=50
+        interfaces name=ens19
+        ip 192.168.2.8
+        ip6 2001:db8::1
+
+isis_node: uwu_pve1
+        interfaces name=ens19
+        interfaces name=ens20
+        ip 192.168.2.9
+        ip6 2001:db8::2
+
+isis_node: uwu_pve2
+        interfaces name=ens19
+        interfaces name=ens20
+        ip 192.168.2.10
+        ip6 2001:db8::3
diff --git a/proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg b/proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg
new file mode 100644
index 000000000000..584ecbbc4ef9
--- /dev/null
+++ b/proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg
@@ -0,0 +1,18 @@
+isis_fabric: uwu
+        hello_interval 4
+        ip6_prefix a:b::0/75
+
+isis_node: uwu_pve
+        interfaces name=ens20,hello_multiplier=50
+        interfaces name=ens19
+        ip6 a:b::a
+
+isis_node: uwu_pve1
+        interfaces name=ens19
+        interfaces name=ens20
+        ip6 a:b::b
+
+isis_node: uwu_pve2
+        interfaces name=ens19
+        interfaces name=ens20
+        ip6 a:b::c
diff --git a/proxmox-ve-config/tests/fabric/main.rs b/proxmox-ve-config/tests/fabric/main.rs
index 47bbbeb77886..277982c7b07e 100644
--- a/proxmox-ve-config/tests/fabric/main.rs
+++ b/proxmox-ve-config/tests/fabric/main.rs
@@ -37,6 +37,29 @@ fn openfabric_default() {
     insta::assert_snapshot!(helper::reference_name!("pve1"), output);
 }
 
+#[test]
+fn isis_default() {
+    let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap();
+
+    let mut frr_config = FrrConfigBuilder::default()
+        .add_fabrics(config.clone())
+        .build(NodeId::from_string("pve".to_owned()).expect("invalid nodeid"))
+        .expect("error building frr config");
+
+    let mut output = dump(&frr_config).expect("error dumping stuff");
+
+    insta::assert_snapshot!(helper::reference_name!("pve"), output);
+
+    frr_config = FrrConfigBuilder::default()
+        .add_fabrics(config.clone())
+        .build(NodeId::from_string("pve1".to_owned()).expect("invalid nodeid"))
+        .expect("error building frr config");
+
+    output = dump(&frr_config).expect("error dumping stuff");
+
+    insta::assert_snapshot!(helper::reference_name!("pve1"), output);
+}
+
 #[test]
 fn ospf_default() {
     let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap();
@@ -126,6 +149,20 @@ fn openfabric_dualstack() {
     insta::assert_snapshot!(helper::reference_name!("pve"), output);
 }
 
+#[test]
+fn isis_dualstack() {
+    let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap();
+
+    let frr_config = FrrConfigBuilder::default()
+        .add_fabrics(config)
+        .build(NodeId::from_string("pve".to_owned()).expect("invalid nodeid"))
+        .expect("error building frr config");
+
+    let output = dump(&frr_config).expect("error dumping stuff");
+
+    insta::assert_snapshot!(helper::reference_name!("pve"), output);
+}
+
 #[test]
 fn openfabric_ipv6_only() {
     let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap();
@@ -139,3 +176,17 @@ fn openfabric_ipv6_only() {
 
     insta::assert_snapshot!(helper::reference_name!("pve"), output);
 }
+
+#[test]
+fn isis_ipv6_only() {
+    let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap();
+
+    let frr_config = FrrConfigBuilder::default()
+        .add_fabrics(config)
+        .build(NodeId::from_string("pve".to_owned()).expect("invalid nodeid"))
+        .expect("error building frr config");
+
+    let output = dump(&frr_config).expect("error dumping stuff");
+
+    insta::assert_snapshot!(helper::reference_name!("pve"), output);
+}
diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap
new file mode 100644
index 000000000000..1001fb50ba58
--- /dev/null
+++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap
@@ -0,0 +1,36 @@
+---
+source: proxmox-ve-config/tests/fabric/main.rs
+expression: output
+snapshot_kind: text
+---
+router isis uwu
+ net 49.0001.1921.6800.2008.00
+exit
+!
+interface dummy_uwu
+ ip router isis uwu
+ isis passive
+exit
+!
+interface ens19
+ ip router isis uwu
+ isis hello-interval 4
+ isis network point-to-point
+exit
+!
+interface ens20
+ ip router isis uwu
+ isis hello-interval 4
+ isis hello-multiplier 50
+ isis network point-to-point
+exit
+!
+access-list pve_isis_uwu_ips permit 192.168.2.0/24
+!
+route-map pve_isis permit 100
+ match ip address pve_isis_uwu_ips
+ set src 192.168.2.8
+exit
+!
+ip protocol isis route-map pve_isis
+!
diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap
new file mode 100644
index 000000000000..c50d7896f77e
--- /dev/null
+++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap
@@ -0,0 +1,35 @@
+---
+source: proxmox-ve-config/tests/fabric/main.rs
+expression: output
+snapshot_kind: text
+---
+router isis uwu
+ net 49.0001.1921.6800.2009.00
+exit
+!
+interface dummy_uwu
+ ip router isis uwu
+ isis passive
+exit
+!
+interface ens19
+ ip router isis uwu
+ isis hello-interval 4
+ isis network point-to-point
+exit
+!
+interface ens20
+ ip router isis uwu
+ isis hello-interval 4
+ isis network point-to-point
+exit
+!
+access-list pve_isis_uwu_ips permit 192.168.2.0/24
+!
+route-map pve_isis permit 100
+ match ip address pve_isis_uwu_ips
+ set src 192.168.2.9
+exit
+!
+ip protocol isis route-map pve_isis
+!
diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap
new file mode 100644
index 000000000000..ae4292bd7f8d
--- /dev/null
+++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap
@@ -0,0 +1,48 @@
+---
+source: proxmox-ve-config/tests/fabric/main.rs
+expression: output
+snapshot_kind: text
+---
+router isis uwu
+ net 49.0001.1921.6800.2008.00
+exit
+!
+interface dummy_uwu
+ ipv6 router isis uwu
+ ip router isis uwu
+ isis passive
+exit
+!
+interface ens19
+ ipv6 router isis uwu
+ ip router isis uwu
+ isis hello-interval 4
+ isis network point-to-point
+exit
+!
+interface ens20
+ ipv6 router isis uwu
+ ip router isis uwu
+ isis hello-interval 4
+ isis hello-multiplier 50
+ isis network point-to-point
+exit
+!
+access-list pve_isis_uwu_ips permit 192.168.2.0/24
+!
+ipv6 access-list pve_isis_uwu_ip6s permit 2001:db8::/64
+!
+route-map pve_isis permit 100
+ match ip address pve_isis_uwu_ips
+ set src 192.168.2.8
+exit
+!
+route-map pve_isis6 permit 110
+ match ipv6 address pve_isis_uwu_ip6s
+ set src 2001:db8::1
+exit
+!
+ip protocol isis route-map pve_isis
+!
+ipv6 protocol isis route-map pve_isis6
+!
diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap
new file mode 100644
index 000000000000..7b5416490f5a
--- /dev/null
+++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap
@@ -0,0 +1,36 @@
+---
+source: proxmox-ve-config/tests/fabric/main.rs
+expression: output
+snapshot_kind: text
+---
+router isis uwu
+ net 49.0001.0000.0000.000a.00
+exit
+!
+interface dummy_uwu
+ ipv6 router isis uwu
+ isis passive
+exit
+!
+interface ens19
+ ipv6 router isis uwu
+ isis hello-interval 4
+ isis network point-to-point
+exit
+!
+interface ens20
+ ipv6 router isis uwu
+ isis hello-interval 4
+ isis hello-multiplier 50
+ isis network point-to-point
+exit
+!
+ipv6 access-list pve_isis_uwu_ip6s permit a:b::/75
+!
+route-map pve_isis6 permit 100
+ match ipv6 address pve_isis_uwu_ip6s
+ set src a:b::a
+exit
+!
+ipv6 protocol isis route-map pve_isis6
+!
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-08-19 13:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 13:18 [pve-devel] [PATCH docs/gui-tests/manager/network/proxmox{-ve-rs, -perl-rs} 0/9] Add IS-IS protocol to fabrics Gabriel Goller
2025-08-19 13:19 ` [pve-devel] [PATCH proxmox-ve-rs 1/3] frr: add IS-IS frr configuration types Gabriel Goller
2025-08-19 13:19 ` [pve-devel] [PATCH proxmox-ve-rs 2/3] ve-config: add IS-IS fabric config parsing and frr config generation Gabriel Goller
2025-08-19 13:19 ` Gabriel Goller [this message]
2025-08-19 13:19 ` [pve-devel] [PATCH proxmox-perl-rs 1/1] pve-rs: fabrics: add IS-IS protocol ifupdown " Gabriel Goller
2025-08-19 13:19 ` [pve-devel] [PATCH pve-manager 1/2] fabrics: add IS-IS panels Gabriel Goller
2025-08-19 13:19 ` [pve-devel] [PATCH pve-manager 2/2] sdn: add warning about IS-IS controller deprecation Gabriel Goller
2025-08-19 13:19 ` [pve-devel] [PATCH pve-network 1/1] fabrics: add IS-IS api types Gabriel Goller
2025-08-19 13:19 ` [pve-devel] [PATCH pve-docs 1/1] sdn: add section about IS-IS fabric Gabriel Goller
2025-08-19 13:19 ` [pve-devel] [PATCH pve-gui-tests 1/1] fabrics: add screenshots for IS-IS fabric and nodes Gabriel Goller

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=20250819131916.324392-4-g.goller@proxmox.com \
    --to=g.goller@proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal