summaryrefslogtreecommitdiffstats
path: root/tests/topotests/isis_topo1_vrf
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/isis_topo1_vrf')
-rw-r--r--tests/topotests/isis_topo1_vrf/r1/r1_topology.json156
-rw-r--r--tests/topotests/isis_topo1_vrf/r2/r2_topology.json156
-rw-r--r--tests/topotests/isis_topo1_vrf/r3/r3_topology.json274
-rw-r--r--tests/topotests/isis_topo1_vrf/r4/r4_topology.json274
-rw-r--r--tests/topotests/isis_topo1_vrf/r5/r5_topology.json242
-rw-r--r--tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py58
6 files changed, 573 insertions, 587 deletions
diff --git a/tests/topotests/isis_topo1_vrf/r1/r1_topology.json b/tests/topotests/isis_topo1_vrf/r1/r1_topology.json
index 666fa52b..da537c55 100644
--- a/tests/topotests/isis_topo1_vrf/r1/r1_topology.json
+++ b/tests/topotests/isis_topo1_vrf/r1/r1_topology.json
@@ -1,80 +1,82 @@
-{
- "1": {
- "level-1": {
- "ipv4": [
- {
- "vertex": "r1"
- }
- ],
- "ipv6": [
- {
- "vertex": "r1"
- }
- ]
- },
- "level-2": {
- "ipv4": [
- {
- "vertex": "r1"
- },
- {
- "metric": "0",
- "parent": "r1(4)",
- "type": "IP internal",
- "vertex": "10.0.20.0/24"
- },
- {
- "interface": "r1-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r1(4)",
- "type": "TE-IS",
- "vertex": "r3"
- },
- {
- "interface": "r1-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r3(4)",
- "type": "IP TE",
- "vertex": "10.0.20.0/24"
- },
- {
- "interface": "r1-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r3(4)",
- "type": "IP TE",
- "vertex": "10.0.10.0/24"
- }
- ],
- "ipv6": [
- {
- "vertex": "r1"
- },
- {
- "metric": "0",
- "parent": "r1(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:1::/64"
- },
- {
- "interface": "r1-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r1(4)",
- "type": "TE-IS",
- "vertex": "r3"
+[
+ {
+ "area": "1",
+ "algorithm": 0,
+ "level-1": {
+ "ipv4-paths": [
+ {
+ "vertex": "r1"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r1"
+ }
+ ]
},
- {
- "metric": "10",
- "interface": "r1-eth0",
- "next-hop": "r3",
- "parent": "r3(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:1::/64"
+ "level-2": {
+ "ipv4-paths": [
+ {
+ "vertex": "r1"
+ },
+ {
+ "metric": 0,
+ "parent": "r1(4)",
+ "type": "IP internal",
+ "vertex": "10.0.20.0/24"
+ },
+ {
+ "interface": "r1-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r1(4)",
+ "type": "TE-IS",
+ "vertex": "r3"
+ },
+ {
+ "interface": "r1-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r3(4)",
+ "type": "IP TE",
+ "vertex": "10.0.10.0/24"
+ },
+ {
+ "interface": "r1-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r3(4)",
+ "type": "IP TE",
+ "vertex": "10.0.20.0/24"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r1"
+ },
+ {
+ "metric": 0,
+ "parent": "r1(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:1::/64"
+ },
+ {
+ "interface": "r1-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r1(4)",
+ "type": "TE-IS",
+ "vertex": "r3"
+ },
+ {
+ "metric": 10,
+ "interface": "r1-eth0",
+ "nextHop": "r3",
+ "parent": "r3(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:1::/64"
+ }
+ ]
}
- ]
}
- }
-}
+]
diff --git a/tests/topotests/isis_topo1_vrf/r2/r2_topology.json b/tests/topotests/isis_topo1_vrf/r2/r2_topology.json
index c26ad1ee..bf965659 100644
--- a/tests/topotests/isis_topo1_vrf/r2/r2_topology.json
+++ b/tests/topotests/isis_topo1_vrf/r2/r2_topology.json
@@ -1,80 +1,82 @@
-{
- "1": {
- "level-1": {
- "ipv4": [
- {
- "vertex": "r2"
- }
- ],
- "ipv6": [
- {
- "vertex": "r2"
- }
- ]
- },
- "level-2": {
- "ipv4": [
- {
- "vertex": "r2"
- },
- {
- "metric": "0",
- "parent": "r2(4)",
- "type": "IP internal",
- "vertex": "10.0.21.0/24"
- },
- {
- "interface": "r2-eth0",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r2(4)",
- "type": "TE-IS",
- "vertex": "r4"
- },
- {
- "interface": "r2-eth0",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r4(4)",
- "type": "IP TE",
- "vertex": "10.0.21.0/24"
- },
- {
- "interface": "r2-eth0",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r4(4)",
- "type": "IP TE",
- "vertex": "10.0.11.0/24"
- }
- ],
- "ipv6": [
- {
- "vertex": "r2"
- },
- {
- "metric": "0",
- "parent": "r2(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:2::/64"
- },
- {
- "interface": "r2-eth0",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r2(4)",
- "type": "TE-IS",
- "vertex": "r4"
+[
+ {
+ "area": "1",
+ "algorithm": 0,
+ "level-1": {
+ "ipv4-paths": [
+ {
+ "vertex": "r2"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r2"
+ }
+ ]
},
- {
- "metric": "10",
- "interface": "r2-eth0",
- "next-hop": "r4",
- "parent": "r4(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:2::/64"
+ "level-2": {
+ "ipv4-paths": [
+ {
+ "vertex": "r2"
+ },
+ {
+ "metric": 0,
+ "parent": "r2(4)",
+ "type": "IP internal",
+ "vertex": "10.0.21.0/24"
+ },
+ {
+ "interface": "r2-eth0",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r2(4)",
+ "type": "TE-IS",
+ "vertex": "r4"
+ },
+ {
+ "interface": "r2-eth0",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r4(4)",
+ "type": "IP TE",
+ "vertex": "10.0.11.0/24"
+ },
+ {
+ "interface": "r2-eth0",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r4(4)",
+ "type": "IP TE",
+ "vertex": "10.0.21.0/24"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r2"
+ },
+ {
+ "metric": 0,
+ "parent": "r2(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:2::/64"
+ },
+ {
+ "interface": "r2-eth0",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r2(4)",
+ "type": "TE-IS",
+ "vertex": "r4"
+ },
+ {
+ "metric": 10,
+ "interface": "r2-eth0",
+ "nextHop": "r4",
+ "parent": "r4(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:2::/64"
+ }
+ ]
}
- ]
}
- }
-}
+]
diff --git a/tests/topotests/isis_topo1_vrf/r3/r3_topology.json b/tests/topotests/isis_topo1_vrf/r3/r3_topology.json
index 044a6c04..94592b50 100644
--- a/tests/topotests/isis_topo1_vrf/r3/r3_topology.json
+++ b/tests/topotests/isis_topo1_vrf/r3/r3_topology.json
@@ -1,132 +1,148 @@
-{
- "1": {
- "level-1": {
- "ipv4": [
- {
- "vertex": "r3"
+[
+ {
+ "area": "1",
+ "algorithm": 0,
+ "level-1": {
+ "ipv4-paths": [
+ {
+ "vertex": "r3"
+ },
+ {
+ "metric": 0,
+ "parent": "r3(4)",
+ "type": "IP internal",
+ "vertex": "10.0.10.0/24"
+ },
+ {
+ "interface": "r3-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r3(4)",
+ "type": "TE-IS",
+ "vertex": "r5"
+ },
+ {
+ "interface": "r3-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r5(4)",
+ "type": "IP TE",
+ "vertex": "10.0.10.0/24"
+ },
+ {
+ "interface": "r3-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r5(4)",
+ "type": "IP TE",
+ "vertex": "10.0.11.0/24"
+ },
+ {
+ "interface": "r3-eth1",
+ "metric": 20,
+ "nextHop": "r5",
+ "type": "TE-IS",
+ "vertex": "r4"
+ },
+ {
+ "interface": "r3-eth1",
+ "metric": 20,
+ "nextHop": "r5",
+ "parent": "r4(4)",
+ "type": "IP TE",
+ "vertex": "10.0.21.0/24"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r3"
+ },
+ {
+ "metric": 0,
+ "parent": "r3(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:1::/64"
+ },
+ {
+ "interface": "r3-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r3(4)",
+ "type": "TE-IS",
+ "vertex": "r5"
+ },
+ {
+ "metric": 10,
+ "interface": "r3-eth1",
+ "nextHop": "r5",
+ "parent": "r5(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:2::/64"
+ },
+ {
+ "interface": "r3-eth1",
+ "metric": 20,
+ "nextHop": "r5",
+ "type": "TE-IS",
+ "vertex": "r4"
+ },
+ {
+ "metric": 20,
+ "interface": "r3-eth1",
+ "nextHop": "r5",
+ "parent": "r4(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:2::/64"
+ }
+ ]
},
- {
- "metric": "0",
- "parent": "r3(4)",
- "type": "IP internal",
- "vertex": "10.0.10.0/24"
- },
- {
- "interface": "r3-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r3(4)",
- "type": "TE-IS",
- "vertex": "r5"
- },
- {
- "interface": "r3-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r5(4)",
- "type": "IP TE",
- "vertex": "10.0.10.0/24"
- },
- {
- "interface": "r3-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r5(4)",
- "type": "IP TE",
- "vertex": "10.0.11.0/24"
- },
- {
- "interface": "r3-eth1",
- "metric": "20",
- "next-hop": "r5",
- "parent": "r4(4)",
- "type": "IP TE",
- "vertex": "10.0.21.0/24"
- }
- ],
- "ipv6": [
- {
- "vertex": "r3"
- },
- {
- "metric": "0",
- "parent": "r3(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:1::/64"
- },
- {
- "interface": "r3-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r3(4)",
- "type": "TE-IS",
- "vertex": "r5"
- },
- {
- "metric": "10",
- "interface": "r3-eth1",
- "next-hop": "r5",
- "parent": "r5(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:2::/64"
- },
- {
- "metric": "20",
- "interface": "r3-eth1",
- "next-hop": "r5",
- "parent": "r4(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:2::/64"
- }
- ]
- },
- "level-2": {
- "ipv4": [
- {
- "vertex": "r3"
- },
- {
- "metric": "0",
- "parent": "r3(4)",
- "type": "IP internal",
- "vertex": "10.0.20.0/24"
- },
- {
- "interface": "r3-eth0",
- "metric": "10",
- "next-hop": "r1",
- "parent": "r3(4)",
- "type": "TE-IS",
- "vertex": "r1"
- },
- {
- "interface": "r3-eth0",
- "metric": "10",
- "next-hop": "r1",
- "parent": "r1(4)",
- "type": "IP TE",
- "vertex": "10.0.20.0/24"
- }
- ],
- "ipv6": [
- {
- "vertex": "r3"
- },
- {
- "metric": "0",
- "parent": "r3(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:1::/64"
- },
- {
- "interface": "r3-eth0",
- "metric": "10",
- "next-hop": "r1",
- "parent": "r3(4)",
- "type": "TE-IS",
- "vertex": "r1"
+ "level-2": {
+ "ipv4-paths": [
+ {
+ "vertex": "r3"
+ },
+ {
+ "metric": 0,
+ "parent": "r3(4)",
+ "type": "IP internal",
+ "vertex": "10.0.20.0/24"
+ },
+ {
+ "interface": "r3-eth0",
+ "metric": 10,
+ "nextHop": "r1",
+ "parent": "r3(4)",
+ "type": "TE-IS",
+ "vertex": "r1"
+ },
+ {
+ "interface": "r3-eth0",
+ "metric": 10,
+ "nextHop": "r1",
+ "parent": "r1(4)",
+ "type": "IP TE",
+ "vertex": "10.0.20.0/24"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r3"
+ },
+ {
+ "metric": 0,
+ "parent": "r3(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:1::/64"
+ },
+ {
+ "interface": "r3-eth0",
+ "metric": 10,
+ "nextHop": "r1",
+ "parent": "r3(4)",
+ "type": "TE-IS",
+ "vertex": "r1"
+ }
+ ]
}
- ]
}
- }
-}
+]
diff --git a/tests/topotests/isis_topo1_vrf/r4/r4_topology.json b/tests/topotests/isis_topo1_vrf/r4/r4_topology.json
index d40008aa..b8295e87 100644
--- a/tests/topotests/isis_topo1_vrf/r4/r4_topology.json
+++ b/tests/topotests/isis_topo1_vrf/r4/r4_topology.json
@@ -1,132 +1,148 @@
-{
- "1": {
- "level-1": {
- "ipv4": [
- {
- "vertex": "r4"
+[
+ {
+ "area": "1",
+ "algorithm": 0,
+ "level-1": {
+ "ipv4-paths": [
+ {
+ "vertex": "r4"
+ },
+ {
+ "metric": 0,
+ "parent": "r4(4)",
+ "type": "IP internal",
+ "vertex": "10.0.11.0/24"
+ },
+ {
+ "interface": "r4-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r4(4)",
+ "type": "TE-IS",
+ "vertex": "r5"
+ },
+ {
+ "interface": "r4-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r5(4)",
+ "type": "IP TE",
+ "vertex": "10.0.10.0/24"
+ },
+ {
+ "interface": "r4-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r5(4)",
+ "type": "IP TE",
+ "vertex": "10.0.11.0/24"
+ },
+ {
+ "interface": "r4-eth1",
+ "metric": 20,
+ "nextHop": "r5",
+ "type": "TE-IS",
+ "vertex": "r3"
+ },
+ {
+ "interface": "r4-eth1",
+ "metric": 20,
+ "nextHop": "r5",
+ "parent": "r3(4)",
+ "type": "IP TE",
+ "vertex": "10.0.20.0/24"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r4"
+ },
+ {
+ "metric": 0,
+ "parent": "r4(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:2::/64"
+ },
+ {
+ "interface": "r4-eth1",
+ "metric": 10,
+ "nextHop": "r5",
+ "parent": "r4(4)",
+ "type": "TE-IS",
+ "vertex": "r5"
+ },
+ {
+ "metric": 10,
+ "interface": "r4-eth1",
+ "nextHop": "r5",
+ "parent": "r5(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:1::/64"
+ },
+ {
+ "interface": "r4-eth1",
+ "metric": 20,
+ "nextHop": "r5",
+ "type": "TE-IS",
+ "vertex": "r3"
+ },
+ {
+ "metric": 20,
+ "interface": "r4-eth1",
+ "nextHop": "r5",
+ "parent": "r3(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:1::/64"
+ }
+ ]
},
- {
- "metric": "0",
- "parent": "r4(4)",
- "type": "IP internal",
- "vertex": "10.0.11.0/24"
- },
- {
- "interface": "r4-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r4(4)",
- "type": "TE-IS",
- "vertex": "r5"
- },
- {
- "interface": "r4-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r5(4)",
- "type": "IP TE",
- "vertex": "10.0.10.0/24"
- },
- {
- "interface": "r4-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r5(4)",
- "type": "IP TE",
- "vertex": "10.0.11.0/24"
- },
- {
- "interface": "r4-eth1",
- "metric": "20",
- "next-hop": "r5",
- "parent": "r3(4)",
- "type": "IP TE",
- "vertex": "10.0.20.0/24"
- }
- ],
- "ipv6": [
- {
- "vertex": "r4"
- },
- {
- "metric": "0",
- "parent": "r4(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:2::/64"
- },
- {
- "interface": "r4-eth1",
- "metric": "10",
- "next-hop": "r5",
- "parent": "r4(4)",
- "type": "TE-IS",
- "vertex": "r5"
- },
- {
- "metric": "10",
- "interface": "r4-eth1",
- "next-hop": "r5",
- "parent": "r5(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:1::/64"
- },
- {
- "metric": "20",
- "interface": "r4-eth1",
- "next-hop": "r5",
- "parent": "r3(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:1::/64"
- }
- ]
- },
- "level-2": {
- "ipv4": [
- {
- "vertex": "r4"
- },
- {
- "metric": "0",
- "parent": "r4(4)",
- "type": "IP internal",
- "vertex": "10.0.21.0/24"
- },
- {
- "interface": "r4-eth0",
- "metric": "10",
- "next-hop": "r2",
- "parent": "r4(4)",
- "type": "TE-IS",
- "vertex": "r2"
- },
- {
- "interface": "r4-eth0",
- "metric": "10",
- "next-hop": "r2",
- "parent": "r2(4)",
- "type": "IP TE",
- "vertex": "10.0.21.0/24"
- }
- ],
- "ipv6": [
- {
- "vertex": "r4"
- },
- {
- "metric": "0",
- "parent": "r4(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:2::/64"
- },
- {
- "interface": "r4-eth0",
- "metric": "10",
- "next-hop": "r2",
- "parent": "r4(4)",
- "type": "TE-IS",
- "vertex": "r2"
+ "level-2": {
+ "ipv4-paths": [
+ {
+ "vertex": "r4"
+ },
+ {
+ "metric": 0,
+ "parent": "r4(4)",
+ "type": "IP internal",
+ "vertex": "10.0.21.0/24"
+ },
+ {
+ "interface": "r4-eth0",
+ "metric": 10,
+ "nextHop": "r2",
+ "parent": "r4(4)",
+ "type": "TE-IS",
+ "vertex": "r2"
+ },
+ {
+ "interface": "r4-eth0",
+ "metric": 10,
+ "nextHop": "r2",
+ "parent": "r2(4)",
+ "type": "IP TE",
+ "vertex": "10.0.21.0/24"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r4"
+ },
+ {
+ "metric": 0,
+ "parent": "r4(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:2::/64"
+ },
+ {
+ "interface": "r4-eth0",
+ "metric": 10,
+ "nextHop": "r2",
+ "parent": "r4(4)",
+ "type": "TE-IS",
+ "vertex": "r2"
+ }
+ ]
}
- ]
}
- }
-}
+]
diff --git a/tests/topotests/isis_topo1_vrf/r5/r5_topology.json b/tests/topotests/isis_topo1_vrf/r5/r5_topology.json
index 2a088cae..8b5159cb 100644
--- a/tests/topotests/isis_topo1_vrf/r5/r5_topology.json
+++ b/tests/topotests/isis_topo1_vrf/r5/r5_topology.json
@@ -1,124 +1,122 @@
-{
- "1": {
- "level-1": {
- "ipv4": [
- {
- "vertex": "r5"
- },
- {
- "metric": "0",
- "parent": "r5(4)",
- "type": "IP internal",
- "vertex": "10.0.10.0/24"
- },
- {
- "metric": "0",
- "parent": "r5(4)",
- "type": "IP internal",
- "vertex": "10.0.11.0/24"
- },
- {
- "interface": "r5-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r5(4)",
- "type": "TE-IS",
- "vertex": "r3"
- },
- {
- "interface": "r5-eth1",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r5(4)",
- "type": "TE-IS",
- "vertex": "r4"
- },
- {
- "interface": "r5-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r3(4)",
- "type": "IP TE",
- "vertex": "10.0.20.0/24"
- },
- {
- "interface": "r5-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r3(4)",
- "type": "IP TE",
- "vertex": "10.0.10.0/24"
- },
- {
- "interface": "r5-eth1",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r4(4)",
- "type": "IP TE",
- "vertex": "10.0.21.0/24"
- },
- {
- "interface": "r5-eth1",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r4(4)",
- "type": "IP TE",
- "vertex": "10.0.11.0/24"
+[
+ {
+ "area": "1",
+ "algorithm": 0,
+ "level-1": {
+ "ipv4-paths": [
+ {
+ "vertex": "r5"
+ },
+ {
+ "metric": 0,
+ "parent": "r5(4)",
+ "type": "IP internal",
+ "vertex": "10.0.10.0/24"
+ },
+ {
+ "metric": 0,
+ "parent": "r5(4)",
+ "type": "IP internal",
+ "vertex": "10.0.11.0/24"
+ },
+ {
+ "interface": "r5-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r5(4)",
+ "type": "TE-IS",
+ "vertex": "r3"
+ },
+ {
+ "interface": "r5-eth1",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r5(4)",
+ "type": "TE-IS",
+ "vertex": "r4"
+ },
+ {
+ "interface": "r5-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r3(4)",
+ "type": "IP TE",
+ "vertex": "10.0.10.0/24"
+ },
+ {
+ "interface": "r5-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r3(4)",
+ "type": "IP TE",
+ "vertex": "10.0.20.0/24"
+ },
+ {
+ "interface": "r5-eth1",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r4(4)",
+ "type": "IP TE",
+ "vertex": "10.0.11.0/24"
+ },
+ {
+ "interface": "r5-eth1",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r4(4)",
+ "type": "IP TE",
+ "vertex": "10.0.21.0/24"
+ }
+ ],
+ "ipv6-paths": [
+ {
+ "vertex": "r5"
+ },
+ {
+ "metric": 0,
+ "parent": "r5(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:1::/64"
+ },
+ {
+ "metric": 0,
+ "parent": "r5(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:2:2::/64"
+ },
+ {
+ "interface": "r5-eth0",
+ "metric": 10,
+ "nextHop": "r3",
+ "parent": "r5(4)",
+ "type": "TE-IS",
+ "vertex": "r3"
+ },
+ {
+ "interface": "r5-eth1",
+ "metric": 10,
+ "nextHop": "r4",
+ "parent": "r5(4)",
+ "type": "TE-IS",
+ "vertex": "r4"
+ },
+ {
+ "metric": 10,
+ "interface": "r5-eth0",
+ "nextHop": "r3",
+ "parent": "r3(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:1::/64"
+ },
+ {
+ "metric": 10,
+ "interface": "r5-eth1",
+ "nextHop": "r4",
+ "parent": "r4(4)",
+ "type": "IP6 internal",
+ "vertex": "2001:db8:1:2::/64"
+ }
+ ]
}
- ],
- "ipv6": [
- {
- "vertex": "r5"
- },
- {
- "metric": "0",
- "parent": "r5(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:1::/64"
- },
- {
- "metric": "0",
- "parent": "r5(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:2:2::/64"
- },
- {
- "interface": "r5-eth0",
- "metric": "10",
- "next-hop": "r3",
- "parent": "r5(4)",
- "type": "TE-IS",
- "vertex": "r3"
- },
- {
- "interface": "r5-eth1",
- "metric": "10",
- "next-hop": "r4",
- "parent": "r5(4)",
- "type": "TE-IS",
- "vertex": "r4"
- },
- {
- "metric": "10",
- "interface": "r5-eth0",
- "next-hop": "r3",
- "parent": "r3(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:1::/64"
- },
- {
- "metric": "10",
- "interface": "r5-eth1",
- "next-hop": "r4",
- "parent": "r4(4)",
- "type": "IP6 internal",
- "vertex": "2001:db8:1:2::/64"
- }
- ]
- },
- "level-2": {
- "ipv4": [],
- "ipv6": []
}
- }
-}
+]
diff --git a/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py b/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
index 032319c4..afc6864b 100644
--- a/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
+++ b/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
@@ -118,7 +118,7 @@ def setup_module(mod):
tgen.start_router()
-def teardown_module(mod):
+def teardown_module():
"Teardown the pytest environment"
tgen = get_topogen()
# move back rx-eth0 to default VRF
@@ -141,8 +141,9 @@ def test_isis_convergence():
def compare_isis_topology(router, expected):
"Helper function to test ISIS vrf topology convergence."
- actual = show_isis_topology(router)
-
+ actual = json.loads(
+ router.vtysh_cmd(f"show isis vrf {router.name}-cust1 topology json")
+ )
return topotest.json_cmp(actual, expected)
test_func = functools.partial(compare_isis_topology, router, expected)
@@ -287,7 +288,7 @@ def dict_merge(dct, merge_dct):
Source:
https://gist.github.com/angstwad/bf22d1822c38a92ec0a9
"""
- for k, v in merge_dct.items():
+ for k, _ in merge_dct.items():
if k in dct and isinstance(dct[k], dict) and topotest.is_mapping(merge_dct[k]):
dict_merge(dct[k], merge_dct[k])
else:
@@ -377,52 +378,3 @@ def parse_topology(lines, level):
continue
return areas
-
-
-def show_isis_topology(router):
- """
- Get the ISIS vrf topology in a dictionary format.
-
- Sample:
- {
- 'area-name': {
- 'level-1': [
- {
- 'vertex': 'r1'
- }
- ],
- 'level-2': [
- {
- 'vertex': '10.0.0.1/24',
- 'type': 'IP',
- 'parent': '0',
- 'metric': 'internal'
- }
- ]
- },
- 'area-name-2': {
- 'level-2': [
- {
- "interface": "rX-ethY",
- "metric": "Z",
- "next-hop": "rA",
- "parent": "rC(B)",
- "type": "TE-IS",
- "vertex": "rD"
- }
- ]
- }
- }
- """
- l1out = topotest.normalize_text(
- router.vtysh_cmd("show isis vrf {}-cust1 topology level-1".format(router.name))
- ).splitlines()
- l2out = topotest.normalize_text(
- router.vtysh_cmd("show isis vrf {}-cust1 topology level-2".format(router.name))
- ).splitlines()
-
- l1 = parse_topology(l1out, "level-1")
- l2 = parse_topology(l2out, "level-2")
-
- dict_merge(l1, l2)
- return l1