From 2c7cac91ed6e7db0f6937923d2b57f97dbdbc337 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:53:30 +0200 Subject: Adding upstream version 8.4.4. Signed-off-by: Daniel Baumann --- tests/topotests/isis_lsp_bits_topo1/__init__.py | 0 tests/topotests/isis_lsp_bits_topo1/rt1/isisd.conf | 27 ++ .../rt1/step1/show_ip_route.ref | 89 +++++ .../rt1/step1/show_ipv6_route.ref | 65 ++++ .../step1/show_yang_interface_isis_adjacencies.ref | 32 ++ .../rt1/step2/show_ip_route.ref | 82 +++++ .../rt1/step2/show_ipv6_route.ref | 59 ++++ .../rt1/step3/show_ip_route.ref | 62 ++++ .../rt1/step3/show_ipv6_route.ref | 40 +++ .../rt1/step4/show_ip_route.ref | 89 +++++ .../rt1/step4/show_ipv6_route.ref | 65 ++++ tests/topotests/isis_lsp_bits_topo1/rt1/zebra.conf | 19 ++ tests/topotests/isis_lsp_bits_topo1/rt2/isisd.conf | 35 ++ .../rt2/step1/show_ip_route.ref | 77 +++++ .../rt2/step1/show_ipv6_route.ref | 40 +++ .../step1/show_yang_interface_isis_adjacencies.ref | 58 ++++ tests/topotests/isis_lsp_bits_topo1/rt2/zebra.conf | 22 ++ tests/topotests/isis_lsp_bits_topo1/rt3/isisd.conf | 35 ++ .../rt3/step1/show_ip_route.ref | 97 ++++++ .../rt3/step1/show_ipv6_route.ref | 59 ++++ .../step1/show_yang_interface_isis_adjacencies.ref | 51 +++ tests/topotests/isis_lsp_bits_topo1/rt3/zebra.conf | 22 ++ tests/topotests/isis_lsp_bits_topo1/rt4/isisd.conf | 42 +++ .../rt4/step1/show_ip_route.ref | 94 +++++ .../rt4/step1/show_ipv6_route.ref | 21 ++ .../step1/show_yang_interface_isis_adjacencies.ref | 63 ++++ tests/topotests/isis_lsp_bits_topo1/rt4/zebra.conf | 25 ++ tests/topotests/isis_lsp_bits_topo1/rt5/isisd.conf | 42 +++ .../rt5/step1/show_ip_route.ref | 116 +++++++ .../rt5/step1/show_ipv6_route.ref | 40 +++ .../step1/show_yang_interface_isis_adjacencies.ref | 63 ++++ tests/topotests/isis_lsp_bits_topo1/rt5/zebra.conf | 25 ++ tests/topotests/isis_lsp_bits_topo1/rt6/isisd.conf | 32 ++ .../rt6/step1/show_ip_route.ref | 106 ++++++ .../rt6/step1/show_ipv6_route.ref | 46 +++ .../step1/show_yang_interface_isis_adjacencies.ref | 44 +++ .../rt6/step2/show_ip_route.ref | 99 ++++++ .../rt6/step2/show_ipv6_route.ref | 40 +++ .../rt6/step3/show_ip_route.ref | 79 +++++ .../rt6/step3/show_ipv6_route.ref | 21 ++ .../rt6/step4/show_ip_route.ref | 106 ++++++ .../rt6/step4/show_ipv6_route.ref | 46 +++ tests/topotests/isis_lsp_bits_topo1/rt6/zebra.conf | 22 ++ .../test_isis_lsp_bits_topo1.py | 377 +++++++++++++++++++++ 44 files changed, 2674 insertions(+) create mode 100644 tests/topotests/isis_lsp_bits_topo1/__init__.py create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/isisd.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_yang_interface_isis_adjacencies.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt1/zebra.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt2/isisd.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_yang_interface_isis_adjacencies.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt2/zebra.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt3/isisd.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_yang_interface_isis_adjacencies.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt3/zebra.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt4/isisd.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_yang_interface_isis_adjacencies.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt4/zebra.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt5/isisd.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_yang_interface_isis_adjacencies.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt5/zebra.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/isisd.conf create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_yang_interface_isis_adjacencies.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ip_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ipv6_route.ref create mode 100644 tests/topotests/isis_lsp_bits_topo1/rt6/zebra.conf create mode 100755 tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py (limited to 'tests/topotests/isis_lsp_bits_topo1') diff --git a/tests/topotests/isis_lsp_bits_topo1/__init__.py b/tests/topotests/isis_lsp_bits_topo1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/isisd.conf b/tests/topotests/isis_lsp_bits_topo1/rt1/isisd.conf new file mode 100644 index 0000000..fc004e4 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/isisd.conf @@ -0,0 +1,27 @@ +password 1 +hostname rt1 +log file isisd.log +! +! debug isis events +! debug isis route-events +! debug isis spf-events +! debug isis sr-events +! debug isis lsp-gen +! +interface lo + ip router isis 1 + ipv6 router isis 1 + isis passive +! +interface eth-sw1 + ip router isis 1 + ipv6 router isis 1 + isis hello-multiplier 3 + isis priority 100 +! +router isis 1 + net 49.0000.0000.0000.0001.00 + is-type level-1 + lsp-gen-interval 2 + topology ipv6-unicast +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ip_route.ref new file mode 100644 index 0000000..8557f4b --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ip_route.ref @@ -0,0 +1,89 @@ +{ + "0.0.0.0\/0":[ + { + "prefix":"0.0.0.0\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + }, + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2.2.2.2\/32":[ + { + "prefix":"2.2.2.2\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "3.3.3.3\/32":[ + { + "prefix":"3.3.3.3\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "10.0.1.0\/24":[ + { + "prefix":"10.0.1.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1" + }, + { + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ipv6_route.ref new file mode 100644 index 0000000..fa76533 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_ipv6_route.ref @@ -0,0 +1,65 @@ +{ + "::\/0":[ + { + "prefix":"::\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + }, + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::2\/128":[ + { + "prefix":"2001:db8:1000::2\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::3\/128":[ + { + "prefix":"2001:db8:1000::3\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_yang_interface_isis_adjacencies.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_yang_interface_isis_adjacencies.ref new file mode 100644 index 0000000..26f0dff --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step1/show_yang_interface_isis_adjacencies.ref @@ -0,0 +1,32 @@ +{ + "frr-interface:lib": { + "interface": [ + { + "name": "eth-sw1", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0003", + "hold-timer": 9, + "neighbor-priority": 64, + "state": "up" + }, + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0002", + "hold-timer": 9, + "neighbor-priority": 64, + "state": "up" + } + ] + } + } + } + } + ] + } +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ip_route.ref new file mode 100644 index 0000000..c826efd --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ip_route.ref @@ -0,0 +1,82 @@ +{ + "0.0.0.0\/0":[ + { + "prefix":"0.0.0.0\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2.2.2.2\/32":[ + { + "prefix":"2.2.2.2\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "3.3.3.3\/32":[ + { + "prefix":"3.3.3.3\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "10.0.1.0\/24":[ + { + "prefix":"10.0.1.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1" + }, + { + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ipv6_route.ref new file mode 100644 index 0000000..a386b45 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step2/show_ipv6_route.ref @@ -0,0 +1,59 @@ +{ + "::\/0":[ + { + "prefix":"::\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::2\/128":[ + { + "prefix":"2001:db8:1000::2\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::3\/128":[ + { + "prefix":"2001:db8:1000::3\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ip_route.ref new file mode 100644 index 0000000..2b281b7 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ip_route.ref @@ -0,0 +1,62 @@ +{ + "2.2.2.2\/32":[ + { + "prefix":"2.2.2.2\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "3.3.3.3\/32":[ + { + "prefix":"3.3.3.3\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "10.0.1.0\/24":[ + { + "prefix":"10.0.1.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1" + }, + { + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ipv6_route.ref new file mode 100644 index 0000000..4b920ed --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step3/show_ipv6_route.ref @@ -0,0 +1,40 @@ +{ + "2001:db8:1000::2\/128":[ + { + "prefix":"2001:db8:1000::2\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::3\/128":[ + { + "prefix":"2001:db8:1000::3\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ip_route.ref new file mode 100644 index 0000000..8557f4b --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ip_route.ref @@ -0,0 +1,89 @@ +{ + "0.0.0.0\/0":[ + { + "prefix":"0.0.0.0\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + }, + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2.2.2.2\/32":[ + { + "prefix":"2.2.2.2\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "3.3.3.3\/32":[ + { + "prefix":"3.3.3.3\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "10.0.1.0\/24":[ + { + "prefix":"10.0.1.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1" + }, + { + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ipv6_route.ref new file mode 100644 index 0000000..fa76533 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/step4/show_ipv6_route.ref @@ -0,0 +1,65 @@ +{ + "::\/0":[ + { + "prefix":"::\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + }, + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::2\/128":[ + { + "prefix":"2001:db8:1000::2\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::3\/128":[ + { + "prefix":"2001:db8:1000::3\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt1/zebra.conf b/tests/topotests/isis_lsp_bits_topo1/rt1/zebra.conf new file mode 100644 index 0000000..37b3f27 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt1/zebra.conf @@ -0,0 +1,19 @@ +log file zebra.log +! +hostname rt1 +! +! debug zebra kernel +! debug zebra packet +! debug zebra mpls +! +interface lo + ip address 1.1.1.1/32 + ipv6 address 2001:db8:1000::1/128 +! +interface eth-sw1 + ip address 10.0.1.1/24 +! +ip forwarding +! +line vty +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt2/isisd.conf b/tests/topotests/isis_lsp_bits_topo1/rt2/isisd.conf new file mode 100644 index 0000000..d01720f --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt2/isisd.conf @@ -0,0 +1,35 @@ +hostname rt2 +log file isisd.log +! +! debug isis events +! debug isis route-events +! debug isis spf-events +! debug isis sr-events +! debug isis lsp-gen +! +interface lo + ip router isis 1 + ipv6 router isis 1 + isis passive +! +interface eth-sw1 + ip router isis 1 + ipv6 router isis 1 + isis hello-multiplier 3 +! +interface eth-rt4 + ip router isis 2 + ipv6 router isis 2 + isis network point-to-point + isis hello-multiplier 3 +! +router isis 1 + net 49.0000.0000.0000.0002.00 + lsp-gen-interval 2 + topology ipv6-unicast +! +router isis 2 + net 49.0002.0000.0000.0002.00 + lsp-gen-interval 2 + topology ipv6-unicast +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ip_route.ref new file mode 100644 index 0000000..d7e886c --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ip_route.ref @@ -0,0 +1,77 @@ +{ + "1.1.1.1\/32":[ + { + "prefix":"1.1.1.1\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.1", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "3.3.3.3\/32":[ + { + "prefix":"3.3.3.3\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "10.0.1.0\/24":[ + { + "prefix":"10.0.1.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.1.1", + "afi":"ipv4", + "interfaceName":"eth-sw1" + }, + { + "ip":"10.0.1.3", + "afi":"ipv4", + "interfaceName":"eth-sw1" + } + ] + } + ], + "10.0.2.0\/24":[ + { + "prefix":"10.0.2.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.2.4", + "afi":"ipv4", + "interfaceName":"eth-rt4" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ipv6_route.ref new file mode 100644 index 0000000..a92272f --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_ipv6_route.ref @@ -0,0 +1,40 @@ +{ + "2001:db8:1000::1\/128":[ + { + "prefix":"2001:db8:1000::1\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::3\/128":[ + { + "prefix":"2001:db8:1000::3\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_yang_interface_isis_adjacencies.ref b/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_yang_interface_isis_adjacencies.ref new file mode 100644 index 0000000..c70b44e --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt2/step1/show_yang_interface_isis_adjacencies.ref @@ -0,0 +1,58 @@ +{ + "frr-interface:lib": { + "interface": [ + { + "name": "eth-rt4", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0004", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + }, + { + "name": "eth-sw1", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0001", + "hold-timer": 9, + "neighbor-priority": 100, + "state": "up" + }, + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0003", + "hold-timer": 9, + "neighbor-priority": 64, + "state": "up" + }, + { + "neighbor-sys-type": "level-2", + "neighbor-sysid": "0000.0000.0003", + "hold-timer": 9, + "neighbor-priority": 64, + "state": "up" + } + ] + } + } + } + } + ] + } +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt2/zebra.conf b/tests/topotests/isis_lsp_bits_topo1/rt2/zebra.conf new file mode 100644 index 0000000..03acb6f --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt2/zebra.conf @@ -0,0 +1,22 @@ +log file zebra.log +! +hostname rt2 +! +! debug zebra kernel +! debug zebra packet +! debug zebra mpls +! +interface lo + ip address 2.2.2.2/32 + ipv6 address 2001:db8:1000::2/128 +! +interface eth-sw1 + ip address 10.0.1.2/24 +! +interface eth-rt4 + ip address 10.0.2.2/24 +! +ip forwarding +! +line vty +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt3/isisd.conf b/tests/topotests/isis_lsp_bits_topo1/rt3/isisd.conf new file mode 100644 index 0000000..a8d5896 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt3/isisd.conf @@ -0,0 +1,35 @@ +hostname rt3 +log file isisd.log +! +! debug isis events +! debug isis route-events +! debug isis spf-events +! debug isis sr-events +! debug isis lsp-gen +! +interface lo + ip router isis 1 + ipv6 router isis 1 + isis passive +! +interface eth-sw1 + ip router isis 1 + ipv6 router isis 1 + isis hello-multiplier 3 +! +interface eth-rt5 + ip router isis 2 + ipv6 router isis 2 + isis network point-to-point + isis hello-multiplier 3 +! +router isis 1 + net 49.0000.0000.0000.0003.00 + lsp-gen-interval 2 + topology ipv6-unicast +! +router isis 2 + net 49.0002.0000.0000.0003.00 + lsp-gen-interval 2 + topology ipv6-unicast +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ip_route.ref new file mode 100644 index 0000000..55f0aed --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ip_route.ref @@ -0,0 +1,97 @@ +{ + "1.1.1.1\/32":[ + { + "prefix":"1.1.1.1\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.1", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2.2.2.2\/32":[ + { + "prefix":"2.2.2.2\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "5.5.5.5\/32":[ + { + "prefix":"5.5.5.5\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.4.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "10.0.1.0\/24":[ + { + "prefix":"10.0.1.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.1.1", + "afi":"ipv4", + "interfaceName":"eth-sw1" + }, + { + "ip":"10.0.1.2", + "afi":"ipv4", + "interfaceName":"eth-sw1" + } + ] + } + ], + "10.0.4.0\/24":[ + { + "prefix":"10.0.4.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.4.5", + "afi":"ipv4", + "interfaceName":"eth-rt5" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ipv6_route.ref new file mode 100644 index 0000000..5d6dfca --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_ipv6_route.ref @@ -0,0 +1,59 @@ +{ + "2001:db8:1000::1\/128":[ + { + "prefix":"2001:db8:1000::1\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::2\/128":[ + { + "prefix":"2001:db8:1000::2\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-sw1", + "active":true + } + ] + } + ], + "2001:db8:1000::5\/128":[ + { + "prefix":"2001:db8:1000::5\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_yang_interface_isis_adjacencies.ref b/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_yang_interface_isis_adjacencies.ref new file mode 100644 index 0000000..6950086 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt3/step1/show_yang_interface_isis_adjacencies.ref @@ -0,0 +1,51 @@ +{ + "frr-interface:lib": { + "interface": [ + { + "name": "eth-rt5", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0005", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + }, + { + "name": "eth-sw1", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0001", + "hold-timer": 9, + "neighbor-priority": 100, + "state": "up" + }, + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0002", + "hold-timer": 9, + "neighbor-priority": 64, + "state": "up" + } + ] + } + } + } + } + ] + } +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt3/zebra.conf b/tests/topotests/isis_lsp_bits_topo1/rt3/zebra.conf new file mode 100644 index 0000000..5f59be1 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt3/zebra.conf @@ -0,0 +1,22 @@ +log file zebra.log +! +hostname rt3 +! +! debug zebra kernel +! debug zebra packet +! debug zebra mpls +! +interface lo + ip address 3.3.3.3/32 + ipv6 address 2001:db8:1000::3/128 +! +interface eth-sw1 + ip address 10.0.1.3/24 +! +interface eth-rt5 + ip address 10.0.4.3/24 +! +ip forwarding +! +line vty +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt4/isisd.conf b/tests/topotests/isis_lsp_bits_topo1/rt4/isisd.conf new file mode 100644 index 0000000..2d30790 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt4/isisd.conf @@ -0,0 +1,42 @@ +hostname rt4 +log file isisd.log +! +! debug isis events +! debug isis route-events +! debug isis spf-events +! debug isis sr-events +! debug isis lsp-gen +! +interface lo + ip router isis 4 + ipv6 router isis 4 + isis passive +! +interface eth-rt2 + ip router isis 2 + ipv6 router isis 2 + isis network point-to-point + isis hello-multiplier 3 +! +interface eth-rt5 + ip router isis 4 + ipv6 router isis 4 + isis network point-to-point + isis hello-multiplier 3 +! +interface eth-rt6 + ip router isis 4 + ipv6 router isis 4 + isis network point-to-point + isis hello-multiplier 3 +! +router isis 2 + net 49.0002.0000.0000.0004.00 + lsp-gen-interval 2 + topology ipv6-unicast +! +router isis 4 + net 49.0004.0000.0000.0004.00 + lsp-gen-interval 2 + topology ipv6-unicast +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ip_route.ref new file mode 100644 index 0000000..2cf5c40 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ip_route.ref @@ -0,0 +1,94 @@ +{ + "6.6.6.6\/32":[ + { + "prefix":"6.6.6.6\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.6", + "afi":"ipv4", + "interfaceName":"eth-rt6", + "active":true + } + ] + } + ], + "10.0.2.0\/24":[ + { + "prefix":"10.0.2.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.2.2", + "afi":"ipv4", + "interfaceName":"eth-rt2" + } + ] + } + ], + "10.0.6.0\/24":[ + { + "prefix":"10.0.6.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.6.5", + "afi":"ipv4", + "interfaceName":"eth-rt5" + } + ] + } + ], + "10.0.7.0\/24":[ + { + "prefix":"10.0.7.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.7.6", + "afi":"ipv4", + "interfaceName":"eth-rt6" + } + ] + } + ], + "10.0.8.0\/24":[ + { + "prefix":"10.0.8.0\/24", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.6.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + }, + { + "fib":true, + "ip":"10.0.7.6", + "afi":"ipv4", + "interfaceName":"eth-rt6", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ipv6_route.ref new file mode 100644 index 0000000..cde7287 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_ipv6_route.ref @@ -0,0 +1,21 @@ +{ + "2001:db8:1000::6\/128":[ + { + "prefix":"2001:db8:1000::6\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt6", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_yang_interface_isis_adjacencies.ref b/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_yang_interface_isis_adjacencies.ref new file mode 100644 index 0000000..233180c --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt4/step1/show_yang_interface_isis_adjacencies.ref @@ -0,0 +1,63 @@ +{ + "frr-interface:lib": { + "interface": [ + { + "name": "eth-rt2", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0002", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + }, + { + "name": "eth-rt5", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0005", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + }, + { + "name": "eth-rt6", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0006", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + } + ] + } +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt4/zebra.conf b/tests/topotests/isis_lsp_bits_topo1/rt4/zebra.conf new file mode 100644 index 0000000..a567f3b --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt4/zebra.conf @@ -0,0 +1,25 @@ +log file zebra.log +! +hostname rt4 +! +! debug zebra kernel +! debug zebra packet +! debug zebra mpls +! +interface lo + ip address 4.4.4.4/32 + ipv6 address 2001:db8:1000::4/128 +! +interface eth-rt2 + ip address 10.0.2.4/24 +! +interface eth-rt5 + ip address 10.0.6.4/24 +! +interface eth-rt6 + ip address 10.0.7.4/24 +! +ip forwarding +! +line vty +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt5/isisd.conf b/tests/topotests/isis_lsp_bits_topo1/rt5/isisd.conf new file mode 100644 index 0000000..263c3f9 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt5/isisd.conf @@ -0,0 +1,42 @@ +hostname rt5 +log file isisd.log +! +! debug isis events +! debug isis route-events +! debug isis spf-events +! debug isis sr-events +! debug isis lsp-gen +! +interface lo + ip router isis 2 + ipv6 router isis 2 + isis passive +! +interface eth-rt3 + ip router isis 2 + ipv6 router isis 2 + isis network point-to-point + isis hello-multiplier 3 +! +interface eth-rt4 + ip router isis 4 + ipv6 router isis 4 + isis network point-to-point + isis hello-multiplier 3 +! +interface eth-rt6 + ip router isis 4 + ipv6 router isis 4 + isis network point-to-point + isis hello-multiplier 3 +! +router isis 2 + net 49.0002.0000.0000.0005.00 + lsp-gen-interval 2 + topology ipv6-unicast +! +router isis 4 + net 49.0004.0000.0000.0005.00 + lsp-gen-interval 2 + topology ipv6-unicast +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ip_route.ref new file mode 100644 index 0000000..358d0a2 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ip_route.ref @@ -0,0 +1,116 @@ +{ + "4.4.4.4\/32":[ + { + "prefix":"4.4.4.4\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.6.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "6.6.6.6\/32":[ + { + "prefix":"6.6.6.6\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.8.6", + "afi":"ipv4", + "interfaceName":"eth-rt6", + "active":true + } + ] + } + ], + "10.0.4.0\/24":[ + { + "prefix":"10.0.4.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.4.3", + "afi":"ipv4", + "interfaceName":"eth-rt3" + } + ] + } + ], + "10.0.6.0\/24":[ + { + "prefix":"10.0.6.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.6.4", + "afi":"ipv4", + "interfaceName":"eth-rt4" + } + ] + } + ], + "10.0.7.0\/24":[ + { + "prefix":"10.0.7.0\/24", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "table":254, + "nexthops":[ + { + "fib":true, + "ip":"10.0.6.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + }, + { + "fib":true, + "ip":"10.0.8.6", + "afi":"ipv4", + "interfaceName":"eth-rt6", + "active":true + } + ] + } + ], + "10.0.8.0\/24":[ + { + "prefix":"10.0.8.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.8.6", + "afi":"ipv4", + "interfaceName":"eth-rt6", + "weight":1 + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ipv6_route.ref new file mode 100644 index 0000000..7586c73 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_ipv6_route.ref @@ -0,0 +1,40 @@ +{ + "2001:db8:1000::4\/128":[ + { + "prefix":"2001:db8:1000::4\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "2001:db8:1000::6\/128":[ + { + "prefix":"2001:db8:1000::6\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt6", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_yang_interface_isis_adjacencies.ref b/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_yang_interface_isis_adjacencies.ref new file mode 100644 index 0000000..f939a6a --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt5/step1/show_yang_interface_isis_adjacencies.ref @@ -0,0 +1,63 @@ +{ + "frr-interface:lib": { + "interface": [ + { + "name": "eth-rt3", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0003", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + }, + { + "name": "eth-rt4", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0004", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + }, + { + "name": "eth-rt6", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1", + "neighbor-sysid": "0000.0000.0006", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + } + ] + } +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt5/zebra.conf b/tests/topotests/isis_lsp_bits_topo1/rt5/zebra.conf new file mode 100644 index 0000000..50aedb3 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt5/zebra.conf @@ -0,0 +1,25 @@ +log file zebra.log +! +hostname rt5 +! +! debug zebra kernel +! debug zebra packet +! debug zebra mpls +! +interface lo + ip address 5.5.5.5/32 + ipv6 address 2001:db8:1000::5/128 +! +interface eth-rt3 + ip address 10.0.4.5/24 +! +interface eth-rt4 + ip address 10.0.6.5/24 +! +interface eth-rt6 + ip address 10.0.8.5/24 +! +ip forwarding +! +line vty +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/isisd.conf b/tests/topotests/isis_lsp_bits_topo1/rt6/isisd.conf new file mode 100644 index 0000000..505604e --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/isisd.conf @@ -0,0 +1,32 @@ +hostname rt6 +log file isisd.log +! +! debug isis events +! debug isis route-events +! debug isis spf-events +! debug isis sr-events +! debug isis lsp-gen +! +interface lo + ip router isis 4 + ipv6 router isis 4 + isis passive +! +interface eth-rt4 + ip router isis 4 + ipv6 router isis 4 + isis network point-to-point + isis hello-multiplier 3 +! +interface eth-rt5 + ip router isis 4 + ipv6 router isis 4 + isis network point-to-point + isis hello-multiplier 3 +! +router isis 4 + net 49.0004.0000.0000.0006.00 + is-type level-1 + lsp-gen-interval 2 + topology ipv6-unicast +! diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ip_route.ref new file mode 100644 index 0000000..4037579 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ip_route.ref @@ -0,0 +1,106 @@ +{ + "0.0.0.0\/0":[ + { + "prefix":"0.0.0.0\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + }, + { + "fib":true, + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "4.4.4.4\/32":[ + { + "prefix":"4.4.4.4\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "10.0.6.0\/24":[ + { + "prefix":"10.0.6.0\/24", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + }, + { + "fib":true, + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "10.0.7.0\/24":[ + { + "prefix":"10.0.7.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4" + } + ] + } + ], + "10.0.8.0\/24":[ + { + "prefix":"10.0.8.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ipv6_route.ref new file mode 100644 index 0000000..278129f --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_ipv6_route.ref @@ -0,0 +1,46 @@ +{ + "::\/0":[ + { + "prefix":"::\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt5", + "active":true + }, + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "2001:db8:1000::4\/128":[ + { + "prefix":"2001:db8:1000::4\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_yang_interface_isis_adjacencies.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_yang_interface_isis_adjacencies.ref new file mode 100644 index 0000000..b4e8c23 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step1/show_yang_interface_isis_adjacencies.ref @@ -0,0 +1,44 @@ +{ + "frr-interface:lib": { + "interface": [ + { + "name": "eth-rt4", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0004", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + }, + { + "name": "eth-rt5", + "vrf": "default", + "state": { + "frr-isisd:isis": { + "adjacencies": { + "adjacency": [ + { + "neighbor-sys-type": "level-1-2", + "neighbor-sysid": "0000.0000.0005", + "hold-timer": 9, + "neighbor-priority": 0, + "state": "up" + } + ] + } + } + } + } + ] + } +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ip_route.ref new file mode 100644 index 0000000..8083be4 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ip_route.ref @@ -0,0 +1,99 @@ +{ + "0.0.0.0\/0":[ + { + "prefix":"0.0.0.0\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "4.4.4.4\/32":[ + { + "prefix":"4.4.4.4\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "10.0.6.0\/24":[ + { + "prefix":"10.0.6.0\/24", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + }, + { + "fib":true, + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "10.0.7.0\/24":[ + { + "prefix":"10.0.7.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4" + } + ] + } + ], + "10.0.8.0\/24":[ + { + "prefix":"10.0.8.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ipv6_route.ref new file mode 100644 index 0000000..2e982e0 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step2/show_ipv6_route.ref @@ -0,0 +1,40 @@ +{ + "::\/0":[ + { + "prefix":"::\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "2001:db8:1000::4\/128":[ + { + "prefix":"2001:db8:1000::4\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ip_route.ref new file mode 100644 index 0000000..1ba8c8c --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ip_route.ref @@ -0,0 +1,79 @@ +{ + "4.4.4.4\/32":[ + { + "prefix":"4.4.4.4\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "10.0.6.0\/24":[ + { + "prefix":"10.0.6.0\/24", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + }, + { + "fib":true, + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "10.0.7.0\/24":[ + { + "prefix":"10.0.7.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4" + } + ] + } + ], + "10.0.8.0\/24":[ + { + "prefix":"10.0.8.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ipv6_route.ref new file mode 100644 index 0000000..9b53a1d --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step3/show_ipv6_route.ref @@ -0,0 +1,21 @@ +{ + "2001:db8:1000::4\/128":[ + { + "prefix":"2001:db8:1000::4\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ip_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ip_route.ref new file mode 100644 index 0000000..4037579 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ip_route.ref @@ -0,0 +1,106 @@ +{ + "0.0.0.0\/0":[ + { + "prefix":"0.0.0.0\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + }, + { + "fib":true, + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "4.4.4.4\/32":[ + { + "prefix":"4.4.4.4\/32", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "10.0.6.0\/24":[ + { + "prefix":"10.0.6.0\/24", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4", + "active":true + }, + { + "fib":true, + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true + } + ] + } + ], + "10.0.7.0\/24":[ + { + "prefix":"10.0.7.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.7.4", + "afi":"ipv4", + "interfaceName":"eth-rt4" + } + ] + } + ], + "10.0.8.0\/24":[ + { + "prefix":"10.0.8.0\/24", + "protocol":"isis", + "distance":115, + "metric":20, + "nexthops":[ + { + "ip":"10.0.8.5", + "afi":"ipv4", + "interfaceName":"eth-rt5" + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ipv6_route.ref b/tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ipv6_route.ref new file mode 100644 index 0000000..278129f --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/step4/show_ipv6_route.ref @@ -0,0 +1,46 @@ +{ + "::\/0":[ + { + "prefix":"::\/0", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":10, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt5", + "active":true + }, + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ], + "2001:db8:1000::4\/128":[ + { + "prefix":"2001:db8:1000::4\/128", + "protocol":"isis", + "selected":true, + "destSelected":true, + "distance":115, + "metric":20, + "installed":true, + "nexthops":[ + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt4", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/isis_lsp_bits_topo1/rt6/zebra.conf b/tests/topotests/isis_lsp_bits_topo1/rt6/zebra.conf new file mode 100644 index 0000000..4d51d3d --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/rt6/zebra.conf @@ -0,0 +1,22 @@ +log file zebra.log +! +hostname rt6 +! +! debug zebra kernel +! debug zebra packet +! debug zebra mpls +! +interface lo + ip address 6.6.6.6/32 + ipv6 address 2001:db8:1000::6/128 +! +interface eth-rt4 + ip address 10.0.7.6/24 +! +interface eth-rt5 + ip address 10.0.8.6/24 +! +ip forwarding +! +line vty +! diff --git a/tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py b/tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py new file mode 100755 index 0000000..9b4cd95 --- /dev/null +++ b/tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py @@ -0,0 +1,377 @@ +#!/usr/bin/env python + +# +# test_isis_lsp_bits_topo1.py +# Part of NetDEF Topology Tests +# +# Copyright (c) 2021 by Volta Networks +# +# Permission to use, copy, modify, and/or distribute this software +# for any purpose with or without fee is hereby granted, provided +# that the above copyright notice and this permission notice appear +# in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. +# + +""" +test_isis_lsp_bits_topo1.py: + + +---------+ + | | + | RT1 | + | 1.1.1.1 | + | L1 | + +---------+ + |eth-sw1 + | + | + | + +---------+ | +---------+ + | | | | | + | RT2 |eth-sw1 | eth-sw1| RT3 | + | 2.2.2.2 +----------+----------+ 3.3.3.3 | + | L1|L2 | 10.0.1.0/24 | L1|L2 | + +---------+ +---------+ + eth-rt4| eth-rt5| + | | + 10.0.2.0/24| |10.0.4.0/24 + | | + eth-rt2| eth-rt3| + +---------+ +---------+ + | | | | + | RT4 | 10.0.6.0/24 | RT5 | + | 4.4.4.4 +---------------------+ 5.5.5.5 | + | L1|L2 |eth-rt5 eth-rt4| L1|L2 | + +---------+ +---------+ + eth-rt6| |eth-rt6 + | | + 10.0.7.0/24| |10.0.8.0/24 + | +---------+ | + | | | | + | | RT6 | | + +----------+ 6.6.6.6 +-----------+ + eth-rt4| L1 |eth-rt5 + +---------+ +""" + +import os +import sys +import pytest +import json +from functools import partial + +# Save the Current Working Directory to find configuration files. +CWD = os.path.dirname(os.path.realpath(__file__)) +sys.path.append(os.path.join(CWD, "../")) + +# pylint: disable=C0413 +# Import topogen and topotest helpers +from lib import topotest +from lib.topogen import Topogen, TopoRouter, get_topogen +from lib.topolog import logger + +# Required to instantiate the topology builder class. + +pytestmark = [pytest.mark.isisd] + + +# Global multi-dimensional dictionary containing all expected outputs +outputs = {} + + +def build_topo(tgen): + "Build function" + + # + # Define FRR Routers + # + for router in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]: + tgen.add_router(router) + + # + # Define connections + # + switch = tgen.add_switch("s1") + switch.add_link(tgen.gears["rt1"], nodeif="eth-sw1") + switch.add_link(tgen.gears["rt2"], nodeif="eth-sw1") + switch.add_link(tgen.gears["rt3"], nodeif="eth-sw1") + + switch = tgen.add_switch("s2") + switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4") + switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2") + + switch = tgen.add_switch("s4") + switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5") + switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3") + + switch = tgen.add_switch("s6") + switch.add_link(tgen.gears["rt4"], nodeif="eth-rt5") + switch.add_link(tgen.gears["rt5"], nodeif="eth-rt4") + + switch = tgen.add_switch("s7") + switch.add_link(tgen.gears["rt4"], nodeif="eth-rt6") + switch.add_link(tgen.gears["rt6"], nodeif="eth-rt4") + + switch = tgen.add_switch("s8") + switch.add_link(tgen.gears["rt5"], nodeif="eth-rt6") + switch.add_link(tgen.gears["rt6"], nodeif="eth-rt5") + + +def setup_module(mod): + "Sets up the pytest environment" + tgen = Topogen(build_topo, mod.__name__) + tgen.start_topology() + + router_list = tgen.routers() + + # For all registered routers, load the zebra configuration file + for rname, router in router_list.items(): + router.load_config( + TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) + ) + router.load_config( + TopoRouter.RD_ISIS, os.path.join(CWD, "{}/isisd.conf".format(rname)) + ) + + tgen.start_router() + + +def teardown_module(mod): + "Teardown the pytest environment" + tgen = get_topogen() + + # This function tears down the whole topology. + tgen.stop_topology() + + +def router_compare_json_output(rname, command, reference): + "Compare router JSON output" + + logger.info('Comparing router "%s" "%s" output', rname, command) + + tgen = get_topogen() + filename = "{}/{}/{}".format(CWD, rname, reference) + expected = json.loads(open(filename).read()) + + # Run test function until we get an result. Wait at most 60 seconds. + test_func = partial(topotest.router_json_cmp, tgen.gears[rname], command, expected) + _, diff = topotest.run_and_expect(test_func, None, count=120, wait=0.5) + assertmsg = '"{}" JSON output mismatches the expected result'.format(rname) + assert diff is None, assertmsg + + +# +# Step 1 +# +# Test initial network convergence +# Attach-bit defaults to on, so expect default route pointing to L1|L2 router +# +def test_isis_adjacencies_step1(): + logger.info("Test (step 1): check IS-IS adjacencies") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]: + router_compare_json_output( + rname, + "show yang operational-data /frr-interface:lib isisd", + "step1/show_yang_interface_isis_adjacencies.ref", + ) + + +def test_rib_ipv4_step1(): + logger.info("Test (step 1): verify IPv4 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]: + router_compare_json_output( + rname, "show ip route isis json", "step1/show_ip_route.ref" + ) + + +def test_rib_ipv6_step1(): + logger.info("Test (step 1): verify IPv6 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]: + router_compare_json_output( + rname, "show ipv6 route isis json", "step1/show_ipv6_route.ref" + ) + + +# +# Step 2 +# +# Action(s): +# -Disable sending Attach bit on RT2 and RT4 +# +# Expected changes: +# -RT1 should remove the default route pointing to RT2 +# -RT6 should remove the default route pointing to RT4 +# +def test_rib_ipv4_step2(): + logger.info("Test (step 2): verify IPv4 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + logger.info("Disabling setting the attached-bit on RT2 and RT4") + tgen.net["rt2"].cmd( + 'vtysh -c "conf t" -c "router isis 1" -c "no attached-bit send"' + ) + tgen.net["rt4"].cmd( + 'vtysh -c "conf t" -c "router isis 1" -c "no attached-bit send"' + ) + + for rname in ["rt1", "rt6"]: + router_compare_json_output( + rname, "show ip route isis json", "step2/show_ip_route.ref" + ) + + +def test_rib_ipv6_step2(): + logger.info("Test (step 2): verify IPv6 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + for rname in ["rt1", "rt6"]: + router_compare_json_output( + rname, "show ipv6 route isis json", "step2/show_ipv6_route.ref" + ) + + +# +# Step 3 +# +# Action(s): +# -restore attach-bit, enable sending attach-bit +# -disble processing a LSP with attach bit set +# +# Expected changes: +# -RT1 and RT6 should not install a default route +# +def test_rib_ipv4_step3(): + logger.info("Test (step 3): verify IPv4 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + logger.info("Enable setting the attached-bit on RT2 and RT4") + tgen.net["rt2"].cmd('vtysh -c "conf t" -c "router isis 1" -c "attached-bit send"') + tgen.net["rt4"].cmd('vtysh -c "conf t" -c "router isis 1" -c "attached-bit send"') + + logger.info("Disable processing received attached-bit in LSP on RT1 and RT6") + tgen.net["rt1"].cmd( + 'vtysh -c "conf t" -c "router isis 1" -c "attached-bit receive ignore"' + ) + tgen.net["rt6"].cmd( + 'vtysh -c "conf t" -c "router isis 1" -c "attached-bit receive ignore"' + ) + + for rname in ["rt1", "rt6"]: + router_compare_json_output( + rname, "show ip route isis json", "step3/show_ip_route.ref" + ) + + +def test_rib_ipv6_step3(): + logger.info("Test (step 3): verify IPv6 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + for rname in ["rt1", "rt6"]: + router_compare_json_output( + rname, "show ipv6 route isis json", "step3/show_ipv6_route.ref" + ) + + +# +# Step 4 +# +# Action(s): +# -restore back to default attach-bit config +# +# Expected changes: +# -RT1 and RT6 should add default route +# -no changes on other routers +# +def test_rib_ipv4_step4(): + logger.info("Test (step 4): verify IPv4 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + logger.info( + "restore default processing on received attached-bit in LSP on RT1 and RT6" + ) + tgen.net["rt1"].cmd( + 'vtysh -c "conf t" -c "router isis 1" -c "no attached-bit receive ignore"' + ) + tgen.net["rt6"].cmd( + 'vtysh -c "conf t" -c "router isis 1" -c "no attached-bit receive ignore"' + ) + + for rname in ["rt1", "rt6"]: + router_compare_json_output( + rname, "show ip route isis json", "step4/show_ip_route.ref" + ) + + +def test_rib_ipv6_step4(): + logger.info("Test (step 4): verify IPv6 RIB") + tgen = get_topogen() + + # Skip if previous fatal error condition is raised + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + for rname in ["rt1", "rt6"]: + router_compare_json_output( + rname, "show ipv6 route isis json", "step4/show_ipv6_route.ref" + ) + + +# Memory leak test template +def test_memory_leak(): + "Run the memory leak test and report results." + tgen = get_topogen() + if not tgen.is_memleak_enabled(): + pytest.skip("Memory leak test/report is disabled") + + tgen.report_memory_leaks() + + +if __name__ == "__main__": + args = ["-s"] + sys.argv[1:] + sys.exit(pytest.main(args)) -- cgit v1.2.3