summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]tests/topotests/ospf-sr-topo1/__init__.py0
-rw-r--r--tests/topotests/ospf-sr-topo1/r1/ospf_srdb.json161
-rw-r--r--tests/topotests/ospf-sr-topo1/r1/ospfd.conf27
-rw-r--r--tests/topotests/ospf-sr-topo1/r1/zebra.conf12
-rw-r--r--tests/topotests/ospf-sr-topo1/r1/zebra_mpls.json115
-rw-r--r--tests/topotests/ospf-sr-topo1/r2/ospf_srdb.json183
-rw-r--r--tests/topotests/ospf-sr-topo1/r2/ospfd.conf36
-rw-r--r--tests/topotests/ospf-sr-topo1/r2/zebra.conf18
-rw-r--r--tests/topotests/ospf-sr-topo1/r2/zebra_mpls.json179
-rw-r--r--tests/topotests/ospf-sr-topo1/r3/ospf_srdb.json130
-rw-r--r--tests/topotests/ospf-sr-topo1/r3/ospfd.conf22
-rw-r--r--tests/topotests/ospf-sr-topo1/r3/zebra.conf9
-rw-r--r--tests/topotests/ospf-sr-topo1/r3/zebra_mpls.json82
-rw-r--r--tests/topotests/ospf-sr-topo1/r4/ospf_srdb.json130
-rw-r--r--tests/topotests/ospf-sr-topo1/r4/ospfd.conf23
-rw-r--r--tests/topotests/ospf-sr-topo1/r4/zebra.conf9
-rw-r--r--tests/topotests/ospf-sr-topo1/r4/zebra_mpls.json97
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/ospfd.conf (renamed from tests/topotests/ospf-sr-topo2/rt1/ospfd.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step1/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step1/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step1/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step1/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step10/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step10/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step10/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step10/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step2/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step2/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step2/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step2/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step3/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step3/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step3/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step3/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step4/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step4/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step4/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step4/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step5/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step5/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step5/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step5/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step6/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step6/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step6/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step6/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step7/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step7/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step7/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step7/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step8/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step8/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step8/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step8/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step9/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step9/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/step9/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt1/step9/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt1/zebra.conf (renamed from tests/topotests/ospf-sr-topo2/rt1/zebra.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/ospfd.conf (renamed from tests/topotests/ospf-sr-topo2/rt2/ospfd.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step1/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step1/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step1/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step1/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step10/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step10/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step10/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step10/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step2/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step2/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step2/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step2/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step3/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step3/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step3/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step3/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step4/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step4/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step4/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step4/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step5/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step5/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step5/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step5/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step6/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step6/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step6/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step6/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step7/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step7/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step7/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step7/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step8/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step8/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step8/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step8/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step9/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step9/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/step9/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt2/step9/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt2/zebra.conf (renamed from tests/topotests/ospf-sr-topo2/rt2/zebra.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/ospfd.conf (renamed from tests/topotests/ospf-sr-topo2/rt3/ospfd.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step1/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step1/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step1/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step1/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step10/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step10/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step10/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step10/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step2/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step2/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step2/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step2/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step3/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step3/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step3/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step3/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step4/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step4/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step4/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step4/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step5/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step5/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step5/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step5/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step6/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step6/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step6/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step6/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step7/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step7/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step7/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step7/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step8/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step8/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step8/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step8/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step9/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step9/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/step9/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt3/step9/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt3/zebra.conf (renamed from tests/topotests/ospf-sr-topo2/rt3/zebra.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/ospfd.conf (renamed from tests/topotests/ospf-sr-topo2/rt4/ospfd.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step1/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step1/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step1/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step1/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step10/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step10/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step10/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step10/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step2/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step2/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step2/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step2/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step3/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step3/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step3/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step3/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step4/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step4/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step4/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step4/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step5/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step5/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step5/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step5/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step6/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step6/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step6/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step6/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step7/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step7/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step7/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step7/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step8/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step8/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step8/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step8/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step9/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step9/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/step9/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt4/step9/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt4/zebra.conf (renamed from tests/topotests/ospf-sr-topo2/rt4/zebra.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/ospfd.conf (renamed from tests/topotests/ospf-sr-topo2/rt5/ospfd.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step1/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step1/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step1/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step1/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step10/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step10/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step10/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step10/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step2/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step2/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step2/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step2/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step3/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step3/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step3/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step3/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step4/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step4/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step4/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step4/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step5/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step5/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step5/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step5/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step6/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step6/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step6/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step6/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step7/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step7/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step7/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step7/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step8/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step8/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step8/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step8/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step9/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step9/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/step9/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt5/step9/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt5/zebra.conf (renamed from tests/topotests/ospf-sr-topo2/rt5/zebra.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/ospfd.conf (renamed from tests/topotests/ospf-sr-topo2/rt6/ospfd.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step1/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step1/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step1/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step1/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step10/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step10/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step10/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step10/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step2/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step2/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step2/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step2/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step3/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step3/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step3/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step3/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step4/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step4/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step4/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step4/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step5/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step5/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step5/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step5/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step6/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step6/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step6/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step6/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step7/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step7/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step7/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step7/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step8/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step8/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step8/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step8/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step9/show_ip_route.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step9/show_ip_route.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/step9/show_mpls_table.ref (renamed from tests/topotests/ospf-sr-topo2/rt6/step9/show_mpls_table.ref)0
-rw-r--r--tests/topotests/ospf-sr-topo1/rt6/zebra.conf (renamed from tests/topotests/ospf-sr-topo2/rt6/zebra.conf)0
-rw-r--r--tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.dot78
-rw-r--r--tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.jpgbin48784 -> 0 bytes
-rw-r--r--tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.py666
-rw-r--r--tests/topotests/ospf-sr-topo2/__init__.py0
-rw-r--r--tests/topotests/ospf-sr-topo2/test_ospf_sr_topo2.py695
154 files changed, 575 insertions, 2097 deletions
diff --git a/tests/topotests/ospf-sr-topo1/__init__.py b/tests/topotests/ospf-sr-topo1/__init__.py
index e69de29bb2..e69de29bb2 100755..100644
--- a/tests/topotests/ospf-sr-topo1/__init__.py
+++ b/tests/topotests/ospf-sr-topo1/__init__.py
diff --git a/tests/topotests/ospf-sr-topo1/r1/ospf_srdb.json b/tests/topotests/ospf-sr-topo1/r1/ospf_srdb.json
deleted file mode 100644
index 952a26ed10..0000000000
--- a/tests/topotests/ospf-sr-topo1/r1/ospf_srdb.json
+++ /dev/null
@@ -1,161 +0,0 @@
-{
- "srdbID":"10.0.255.1",
- "srNodes":[
- {
- "routerID":"10.0.255.2",
- "srgbSize":8000,
- "srgbLabel":16000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "extendedPrefix":[
- {
- "prefix":"10.0.255.2\/32",
- "sid":200,
- "inputLabel":20200,
- "prefixRoute":[
- {
- "outputLabel":3,
- "interface":"r1-eth0",
- "nexthop":"10.0.0.2"
- },
- {
- "outputLabel":3,
- "interface":"r1-eth1",
- "nexthop":"10.0.1.2"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.4",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":12,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.4\/32",
- "sid":400,
- "inputLabel":20400,
- "prefixRoute":[
- {
- "outputLabel":16400,
- "interface":"r1-eth0",
- "nexthop":"10.0.0.2"
- },
- {
- "outputLabel":16400,
- "interface":"r1-eth1",
- "nexthop":"10.0.1.2"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.3",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":8,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.3\/32",
- "sid":300,
- "inputLabel":20300,
- "prefixRoute":[
- {
- "outputLabel":16300,
- "interface":"r1-eth0",
- "nexthop":"10.0.0.2"
- },
- {
- "outputLabel":16300,
- "interface":"r1-eth1",
- "nexthop":"10.0.1.2"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.1",
- "srgbSize":10000,
- "srgbLabel":20000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":16,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.1\/32",
- "sid":100,
- "inputLabel":0,
- "prefixRoute":[
- {
- "outputLabel":0,
- "interface":"lo",
- "nexthop":"10.0.255.1"
- }
- ]
- }
- ],
- "extendedLink":[
- {
- "prefix":"10.0.0.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r1-eth0",
- "nexthop":"10.0.0.2"
- },
- {
- "prefix":"10.0.0.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r1-eth0",
- "nexthop":"10.0.0.2"
- },
- {
- "prefix":"10.0.1.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r1-eth1",
- "nexthop":"10.0.1.2"
- },
- {
- "prefix":"10.0.1.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r1-eth1",
- "nexthop":"10.0.1.2"
- }
- ]
- }
- ]
-}
diff --git a/tests/topotests/ospf-sr-topo1/r1/ospfd.conf b/tests/topotests/ospf-sr-topo1/r1/ospfd.conf
deleted file mode 100644
index 0773153a76..0000000000
--- a/tests/topotests/ospf-sr-topo1/r1/ospfd.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-debug ospf sr
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface r1-eth0
- ip ospf network point-to-point
- ip ospf hello-interval 2
- ip ospf dead-interval 10
- ip ospf area 0.0.0.0
-!
-interface r1-eth1
- ip ospf network point-to-point
- ip ospf hello-interval 2
- ip ospf dead-interval 10
- ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 10.0.255.1
- capability opaque
- router-info area 0.0.0.0
- segment-routing on
- segment-routing node-msd 16
- segment-routing global-block 20000 29999
- segment-routing prefix 10.0.255.1/32 index 100 explicit-null
-!
-
diff --git a/tests/topotests/ospf-sr-topo1/r1/zebra.conf b/tests/topotests/ospf-sr-topo1/r1/zebra.conf
deleted file mode 100644
index faf71db25c..0000000000
--- a/tests/topotests/ospf-sr-topo1/r1/zebra.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-!
-interface lo
- ip address 10.0.255.1/32
-!
-interface r1-eth0
- ip address 10.0.0.1/24
-!
-interface r1-eth1
- ip address 10.0.1.1/24
-!
-ip forwarding
-!
diff --git a/tests/topotests/ospf-sr-topo1/r1/zebra_mpls.json b/tests/topotests/ospf-sr-topo1/r1/zebra_mpls.json
deleted file mode 100644
index 6c87596acb..0000000000
--- a/tests/topotests/ospf-sr-topo1/r1/zebra_mpls.json
+++ /dev/null
@@ -1,115 +0,0 @@
-[
- {
- "inLabel":20200,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.2"
- },
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "distance":150,
- "installed":true,
- "nexthop":"10.0.0.2"
- }
- ]
- },
- {
- "inLabel":20300,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":16300,
- "outLabelStack":[
- 16300
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.2"
- }
- ]
- },
- {
- "inLabel":20400,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":16400,
- "outLabelStack":[
- 16400
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.2"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "distance":150,
- "installed":true,
- "nexthop":"10.0.0.2"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "distance":150,
- "installed":true,
- "nexthop":"10.0.0.2"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.2"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.2"
- }
- ]
- }
-]
diff --git a/tests/topotests/ospf-sr-topo1/r2/ospf_srdb.json b/tests/topotests/ospf-sr-topo1/r2/ospf_srdb.json
deleted file mode 100644
index 1de780d84e..0000000000
--- a/tests/topotests/ospf-sr-topo1/r2/ospf_srdb.json
+++ /dev/null
@@ -1,183 +0,0 @@
-{
- "srdbID":"10.0.255.2",
- "srNodes":[
- {
- "routerID":"10.0.255.2",
- "srgbSize":8000,
- "srgbLabel":16000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "extendedPrefix":[
- {
- "prefix":"10.0.255.2\/32",
- "sid":200,
- "inputLabel":0,
- "prefixRoute":[
- {
- "outputLabel":0,
- "interface":"lo",
- "nexthop":"10.0.255.2"
- }
- ]
- }
- ],
- "extendedLink":[
- {
- "prefix":"10.0.4.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth3",
- "nexthop":"10.0.4.1"
- },
- {
- "prefix":"10.0.4.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth3",
- "nexthop":"10.0.4.1"
- },
- {
- "prefix":"10.0.0.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth0",
- "nexthop":"10.0.0.1"
- },
- {
- "prefix":"10.0.0.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth0",
- "nexthop":"10.0.0.1"
- },
- {
- "prefix":"10.0.1.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth1",
- "nexthop":"10.0.1.1"
- },
- {
- "prefix":"10.0.1.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth1",
- "nexthop":"10.0.1.1"
- },
- {
- "prefix":"10.0.3.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth2",
- "nexthop":"10.0.3.1"
- },
- {
- "prefix":"10.0.3.2\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r2-eth2",
- "nexthop":"10.0.3.1"
- }
- ]
- },
- {
- "routerID":"10.0.255.4",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":12,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.4\/32",
- "sid":400,
- "inputLabel":16400,
- "prefixRoute":[
- {
- "outputLabel":10400,
- "interface":"r2-eth3",
- "nexthop":"10.0.4.1"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.3",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":8,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.3\/32",
- "sid":300,
- "inputLabel":16300,
- "prefixRoute":[
- {
- "outputLabel":3,
- "interface":"r2-eth2",
- "nexthop":"10.0.3.1"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.1",
- "srgbSize":10000,
- "srgbLabel":20000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":16,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.1\/32",
- "sid":100,
- "inputLabel":16100,
- "prefixRoute":[
- {
- "outputLabel":0,
- "interface":"r2-eth0",
- "nexthop":"10.0.0.1"
- },
- {
- "outputLabel":0,
- "interface":"r2-eth1",
- "nexthop":"10.0.1.1"
- }
- ]
- }
- ]
- }
- ]
-}
diff --git a/tests/topotests/ospf-sr-topo1/r2/ospfd.conf b/tests/topotests/ospf-sr-topo1/r2/ospfd.conf
deleted file mode 100644
index 92dc2f7cd1..0000000000
--- a/tests/topotests/ospf-sr-topo1/r2/ospfd.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-!
-debug ospf sr
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface r2-eth0
- ip ospf network point-to-point
- ip ospf hello-interval 2
- ip ospf dead-interval 10
- ip ospf area 0.0.0.0
-!
-interface r2-eth1
- ip ospf network point-to-point
- ip ospf hello-interval 2
- ip ospf dead-interval 10
- ip ospf area 0.0.0.0
-!
-interface r2-eth2
- ip ospf area 0.0.0.0
- ip ospf hello-interval 2
- ip ospf dead-interval 10
-!
-interface r2-eth3
- ip ospf network point-to-point
- ip ospf hello-interval 2
- ip ospf dead-interval 10
- ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 10.0.255.2
- capability opaque
- router-info area 0.0.0.0
- segment-routing on
- segment-routing prefix 10.0.255.2/32 index 200
-!
diff --git a/tests/topotests/ospf-sr-topo1/r2/zebra.conf b/tests/topotests/ospf-sr-topo1/r2/zebra.conf
deleted file mode 100644
index ba1d833f50..0000000000
--- a/tests/topotests/ospf-sr-topo1/r2/zebra.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-!
-interface lo
- ip address 10.0.255.2/32
-!
-interface r2-eth0
- ip address 10.0.0.2/24
-!
-interface r2-eth1
- ip address 10.0.1.2/24
-!
-interface r2-eth2
- ip address 10.0.3.2/24
-!
-interface r2-eth3
- ip address 10.0.4.2/24
-!
-ip forwarding
-!
diff --git a/tests/topotests/ospf-sr-topo1/r2/zebra_mpls.json b/tests/topotests/ospf-sr-topo1/r2/zebra_mpls.json
deleted file mode 100644
index a885e88fc5..0000000000
--- a/tests/topotests/ospf-sr-topo1/r2/zebra_mpls.json
+++ /dev/null
@@ -1,179 +0,0 @@
-[
- {
- "inLabel":16100,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":0,
- "outLabelStack":[
- 0
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.1"
- },
- {
- "type":"SR (OSPF)",
- "outLabel":0,
- "distance":150,
- "installed":true,
- "nexthop":"10.0.0.1"
- }
- ]
- },
- {
- "inLabel":16300,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.1"
- }
- ]
- },
- {
- "inLabel":16400,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":10400,
- "outLabelStack":[
- 10400
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.0.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.0.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.1.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.1"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.1"
- }
- ]
- }
-]
diff --git a/tests/topotests/ospf-sr-topo1/r3/ospf_srdb.json b/tests/topotests/ospf-sr-topo1/r3/ospf_srdb.json
deleted file mode 100644
index e7371ff593..0000000000
--- a/tests/topotests/ospf-sr-topo1/r3/ospf_srdb.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "srdbID":"10.0.255.3",
- "srNodes":[
- {
- "routerID":"10.0.255.2",
- "srgbSize":8000,
- "srgbLabel":16000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "extendedPrefix":[
- {
- "prefix":"10.0.255.2\/32",
- "sid":200,
- "inputLabel":10200,
- "prefixRoute":[
- {
- "outputLabel":3,
- "interface":"r3-eth0",
- "nexthop":"10.0.3.2"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.4",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":12,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.4\/32",
- "sid":400,
- "inputLabel":10400,
- "prefixRoute":[
- {
- "outputLabel":16400,
- "interface":"r3-eth0",
- "nexthop":"10.0.3.2"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.3",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":8,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.3\/32",
- "sid":300,
- "inputLabel":0,
- "prefixRoute":[
- {
- "outputLabel":0,
- "interface":"lo",
- "nexthop":"10.0.255.3"
- }
- ]
- }
- ],
- "extendedLink":[
- {
- "prefix":"10.0.3.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r3-eth0",
- "nexthop":"10.0.3.2"
- },
- {
- "prefix":"10.0.3.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r3-eth0",
- "nexthop":"10.0.3.2"
- }
- ]
- },
- {
- "routerID":"10.0.255.1",
- "srgbSize":10000,
- "srgbLabel":20000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":16,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.1\/32",
- "sid":100,
- "inputLabel":10100,
- "prefixRoute":[
- {
- "outputLabel":16100,
- "interface":"r3-eth0",
- "nexthop":"10.0.3.2"
- }
- ]
- }
- ]
- }
- ]
-}
diff --git a/tests/topotests/ospf-sr-topo1/r3/ospfd.conf b/tests/topotests/ospf-sr-topo1/r3/ospfd.conf
deleted file mode 100644
index e2766f202d..0000000000
--- a/tests/topotests/ospf-sr-topo1/r3/ospfd.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-!
-interface lo
- ip ospf area 0.0.0.0
- ip ospf hello-interval 2
- ip ospf dead-interval 10
-!
-interface r3-eth0
- ip ospf area 0.0.0.0
- ip ospf hello-interval 2
- ip ospf dead-interval 10
-!
-!
-router ospf
- ospf router-id 10.0.255.3
- capability opaque
- router-info area 0.0.0.0
- segment-routing on
- segment-routing local-block 5000 5999
- segment-routing global-block 10000 19999
- segment-routing node-msd 8
- segment-routing prefix 10.0.255.3/32 index 300
-!
diff --git a/tests/topotests/ospf-sr-topo1/r3/zebra.conf b/tests/topotests/ospf-sr-topo1/r3/zebra.conf
deleted file mode 100644
index ef16a8ca13..0000000000
--- a/tests/topotests/ospf-sr-topo1/r3/zebra.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-!
-interface lo
- ip address 10.0.255.3/32
-!
-interface r3-eth0
- ip address 10.0.3.1/24
-!
-ip forwarding
-!
diff --git a/tests/topotests/ospf-sr-topo1/r3/zebra_mpls.json b/tests/topotests/ospf-sr-topo1/r3/zebra_mpls.json
deleted file mode 100644
index 1b98ff4756..0000000000
--- a/tests/topotests/ospf-sr-topo1/r3/zebra_mpls.json
+++ /dev/null
@@ -1,82 +0,0 @@
-[
- {
- "inLabel":10100,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":16100,
- "outLabelStack":[
- 16100
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.2"
- }
- ]
- },
- {
- "inLabel":10200,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.2"
- }
- ]
- },
- {
- "inLabel":10400,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":16400,
- "outLabelStack":[
- 16400
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.2"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.2"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.3.2"
- }
- ]
- }
-]
diff --git a/tests/topotests/ospf-sr-topo1/r4/ospf_srdb.json b/tests/topotests/ospf-sr-topo1/r4/ospf_srdb.json
deleted file mode 100644
index a241b32607..0000000000
--- a/tests/topotests/ospf-sr-topo1/r4/ospf_srdb.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "srdbID":"10.0.255.4",
- "srNodes":[
- {
- "routerID":"10.0.255.2",
- "srgbSize":8000,
- "srgbLabel":16000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "extendedPrefix":[
- {
- "prefix":"10.0.255.2\/32",
- "sid":200,
- "inputLabel":10200,
- "prefixRoute":[
- {
- "outputLabel":3,
- "interface":"r4-eth0",
- "nexthop":"10.0.4.2"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.4",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":12,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.4\/32",
- "sid":400,
- "inputLabel":10400,
- "prefixRoute":[
- {
- "outputLabel":3,
- "interface":"lo",
- "nexthop":"10.0.255.4"
- }
- ]
- }
- ],
- "extendedLink":[
- {
- "prefix":"10.0.4.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r4-eth0",
- "nexthop":"10.0.4.2"
- },
- {
- "prefix":"10.0.4.1\/32",
- "sid":"*",
- "inputLabel":"*",
- "outputLabel":3,
- "interface":"r4-eth0",
- "nexthop":"10.0.4.2"
- }
- ]
- },
- {
- "routerID":"10.0.255.3",
- "srgbSize":10000,
- "srgbLabel":10000,
- "srlbSize":1000,
- "srlbLabel":5000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":8,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.3\/32",
- "sid":300,
- "inputLabel":10300,
- "prefixRoute":[
- {
- "outputLabel":16300,
- "interface":"r4-eth0",
- "nexthop":"10.0.4.2"
- }
- ]
- }
- ]
- },
- {
- "routerID":"10.0.255.1",
- "srgbSize":10000,
- "srgbLabel":20000,
- "srlbSize":1000,
- "srlbLabel":15000,
- "algorithms":[
- {
- "0":"SPF"
- }
- ],
- "nodeMsd":16,
- "extendedPrefix":[
- {
- "prefix":"10.0.255.1\/32",
- "sid":100,
- "inputLabel":10100,
- "prefixRoute":[
- {
- "outputLabel":16100,
- "interface":"r4-eth0",
- "nexthop":"10.0.4.2"
- }
- ]
- }
- ]
- }
- ]
-}
diff --git a/tests/topotests/ospf-sr-topo1/r4/ospfd.conf b/tests/topotests/ospf-sr-topo1/r4/ospfd.conf
deleted file mode 100644
index e80880af88..0000000000
--- a/tests/topotests/ospf-sr-topo1/r4/ospfd.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-!
-interface lo
- ip ospf area 0.0.0.0
- ip ospf hello-interval 2
- ip ospf dead-interval 10
-!
-interface r4-eth0
- ip ospf network point-to-point
- ip ospf hello-interval 2
- ip ospf dead-interval 10
- ip ospf area 0.0.0.0
-!
-!
-router ospf
- ospf router-id 10.0.255.4
- capability opaque
- router-info area 0.0.0.0
- segment-routing on
- segment-routing local-block 5000 5999
- segment-routing global-block 10000 19999
- segment-routing node-msd 12
- segment-routing prefix 10.0.255.4/32 index 400 no-php-flag
-!
diff --git a/tests/topotests/ospf-sr-topo1/r4/zebra.conf b/tests/topotests/ospf-sr-topo1/r4/zebra.conf
deleted file mode 100644
index 428f6f4156..0000000000
--- a/tests/topotests/ospf-sr-topo1/r4/zebra.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-!
-interface lo
- ip address 10.0.255.4/32
-!
-interface r4-eth0
- ip address 10.0.4.1/24
-!
-ip forwarding
-!
diff --git a/tests/topotests/ospf-sr-topo1/r4/zebra_mpls.json b/tests/topotests/ospf-sr-topo1/r4/zebra_mpls.json
deleted file mode 100644
index b5758f29a0..0000000000
--- a/tests/topotests/ospf-sr-topo1/r4/zebra_mpls.json
+++ /dev/null
@@ -1,97 +0,0 @@
-[
- {
- "inLabel":10100,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":16100,
- "outLabelStack":[
- 16100
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.2"
- }
- ]
- },
- {
- "inLabel":10200,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.2"
- }
- ]
- },
- {
- "inLabel":10300,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":16300,
- "outLabelStack":[
- 16300
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.2"
- }
- ]
- },
- {
- "inLabel":10400,
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.2"
- }
- ]
- },
- {
- "inLabel":"*",
- "installed":true,
- "nexthops":[
- {
- "type":"SR (OSPF)",
- "outLabel":3,
- "outLabelStack":[
- 3
- ],
- "distance":150,
- "installed":true,
- "nexthop":"10.0.4.2"
- }
- ]
- }
-]
diff --git a/tests/topotests/ospf-sr-topo2/rt1/ospfd.conf b/tests/topotests/ospf-sr-topo1/rt1/ospfd.conf
index 94dba7c061..94dba7c061 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/ospfd.conf
+++ b/tests/topotests/ospf-sr-topo1/rt1/ospfd.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step1/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step1/show_ip_route.ref
index 374184e60a..374184e60a 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step1/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step1/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step1/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step1/show_mpls_table.ref
index de906c270d..de906c270d 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step1/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step1/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step10/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step10/show_ip_route.ref
index 37f73629fd..37f73629fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step10/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step10/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step10/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step10/show_mpls_table.ref
index 2006392564..2006392564 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step10/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step10/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step2/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step2/show_ip_route.ref
index 37f73629fd..37f73629fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step2/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step2/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step2/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step2/show_mpls_table.ref
index de906c270d..de906c270d 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step2/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step2/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step3/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step3/show_ip_route.ref
index f6ead5cb91..f6ead5cb91 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step3/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step3/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step3/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step3/show_mpls_table.ref
index 96e05913ed..96e05913ed 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step3/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step3/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step4/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step4/show_ip_route.ref
index 37f73629fd..37f73629fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step4/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step4/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step4/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step4/show_mpls_table.ref
index de906c270d..de906c270d 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step4/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step4/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step5/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step5/show_ip_route.ref
index f2b8924b85..f2b8924b85 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step5/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step5/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step5/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step5/show_mpls_table.ref
index 96e05913ed..96e05913ed 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step5/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step5/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step6/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step6/show_ip_route.ref
index 37f73629fd..37f73629fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step6/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step6/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step6/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step6/show_mpls_table.ref
index de906c270d..de906c270d 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step6/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step6/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step7/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step7/show_ip_route.ref
index 37f73629fd..37f73629fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step7/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step7/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step7/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step7/show_mpls_table.ref
index de906c270d..de906c270d 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step7/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step7/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step8/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step8/show_ip_route.ref
index 37f73629fd..37f73629fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step8/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step8/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step8/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step8/show_mpls_table.ref
index de906c270d..de906c270d 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step8/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step8/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step9/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt1/step9/show_ip_route.ref
index 37f73629fd..37f73629fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step9/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step9/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/step9/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt1/step9/show_mpls_table.ref
index 2006392564..2006392564 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/step9/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt1/step9/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt1/zebra.conf b/tests/topotests/ospf-sr-topo1/rt1/zebra.conf
index 7d3139a80e..7d3139a80e 100644
--- a/tests/topotests/ospf-sr-topo2/rt1/zebra.conf
+++ b/tests/topotests/ospf-sr-topo1/rt1/zebra.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt2/ospfd.conf b/tests/topotests/ospf-sr-topo1/rt2/ospfd.conf
index b47e788062..b47e788062 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/ospfd.conf
+++ b/tests/topotests/ospf-sr-topo1/rt2/ospfd.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step1/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step1/show_ip_route.ref
index 3dde042b51..3dde042b51 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step1/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step1/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step1/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step1/show_mpls_table.ref
index eba7c403d3..eba7c403d3 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step1/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step1/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step10/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step10/show_ip_route.ref
index 9a06059df2..9a06059df2 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step10/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step10/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step10/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step10/show_mpls_table.ref
index be44a7521d..be44a7521d 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step10/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step10/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step2/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step2/show_ip_route.ref
index 384aac032d..384aac032d 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step2/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step2/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step2/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step2/show_mpls_table.ref
index 5088aa2f7a..5088aa2f7a 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step2/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step2/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step3/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step3/show_ip_route.ref
index 879cd1e0c5..879cd1e0c5 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step3/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step3/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step3/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step3/show_mpls_table.ref
index 6333e7f7f9..6333e7f7f9 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step3/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step3/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step4/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step4/show_ip_route.ref
index 384aac032d..384aac032d 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step4/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step4/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step4/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step4/show_mpls_table.ref
index 5088aa2f7a..5088aa2f7a 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step4/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step4/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step5/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step5/show_ip_route.ref
index 07edd42dc8..07edd42dc8 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step5/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step5/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step5/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step5/show_mpls_table.ref
index 6333e7f7f9..6333e7f7f9 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step5/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step5/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step6/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step6/show_ip_route.ref
index 384aac032d..384aac032d 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step6/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step6/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step6/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step6/show_mpls_table.ref
index 5088aa2f7a..5088aa2f7a 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step6/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step6/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step7/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step7/show_ip_route.ref
index 274931bef7..274931bef7 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step7/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step7/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step7/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step7/show_mpls_table.ref
index cd23725a80..cd23725a80 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step7/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step7/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step8/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step8/show_ip_route.ref
index 384aac032d..384aac032d 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step8/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step8/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step8/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step8/show_mpls_table.ref
index 5088aa2f7a..5088aa2f7a 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step8/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step8/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step9/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt2/step9/show_ip_route.ref
index c71515f3ff..c71515f3ff 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step9/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step9/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/step9/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt2/step9/show_mpls_table.ref
index 2f06641f7f..2f06641f7f 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/step9/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt2/step9/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt2/zebra.conf b/tests/topotests/ospf-sr-topo1/rt2/zebra.conf
index c4ed4276d9..c4ed4276d9 100644
--- a/tests/topotests/ospf-sr-topo2/rt2/zebra.conf
+++ b/tests/topotests/ospf-sr-topo1/rt2/zebra.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt3/ospfd.conf b/tests/topotests/ospf-sr-topo1/rt3/ospfd.conf
index 238d82ff97..238d82ff97 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/ospfd.conf
+++ b/tests/topotests/ospf-sr-topo1/rt3/ospfd.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step1/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step1/show_ip_route.ref
index 4b1500ef97..4b1500ef97 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step1/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step1/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step1/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step1/show_mpls_table.ref
index 39cc3e8ffd..39cc3e8ffd 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step1/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step1/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step10/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step10/show_ip_route.ref
index 14a2ac1e8a..14a2ac1e8a 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step10/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step10/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step10/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step10/show_mpls_table.ref
index a0f7c790a0..a0f7c790a0 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step10/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step10/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step2/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step2/show_ip_route.ref
index 63c6a1845f..63c6a1845f 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step2/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step2/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step2/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step2/show_mpls_table.ref
index 1ab2242b7e..1ab2242b7e 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step2/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step2/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step3/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step3/show_ip_route.ref
index 0894c51cf2..0894c51cf2 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step3/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step3/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step3/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step3/show_mpls_table.ref
index 4dcaedeca1..4dcaedeca1 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step3/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step3/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step4/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step4/show_ip_route.ref
index 63c6a1845f..63c6a1845f 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step4/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step4/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step4/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step4/show_mpls_table.ref
index 1ab2242b7e..1ab2242b7e 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step4/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step4/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step5/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step5/show_ip_route.ref
index 3e74ff039c..3e74ff039c 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step5/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step5/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step5/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step5/show_mpls_table.ref
index 4dcaedeca1..4dcaedeca1 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step5/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step5/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step6/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step6/show_ip_route.ref
index 63c6a1845f..63c6a1845f 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step6/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step6/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step6/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step6/show_mpls_table.ref
index 1ab2242b7e..1ab2242b7e 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step6/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step6/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step7/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step7/show_ip_route.ref
index 41544d4296..41544d4296 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step7/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step7/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step7/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step7/show_mpls_table.ref
index bf055bad78..bf055bad78 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step7/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step7/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step8/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step8/show_ip_route.ref
index 63c6a1845f..63c6a1845f 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step8/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step8/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step8/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step8/show_mpls_table.ref
index 1ab2242b7e..1ab2242b7e 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step8/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step8/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step9/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt3/step9/show_ip_route.ref
index 14a2ac1e8a..14a2ac1e8a 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step9/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step9/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/step9/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt3/step9/show_mpls_table.ref
index a0f7c790a0..a0f7c790a0 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/step9/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt3/step9/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt3/zebra.conf b/tests/topotests/ospf-sr-topo1/rt3/zebra.conf
index 89a781fe3c..89a781fe3c 100644
--- a/tests/topotests/ospf-sr-topo2/rt3/zebra.conf
+++ b/tests/topotests/ospf-sr-topo1/rt3/zebra.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt4/ospfd.conf b/tests/topotests/ospf-sr-topo1/rt4/ospfd.conf
index b12e0729ad..b12e0729ad 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/ospfd.conf
+++ b/tests/topotests/ospf-sr-topo1/rt4/ospfd.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step1/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step1/show_ip_route.ref
index 4a2d3aa10f..4a2d3aa10f 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step1/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step1/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step1/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step1/show_mpls_table.ref
index 3246d22842..3246d22842 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step1/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step1/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step10/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step10/show_ip_route.ref
index db4cf5b3f5..db4cf5b3f5 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step10/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step10/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step10/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step10/show_mpls_table.ref
index 58cf526a83..58cf526a83 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step10/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step10/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step2/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step2/show_ip_route.ref
index c44b3eef30..c44b3eef30 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step2/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step2/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step2/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step2/show_mpls_table.ref
index 05f9f28cbd..05f9f28cbd 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step2/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step2/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step3/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step3/show_ip_route.ref
index a078dd2daf..a078dd2daf 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step3/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step3/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step3/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step3/show_mpls_table.ref
index f5515636d2..f5515636d2 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step3/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step3/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step4/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step4/show_ip_route.ref
index b63812ab1d..b63812ab1d 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step4/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step4/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step4/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step4/show_mpls_table.ref
index f2e56c2e19..f2e56c2e19 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step4/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step4/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step5/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step5/show_ip_route.ref
index 3157ae1ea1..3157ae1ea1 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step5/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step5/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step5/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step5/show_mpls_table.ref
index 8213840652..8213840652 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step5/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step5/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step6/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step6/show_ip_route.ref
index b63812ab1d..b63812ab1d 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step6/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step6/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step6/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step6/show_mpls_table.ref
index f2e56c2e19..f2e56c2e19 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step6/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step6/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step7/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step7/show_ip_route.ref
index 775d8c4034..775d8c4034 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step7/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step7/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step7/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step7/show_mpls_table.ref
index 8a5fdef806..8a5fdef806 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step7/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step7/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step8/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step8/show_ip_route.ref
index b63812ab1d..b63812ab1d 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step8/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step8/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step8/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step8/show_mpls_table.ref
index f2e56c2e19..f2e56c2e19 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step8/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step8/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step9/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt4/step9/show_ip_route.ref
index 48e306d393..48e306d393 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step9/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step9/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/step9/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt4/step9/show_mpls_table.ref
index 275abab715..275abab715 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/step9/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt4/step9/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt4/zebra.conf b/tests/topotests/ospf-sr-topo1/rt4/zebra.conf
index 13c621eb31..13c621eb31 100644
--- a/tests/topotests/ospf-sr-topo2/rt4/zebra.conf
+++ b/tests/topotests/ospf-sr-topo1/rt4/zebra.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt5/ospfd.conf b/tests/topotests/ospf-sr-topo1/rt5/ospfd.conf
index 4e7b24c03a..4e7b24c03a 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/ospfd.conf
+++ b/tests/topotests/ospf-sr-topo1/rt5/ospfd.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step1/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step1/show_ip_route.ref
index 0a43788a18..0a43788a18 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step1/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step1/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step1/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step1/show_mpls_table.ref
index e8c46085be..e8c46085be 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step1/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step1/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step10/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step10/show_ip_route.ref
index 2bad2eb7bf..2bad2eb7bf 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step10/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step10/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step10/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step10/show_mpls_table.ref
index c5ed18d76f..c5ed18d76f 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step10/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step10/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step2/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step2/show_ip_route.ref
index 3572ec713f..3572ec713f 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step2/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step2/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step2/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step2/show_mpls_table.ref
index d9cadeb513..d9cadeb513 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step2/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step2/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step3/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step3/show_ip_route.ref
index 2f7b0cc242..2f7b0cc242 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step3/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step3/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step3/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step3/show_mpls_table.ref
index 7c78d2ce53..7c78d2ce53 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step3/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step3/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step4/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step4/show_ip_route.ref
index 1a12715086..1a12715086 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step4/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step4/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step4/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step4/show_mpls_table.ref
index 42e476e9d1..42e476e9d1 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step4/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step4/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step5/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step5/show_ip_route.ref
index e50fa10ccb..e50fa10ccb 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step5/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step5/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step5/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step5/show_mpls_table.ref
index bb95379228..bb95379228 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step5/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step5/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step6/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step6/show_ip_route.ref
index 1a12715086..1a12715086 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step6/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step6/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step6/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step6/show_mpls_table.ref
index 42e476e9d1..42e476e9d1 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step6/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step6/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step7/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step7/show_ip_route.ref
index 15a024d18b..15a024d18b 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step7/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step7/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step7/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step7/show_mpls_table.ref
index cff0d25e25..cff0d25e25 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step7/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step7/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step8/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step8/show_ip_route.ref
index 1a12715086..1a12715086 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step8/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step8/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step8/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step8/show_mpls_table.ref
index 42e476e9d1..42e476e9d1 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step8/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step8/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step9/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt5/step9/show_ip_route.ref
index d9ddad2462..d9ddad2462 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step9/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step9/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/step9/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt5/step9/show_mpls_table.ref
index c5ed18d76f..c5ed18d76f 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/step9/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt5/step9/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt5/zebra.conf b/tests/topotests/ospf-sr-topo1/rt5/zebra.conf
index ca2d6df665..ca2d6df665 100644
--- a/tests/topotests/ospf-sr-topo2/rt5/zebra.conf
+++ b/tests/topotests/ospf-sr-topo1/rt5/zebra.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt6/ospfd.conf b/tests/topotests/ospf-sr-topo1/rt6/ospfd.conf
index c6d07d169e..c6d07d169e 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/ospfd.conf
+++ b/tests/topotests/ospf-sr-topo1/rt6/ospfd.conf
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step1/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step1/show_ip_route.ref
index 9f05ec7688..9f05ec7688 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step1/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step1/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step1/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step1/show_mpls_table.ref
index baa2314454..baa2314454 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step1/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step1/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step10/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step10/show_ip_route.ref
index 6abb3805a2..6abb3805a2 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step10/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step10/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step10/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step10/show_mpls_table.ref
index 09ecec29d9..09ecec29d9 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step10/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step10/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step2/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step2/show_ip_route.ref
index 80b3c426d4..80b3c426d4 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step2/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step2/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step2/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step2/show_mpls_table.ref
index baa2314454..baa2314454 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step2/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step2/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step3/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step3/show_ip_route.ref
index 2c63c08510..2c63c08510 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step3/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step3/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step3/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step3/show_mpls_table.ref
index 2c63c08510..2c63c08510 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step3/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step3/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step4/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step4/show_ip_route.ref
index 80b3c426d4..80b3c426d4 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step4/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step4/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step4/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step4/show_mpls_table.ref
index 09ecec29d9..09ecec29d9 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step4/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step4/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step5/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step5/show_ip_route.ref
index 0e4b3eba12..0e4b3eba12 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step5/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step5/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step5/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step5/show_mpls_table.ref
index 2c63c08510..2c63c08510 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step5/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step5/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step6/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step6/show_ip_route.ref
index 80b3c426d4..80b3c426d4 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step6/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step6/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step6/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step6/show_mpls_table.ref
index 09ecec29d9..09ecec29d9 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step6/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step6/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step7/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step7/show_ip_route.ref
index aa2329a04a..aa2329a04a 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step7/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step7/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step7/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step7/show_mpls_table.ref
index 800b1ae2fd..800b1ae2fd 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step7/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step7/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step8/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step8/show_ip_route.ref
index 80b3c426d4..80b3c426d4 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step8/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step8/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step8/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step8/show_mpls_table.ref
index 09ecec29d9..09ecec29d9 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step8/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step8/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step9/show_ip_route.ref b/tests/topotests/ospf-sr-topo1/rt6/step9/show_ip_route.ref
index 80b3c426d4..80b3c426d4 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step9/show_ip_route.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step9/show_ip_route.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/step9/show_mpls_table.ref b/tests/topotests/ospf-sr-topo1/rt6/step9/show_mpls_table.ref
index 09ecec29d9..09ecec29d9 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/step9/show_mpls_table.ref
+++ b/tests/topotests/ospf-sr-topo1/rt6/step9/show_mpls_table.ref
diff --git a/tests/topotests/ospf-sr-topo2/rt6/zebra.conf b/tests/topotests/ospf-sr-topo1/rt6/zebra.conf
index 4b739d0bca..4b739d0bca 100644
--- a/tests/topotests/ospf-sr-topo2/rt6/zebra.conf
+++ b/tests/topotests/ospf-sr-topo1/rt6/zebra.conf
diff --git a/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.dot b/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.dot
deleted file mode 100644
index d293669209..0000000000
--- a/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.dot
+++ /dev/null
@@ -1,78 +0,0 @@
-## Color coding:
-#########################
-## Main FRR: #f08080 red
-## Switches: #d0e0d0 gray
-## RIP: #19e3d9 Cyan
-## RIPng: #fcb314 dark yellow
-## OSPFv2: #32b835 Green
-## OSPFv3: #19e3d9 Cyan
-## ISIS IPv4 #fcb314 dark yellow
-## ISIS IPv6 #9a81ec purple
-## BGP IPv4 #eee3d3 beige
-## BGP IPv6 #fdff00 yellow
-##### Colors (see http://www.color-hex.com/)
-
-graph ospf_topo1 {
- label="ospf SR topo1";
-
- # Routers
- r1 [
- label="r1\nrtr-id 10.0.255.1/32",
- shape=doubleoctagon,
- fillcolor="#f08080",
- style=filled,
- ];
- r2 [
- label="r2\nrtr-id 10.0.255.2/32",
- shape=doubleoctagon,
- fillcolor="#f08080",
- style=filled,
- ];
- r3 [
- label="r3\nrtr-id 10.0.255.3/32",
- shape=doubleoctagon,
- fillcolor="#f08080",
- style=filled,
- ];
- r4 [
- label="r4\nrtr-id 10.0.255.4/32",
- shape=doubleoctagon,
- fillcolor="#f08080",
- style=filled,
- ];
-
- # Switches
- s1 [
- label="s2\n10.0.1.0/24",
- shape=oval,
- fillcolor="#d0e0d0",
- style=filled,
- ];
- s2 [
- label="s1\n10.0.3.0/24",
- shape=oval,
- fillcolor="#d0e0d0",
- style=filled,
- ];
- s3 [
- label="s2\n10.0.4.0/24",
- shape=oval,
- fillcolor="#d0e0d0",
- style=filled,
- ];
-
- # Connections
- subgraph cluster0 {
- label="area 0"
-
- r1 -- s1 [label="eth0\n.1"];
-
- r2 -- s1 [label="eth0\n.2"];
- r2 -- s2 [label="eth1\n.2"];
- r2 -- s3 [label="eth2\n.2"];
-
- r3 -- s2 [label="eth0\n.1"];
-
- r4 -- s3 [label="eth0\n.1"];
- }
-}
diff --git a/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.jpg b/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.jpg
deleted file mode 100644
index 636f9b320c..0000000000
--- a/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.py b/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.py
index 8a704790d4..57b93c3fd5 100644
--- a/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.py
+++ b/tests/topotests/ospf-sr-topo1/test_ospf_sr_topo1.py
@@ -4,7 +4,7 @@
# test_ospf_sr_topo1.py
# Part of NetDEF Topology Tests
#
-# Copyright (c) 2017 by
+# Copyright (c) 2020 by
# Network Device Education Foundation, Inc. ("NetDEF")
#
# Permission to use, copy, modify, and/or distribute this software
@@ -23,13 +23,52 @@
#
"""
-test_ospf_sr_topo1.py: Test the FRR OSPF routing daemon with Segment Routing.
+test_ospf_sr_topo1.py:
+
+ +---------+
+ | |
+ | RT1 |
+ | 1.1.1.1 |
+ | |
+ +---------+
+ |eth-sw1
+ |
+ |
+ |
+ +---------+ | +---------+
+ | | | | |
+ | RT2 |eth-sw1 | eth-sw1| RT3 |
+ | 2.2.2.2 +----------+----------+ 3.3.3.3 |
+ | | 10.0.1.0/24 | |
+ +---------+ +---------+
+ eth-rt4-1| |eth-rt4-2 eth-rt5-1| |eth-rt5-2
+ | | | |
+ 10.0.2.0/24| |10.0.3.0/24 10.0.4.0/24| |10.0.5.0/24
+ | | | |
+ eth-rt2-1| |eth-rt2-2 eth-rt3-1| |eth-rt3-2
+ +---------+ +---------+
+ | | | |
+ | RT4 | 10.0.6.0/24 | RT5 |
+ | 4.4.4.4 +---------------------+ 5.5.5.5 |
+ | |eth-rt5 eth-rt4| |
+ +---------+ +---------+
+ eth-rt6| |eth-rt6
+ | |
+ 10.0.7.0/24| |10.0.8.0/24
+ | +---------+ |
+ | | | |
+ | | RT6 | |
+ +----------+ 6.6.6.6 +-----------+
+ eth-rt4| |eth-rt5
+ +---------+
"""
import os
-import re
import sys
+import pytest
import json
+import re
+from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -37,64 +76,74 @@ CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../"))
# pylint: disable=C0413
-# Required to instantiate the topology builder class.
-from mininet.topo import Topo
-
# Import topogen and topotest helpers
from lib import topotest
from lib.topogen import Topogen, TopoRouter, get_topogen
from lib.topolog import logger
-# and Finally pytest
-import pytest
+# Required to instantiate the topology builder class.
+from mininet.topo import Topo
pytestmark = [pytest.mark.ospfd]
-
-class OspfSrTopo(Topo):
+class TemplateTopo(Topo):
"Test topology builder"
- def build(self):
+ def build(self, *_args, **_opts):
"Build function"
tgen = get_topogen(self)
- # Check for mpls
- if tgen.hasmpls is not True:
- tgen.set_error("MPLS not available, tests will be skipped")
-
- # Create 4 routers
- for routern in range(1, 5):
- tgen.add_router("r{}".format(routern))
+ #
+ # Define FRR Routers
+ #
+ for router in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ tgen.add_router(router)
- # Interconect router 1 and 2 with 2 links
+ #
+ # Define connections
+ #
switch = tgen.add_switch("s1")
- switch.add_link(tgen.gears["r1"])
- switch.add_link(tgen.gears["r2"])
+ 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["r1"])
- switch.add_link(tgen.gears["r2"])
+ switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4-1")
+ switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-1")
- # Interconect router 3 and 2
switch = tgen.add_switch("s3")
- switch.add_link(tgen.gears["r3"])
- switch.add_link(tgen.gears["r2"])
+ switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4-2")
+ switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-2")
- # Interconect router 4 and 2
switch = tgen.add_switch("s4")
- switch.add_link(tgen.gears["r4"])
- switch.add_link(tgen.gears["r2"])
+ switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-1")
+ switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-1")
+ switch = tgen.add_switch("s5")
+ switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-2")
+ switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-2")
-def setup_module(mod):
- "Sets up the pytest environment"
+ switch = tgen.add_switch("s6")
+ switch.add_link(tgen.gears["rt4"], nodeif="eth-rt5")
+ switch.add_link(tgen.gears["rt5"], nodeif="eth-rt4")
- logger.info("\n\n---- Starting OSPF Segment Routing tests ----\n")
+ switch = tgen.add_switch("s7")
+ switch.add_link(tgen.gears["rt4"], nodeif="eth-rt6")
+ switch.add_link(tgen.gears["rt6"], nodeif="eth-rt4")
- tgen = Topogen(OspfSrTopo, mod.__name__)
+ 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(TemplateTopo, 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))
@@ -103,101 +152,536 @@ def setup_module(mod):
TopoRouter.RD_OSPF, os.path.join(CWD, "{}/ospfd.conf".format(rname))
)
- # Initialize all routers.
tgen.start_router()
def teardown_module(mod):
"Teardown the pytest environment"
-
tgen = get_topogen()
+
+ # This function tears down the whole topology.
tgen.stop_topology()
- logger.info("\n\n---- OSPF Segment Routing tests End ----\n")
+
+def print_cmd_result(rname, command):
+ print(get_topogen().gears[rname].vtysh_cmd(command, isjson=False))
+
+
+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
-def test_ospf_sr():
- "Test OSPF daemon Segment Routing"
+#
+# Step 1
+#
+# Test initial network convergence
+#
+def test_rib_step1():
+ logger.info("Test (step 1): verify RIB")
tgen = get_topogen()
+
+ # Skip if previous fatal error condition is raised
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
- logger.info("--- test OSPF Segment Routing Data Base ---")
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step1/show_ip_route.ref"
+ )
- for rnum in range(1, 5):
- router = "r{}".format(rnum)
- logger.info('\tRouter "%s"', router)
+def test_mpls_lib_step1():
+ logger.info("Test (step 1): verify MPLS LIB")
+ tgen = get_topogen()
- # Load expected results from the command
- reffile = os.path.join(CWD, "{}/ospf_srdb.json".format(router))
- expected = json.loads(open(reffile).read())
+ # Skip if previous fatal error condition is raised
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
- # Run test function until we get an result. Wait at most 60 seconds.
- rt = tgen.gears[router]
- test_func = partial(
- topotest.router_json_cmp,
- rt,
- "show ip ospf database segment-routing json",
- expected,
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show mpls table json", "step1/show_mpls_table.ref"
)
- rv, diff = topotest.run_and_expect(test_func, None, count=25, wait=3)
- assert rv, "OSPF did not start Segment Routing on {}:\n{}".format(router, diff)
-def test_ospf_kernel_route():
- "Test OSPF Segment Routing MPLS route installation"
+#
+# Step 2
+#
+# Action(s):
+# -Disable OSPF on the eth-rt5 interface on rt4
+#
+# Expected changes:
+# -rt4 should uninstall the Adj-SIDs pointing to rt5
+# -rt5 should uninstall the Adj-SIDs pointing to rt4
+# -rt2 should reinstall rt5's Prefix-SIDs (2 nexthops deleted)
+# -rt3 should reinstall rt4's Prefix-SIDs (2 nexthops deleted)
+# -rt4 should reinstall rt3's Prefix-SIDs (1 nexthop deleted)
+# -rt4 should reinstall rt5's Prefix-SIDs (1 nexthop changed)
+# -rt5 should reinstall rt2's Prefix-SIDs (1 nexthop deleted)
+# -rt5 should reinstall rt4's Prefix-SIDs (1 nexthop changed)
+#
+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("--- test OSPF Segment Routing MPLS tables ---")
+ logger.info("Disabling OSPF on the eth-rt5 interface on rt4")
+ tgen.net["rt4"].cmd(
+ 'vtysh -c "conf t" -c "interface eth-rt5" -c "no ip ospf network point-to-point"'
+ )
- def show_mpls_table_json_cmp(rt, expected):
- """
- Reformat MPLS table output to use a list of labels instead of dict.
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step2/show_ip_route.ref"
+ )
- Original:
- {
- "X": {
- inLabel: "X",
- # ...
- }
- }
- List format:
- [
- {
- inLabel: "X",
- }
- ]
- """
- out = rt.vtysh_cmd("show mpls table json", isjson=True)
+def test_mpls_lib_step2():
+ logger.info("Test (step 2): verify MPLS LIB")
+ tgen = get_topogen()
- outlist = []
- for key in out.keys():
- outlist.append(out[key])
+ # Skip if previous fatal error condition is raised
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
- return topotest.json_cmp(outlist, expected)
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show mpls table json", "step2/show_mpls_table.ref"
+ )
- for rnum in range(1, 5):
- router = "r{}".format(rnum)
- logger.info('\tRouter "%s"', router)
+#
+# Step 3
+#
+# Action(s):
+# -Shut down the eth-rt4 interface on rt6
+# -Shut down the eth-rt5 interface on rt6
+#
+# Expected changes:
+# -All routers should uninstall rt6's Prefix-SIDs
+# -rt4 and rt5 should uninstall the Adj-SIDs pointing to rt6
+# -rt4 should reconverge rt5's Prefix-SIDs through rt2 using ECMP
+# -rt5 should reconverge rt4's Prefix-SIDs through rt3 using ECMP
+# -rt6 should uninstall all its IS-IS routes, Prefix-SIDs and Adj-SIDs
+#
+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)
- # Load expected results from the command
- reffile = os.path.join(CWD, "{}/zebra_mpls.json".format(router))
- expected = json.loads(open(reffile).read())
+ logger.info("Shutting down the eth-rt4 interface on rt6")
+ tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt4" -c "shutdown"')
+ logger.info("Shutting down the eth-rt5 interface on rt6")
+ tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt5" -c "shutdown"')
- # Run test function until we get an result. Wait at most 60 seconds.
- rt = tgen.gears[router]
- test_func = partial(show_mpls_table_json_cmp, rt, expected)
- rv, diff = topotest.run_and_expect(test_func, None, count=25, wait=3)
- assert rv, "OSPF did not properly instal MPLS table on {}:\n{}".format(
- router, diff
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step3/show_ip_route.ref"
)
+def test_mpls_lib_step3():
+ logger.info("Test (step 3): verify MPLS LIB")
+ 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 mpls table json", "step3/show_mpls_table.ref"
+ )
+
+
+#
+# Step 4
+#
+# Action(s):
+# -Bring up the eth-rt4 interface on rt6
+# -Bring up the eth-rt5 interface on rt6
+# -Change rt6's SRGB
+#
+# Expected changes:
+# -All routers should install rt6's Prefix-SIDs
+# -rt4 and rt5 should install Adj-SIDs for rt6
+# -rt4 should reconverge rt5's Prefix-SIDs through rt6 using the new SRGB
+# -rt5 should reconverge rt4's Prefix-SIDs through rt6 using the new SRGB
+# -rt6 should reinstall all IS-IS routes and Prefix-SIDs from the network, and Adj-SIDs for rt4 and rt5
+#
+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("Bringing up the eth-rt4 interface on rt6")
+ tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt4" -c "no shutdown"')
+ logger.info("Bringing up the eth-rt5 interface on rt6")
+ tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt5" -c "no shutdown"')
+ logger.info("Changing rt6's SRGB")
+ tgen.net["rt6"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 18000 25999"'
+ )
+
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step4/show_ip_route.ref"
+ )
+
+
+def test_mpls_lib_step4():
+ logger.info("Test (step 4): verify MPLS LIB")
+ 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 mpls table json", "step4/show_mpls_table.ref"
+ )
+
+
+#
+# Step 5
+#
+# Action(s):
+# -Disable SR on rt6
+#
+# Expected changes:
+# -All routers should uninstall rt6's Prefix-SIDs
+# -rt4 should uninstall rt5's Prefix-SIDs since the nexthop router hasn't SR enabled anymore
+# -rt5 should uninstall rt4's Prefix-SIDs since the nexthop router hasn't SR enabled anymore
+# -rt6 should uninstall all Prefix-SIDs from the network, and the Adj-SIDs for rt4 and rt5
+#
+def test_rib_ipv4_step5():
+ logger.info("Test (step 5): 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 SR on rt6")
+ tgen.net["rt6"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "no segment-routing on"'
+ )
+
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step5/show_ip_route.ref"
+ )
+
+
+def test_mpls_lib_step5():
+ logger.info("Test (step 5): verify MPLS LIB")
+ 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 mpls table json", "step5/show_mpls_table.ref"
+ )
+
+
+#
+# Step 6
+#
+# Action(s):
+# -Enable SR on rt6
+#
+# Expected changes:
+# -All routers should install rt6's Prefix-SIDs
+# -rt4 should install rt5's Prefix-SIDs through rt6
+# -rt5 should install rt4's Prefix-SIDs through rt6
+# -rt6 should install all Prefix-SIDs from the network, and Adj-SIDs for rt4 and rt5
+#
+def test_rib_ipv4_step6():
+ logger.info("Test (step 6): 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("Enabling SR on rt6")
+ tgen.net["rt6"].cmd('vtysh -c "conf t" -c "router ospf" -c "segment-routing on"')
+
+ # FIXME: This is currently necessary because the CLI is not yet yang based.
+ logger.info("Re-do rt6's SR config")
+ tgen.net["rt6"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 18000 25999"'
+ )
+ tgen.net["rt6"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing node-msd 8"'
+ )
+ tgen.net["rt6"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 6.6.6.6/32 index 60 explicit-null"'
+ )
+
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step6/show_ip_route.ref"
+ )
+
+
+def test_mpls_lib_step6():
+ logger.info("Test (step 6): verify MPLS LIB")
+ 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 mpls table json", "step6/show_mpls_table.ref"
+ )
+
+
+#
+# Step 7
+#
+# Action(s):
+# -Delete rt1's Prefix-SIDs
+#
+# Expected changes:
+# -All routers should uninstall rt1's Prefix-SIDs
+#
+def test_rib_ipv4_step7():
+ logger.info("Test (step 7): 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("Deleting rt1's Prefix-SIDs")
+ tgen.net["rt1"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 10"'
+ )
+
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step7/show_ip_route.ref"
+ )
+
+
+def test_mpls_lib_step7():
+ logger.info("Test (step 7): verify MPLS LIB")
+ 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 mpls table json", "step7/show_mpls_table.ref"
+ )
+
+
+#
+# Step 8
+#
+# Action(s):
+# -Re-add rt1's Prefix-SIDs
+#
+# Expected changes:
+# -All routers should install rt1's Prefix-SIDs
+#
+def test_rib_ipv4_step8():
+ logger.info("Test (step 8): 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("Re-adding rt1's Prefix-SIDs")
+ tgen.net["rt1"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 1.1.1.1/32 index 10"'
+ )
+
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step8/show_ip_route.ref"
+ )
+
+
+def test_mpls_lib_step8():
+ logger.info("Test (step 8): verify MPLS LIB")
+ 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 mpls table json", "step8/show_mpls_table.ref"
+ )
+
+
+#
+# Step 9
+#
+# Action(s):
+# -Change rt1's Prefix-SIDs to use the no-php option
+# -Change rt6's Prefix-SIDs to stop using the explicit-null option
+#
+# Expected changes:
+# -rt2 and rt3 should reinstall rt1's Prefix-SIDs accordingly
+# -rt4 and rt5 should reinstall rt6's Prefix-SIDs accordingly
+#
+def test_rib_ipv4_step9():
+ logger.info("Test (step 9): 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("Changing rt1's Prefix-SIDs to use the no-php option")
+ tgen.net["rt1"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 1.1.1.1/32 index 10 no-php-flag"'
+ )
+
+ logger.info("Change rt6's Prefix-SIDs to stop using the explicit-null option")
+ tgen.net["rt6"].cmd(
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 6.6.6.6/32 index 60"'
+ )
+
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step9/show_ip_route.ref"
+ )
+
+
+def test_mpls_lib_step9():
+ logger.info("Test (step 9): verify MPLS LIB")
+ 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 mpls table json", "step9/show_mpls_table.ref"
+ )
+
+
+#
+# Step 10
+#
+# Action(s):
+# -Remove the IPv4 address from rt4's eth-rt2-1 interface
+#
+# Expected changes:
+# -rt2 should uninstall the IPv4 Adj-SIDs attached to the eth-rt4-1 interface
+# -rt2 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt4 (ECMP shouldn't be used anymore)
+# -rt4 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt2 (ECMP shouldn't be used anymore)
+#
+def test_rib_ipv4_step10():
+ logger.info("Test (step 10): 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("Removing the IPv4 address from rt4's eth-rt2-1 interface")
+ tgen.net["rt4"].cmd(
+ 'vtysh -c "conf t" -c "interface eth-rt2-1" -c "no ip address 10.0.2.4/24"'
+ )
+
+ for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
+ router_compare_json_output(
+ rname, "show ip route ospf json", "step10/show_ip_route.ref"
+ )
+
+
+def test_mpls_lib_step10():
+ logger.info("Test (step 10): verify MPLS LIB")
+ 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 mpls table json", "step10/show_mpls_table.ref"
+ )
+
+
+# FIXME: These tests don't work yet, this should be fixed with the
+# switchover to a yang based CLI.
+#
+# Step 11
+#
+# Action(s):
+# -Enter invalid SR configuration
+#
+# Expected changes:
+# -All commands should be rejected
+#
+#def test_ospf_invalid_config_step11():
+# logger.info("Test (step 11): check if invalid configuration is rejected")
+# tgen = get_topogen()
+#
+# # Skip if previous fatal error condition is raised
+# if tgen.routers_have_failure():
+# pytest.skip(tgen.errors)
+#
+# logger.info("Entering invalid Segment Routing configuration...")
+# ret = tgen.net["rt1"].cmd(
+# 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 1.1.1.1/32 index 10000"'
+# )
+# assert (
+# re.search("Configuration failed", ret) is not None
+# ), "Invalid SR configuration wasn't rejected"
+# ret = tgen.net["rt1"].cmd(
+# 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 16000 14999"'
+# )
+# assert (
+# re.search("Configuration failed", ret) is not None
+# ), "Invalid SR configuration wasn't rejected"
+# ret = tgen.net["rt1"].cmd(
+# 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 16000 16001"'
+# )
+# assert (
+# re.search("Configuration failed", ret) is not None
+# ), "Invalid SR configuration wasn't rejected"
+
+
+# Memory leak test template
def test_memory_leak():
"Run the memory leak test and report results."
tgen = get_topogen()
diff --git a/tests/topotests/ospf-sr-topo2/__init__.py b/tests/topotests/ospf-sr-topo2/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/topotests/ospf-sr-topo2/__init__.py
+++ /dev/null
diff --git a/tests/topotests/ospf-sr-topo2/test_ospf_sr_topo2.py b/tests/topotests/ospf-sr-topo2/test_ospf_sr_topo2.py
deleted file mode 100644
index f9efe68ede..0000000000
--- a/tests/topotests/ospf-sr-topo2/test_ospf_sr_topo2.py
+++ /dev/null
@@ -1,695 +0,0 @@
-#!/usr/bin/env python
-
-#
-# test_ospf_sr_topo2.py
-# Part of NetDEF Topology Tests
-#
-# Copyright (c) 2020 by
-# Network Device Education Foundation, Inc. ("NetDEF")
-#
-# 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_ospf_sr_topo2.py:
-
- +---------+
- | |
- | RT1 |
- | 1.1.1.1 |
- | |
- +---------+
- |eth-sw1
- |
- |
- |
- +---------+ | +---------+
- | | | | |
- | RT2 |eth-sw1 | eth-sw1| RT3 |
- | 2.2.2.2 +----------+----------+ 3.3.3.3 |
- | | 10.0.1.0/24 | |
- +---------+ +---------+
- eth-rt4-1| |eth-rt4-2 eth-rt5-1| |eth-rt5-2
- | | | |
- 10.0.2.0/24| |10.0.3.0/24 10.0.4.0/24| |10.0.5.0/24
- | | | |
- eth-rt2-1| |eth-rt2-2 eth-rt3-1| |eth-rt3-2
- +---------+ +---------+
- | | | |
- | RT4 | 10.0.6.0/24 | RT5 |
- | 4.4.4.4 +---------------------+ 5.5.5.5 |
- | |eth-rt5 eth-rt4| |
- +---------+ +---------+
- eth-rt6| |eth-rt6
- | |
- 10.0.7.0/24| |10.0.8.0/24
- | +---------+ |
- | | | |
- | | RT6 | |
- +----------+ 6.6.6.6 +-----------+
- eth-rt4| |eth-rt5
- +---------+
-"""
-
-import os
-import sys
-import pytest
-import json
-import re
-from time import sleep
-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.
-from mininet.topo import Topo
-
-
-class TemplateTopo(Topo):
- "Test topology builder"
-
- def build(self, *_args, **_opts):
- "Build function"
- tgen = get_topogen(self)
-
- #
- # 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-1")
- switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-1")
-
- switch = tgen.add_switch("s3")
- switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4-2")
- switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-2")
-
- switch = tgen.add_switch("s4")
- switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-1")
- switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-1")
-
- switch = tgen.add_switch("s5")
- switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-2")
- switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-2")
-
- 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(TemplateTopo, 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_OSPF, os.path.join(CWD, "{}/ospfd.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 print_cmd_result(rname, command):
- print(get_topogen().gears[rname].vtysh_cmd(command, isjson=False))
-
-
-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
-#
-def test_rib_step1():
- logger.info("Test (step 1): verify 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 ospf json", "step1/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step1():
- logger.info("Test (step 1): verify MPLS LIB")
- 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 mpls table json", "step1/show_mpls_table.ref"
- )
-
-
-#
-# Step 2
-#
-# Action(s):
-# -Disable OSPF on the eth-rt5 interface on rt4
-#
-# Expected changes:
-# -rt4 should uninstall the Adj-SIDs pointing to rt5
-# -rt5 should uninstall the Adj-SIDs pointing to rt4
-# -rt2 should reinstall rt5's Prefix-SIDs (2 nexthops deleted)
-# -rt3 should reinstall rt4's Prefix-SIDs (2 nexthops deleted)
-# -rt4 should reinstall rt3's Prefix-SIDs (1 nexthop deleted)
-# -rt4 should reinstall rt5's Prefix-SIDs (1 nexthop changed)
-# -rt5 should reinstall rt2's Prefix-SIDs (1 nexthop deleted)
-# -rt5 should reinstall rt4's Prefix-SIDs (1 nexthop changed)
-#
-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 OSPF on the eth-rt5 interface on rt4")
- tgen.net["rt4"].cmd(
- 'vtysh -c "conf t" -c "interface eth-rt5" -c "no ip ospf network point-to-point"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step2/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step2():
- logger.info("Test (step 2): verify MPLS LIB")
- 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 mpls table json", "step2/show_mpls_table.ref"
- )
-
-
-#
-# Step 3
-#
-# Action(s):
-# -Shut down the eth-rt4 interface on rt6
-# -Shut down the eth-rt5 interface on rt6
-#
-# Expected changes:
-# -All routers should uninstall rt6's Prefix-SIDs
-# -rt4 and rt5 should uninstall the Adj-SIDs pointing to rt6
-# -rt4 should reconverge rt5's Prefix-SIDs through rt2 using ECMP
-# -rt5 should reconverge rt4's Prefix-SIDs through rt3 using ECMP
-# -rt6 should uninstall all its IS-IS routes, Prefix-SIDs and Adj-SIDs
-#
-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("Shutting down the eth-rt4 interface on rt6")
- tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt4" -c "shutdown"')
- logger.info("Shutting down the eth-rt5 interface on rt6")
- tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt5" -c "shutdown"')
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step3/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step3():
- logger.info("Test (step 3): verify MPLS LIB")
- 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 mpls table json", "step3/show_mpls_table.ref"
- )
-
-
-#
-# Step 4
-#
-# Action(s):
-# -Bring up the eth-rt4 interface on rt6
-# -Bring up the eth-rt5 interface on rt6
-# -Change rt6's SRGB
-#
-# Expected changes:
-# -All routers should install rt6's Prefix-SIDs
-# -rt4 and rt5 should install Adj-SIDs for rt6
-# -rt4 should reconverge rt5's Prefix-SIDs through rt6 using the new SRGB
-# -rt5 should reconverge rt4's Prefix-SIDs through rt6 using the new SRGB
-# -rt6 should reinstall all IS-IS routes and Prefix-SIDs from the network, and Adj-SIDs for rt4 and rt5
-#
-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("Bringing up the eth-rt4 interface on rt6")
- tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt4" -c "no shutdown"')
- logger.info("Bringing up the eth-rt5 interface on rt6")
- tgen.net["rt6"].cmd('vtysh -c "conf t" -c "interface eth-rt5" -c "no shutdown"')
- logger.info("Changing rt6's SRGB")
- tgen.net["rt6"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 18000 25999"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step4/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step4():
- logger.info("Test (step 4): verify MPLS LIB")
- 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 mpls table json", "step4/show_mpls_table.ref"
- )
-
-
-#
-# Step 5
-#
-# Action(s):
-# -Disable SR on rt6
-#
-# Expected changes:
-# -All routers should uninstall rt6's Prefix-SIDs
-# -rt4 should uninstall rt5's Prefix-SIDs since the nexthop router hasn't SR enabled anymore
-# -rt5 should uninstall rt4's Prefix-SIDs since the nexthop router hasn't SR enabled anymore
-# -rt6 should uninstall all Prefix-SIDs from the network, and the Adj-SIDs for rt4 and rt5
-#
-def test_rib_ipv4_step5():
- logger.info("Test (step 5): 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 SR on rt6")
- tgen.net["rt6"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "no segment-routing on"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step5/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step5():
- logger.info("Test (step 5): verify MPLS LIB")
- 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 mpls table json", "step5/show_mpls_table.ref"
- )
-
-
-#
-# Step 6
-#
-# Action(s):
-# -Enable SR on rt6
-#
-# Expected changes:
-# -All routers should install rt6's Prefix-SIDs
-# -rt4 should install rt5's Prefix-SIDs through rt6
-# -rt5 should install rt4's Prefix-SIDs through rt6
-# -rt6 should install all Prefix-SIDs from the network, and Adj-SIDs for rt4 and rt5
-#
-def test_rib_ipv4_step6():
- logger.info("Test (step 6): 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("Enabling SR on rt6")
- tgen.net["rt6"].cmd('vtysh -c "conf t" -c "router ospf" -c "segment-routing on"')
-
- # FIXME: This is currently necessary because the CLI is not yet yang based.
- logger.info("Re-do rt6's SR config")
- tgen.net["rt6"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 18000 25999"'
- )
- tgen.net["rt6"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing node-msd 8"'
- )
- tgen.net["rt6"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 6.6.6.6/32 index 60 explicit-null"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step6/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step6():
- logger.info("Test (step 6): verify MPLS LIB")
- 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 mpls table json", "step6/show_mpls_table.ref"
- )
-
-
-#
-# Step 7
-#
-# Action(s):
-# -Delete rt1's Prefix-SIDs
-#
-# Expected changes:
-# -All routers should uninstall rt1's Prefix-SIDs
-#
-def test_rib_ipv4_step7():
- logger.info("Test (step 7): 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("Deleting rt1's Prefix-SIDs")
- tgen.net["rt1"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 10"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step7/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step7():
- logger.info("Test (step 7): verify MPLS LIB")
- 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 mpls table json", "step7/show_mpls_table.ref"
- )
-
-
-#
-# Step 8
-#
-# Action(s):
-# -Re-add rt1's Prefix-SIDs
-#
-# Expected changes:
-# -All routers should install rt1's Prefix-SIDs
-#
-def test_rib_ipv4_step8():
- logger.info("Test (step 8): 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("Re-adding rt1's Prefix-SIDs")
- tgen.net["rt1"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 1.1.1.1/32 index 10"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step8/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step8():
- logger.info("Test (step 8): verify MPLS LIB")
- 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 mpls table json", "step8/show_mpls_table.ref"
- )
-
-
-#
-# Step 9
-#
-# Action(s):
-# -Change rt1's Prefix-SIDs to use the no-php option
-# -Change rt6's Prefix-SIDs to stop using the explicit-null option
-#
-# Expected changes:
-# -rt2 and rt3 should reinstall rt1's Prefix-SIDs accordingly
-# -rt4 and rt5 should reinstall rt6's Prefix-SIDs accordingly
-#
-def test_rib_ipv4_step9():
- logger.info("Test (step 9): 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("Changing rt1's Prefix-SIDs to use the no-php option")
- tgen.net["rt1"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 1.1.1.1/32 index 10 no-php-flag"'
- )
-
- logger.info("Change rt6's Prefix-SIDs to stop using the explicit-null option")
- tgen.net["rt6"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 6.6.6.6/32 index 60"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step9/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step9():
- logger.info("Test (step 9): verify MPLS LIB")
- 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 mpls table json", "step9/show_mpls_table.ref"
- )
-
-
-#
-# Step 10
-#
-# Action(s):
-# -Remove the IPv4 address from rt4's eth-rt2-1 interface
-#
-# Expected changes:
-# -rt2 should uninstall the IPv4 Adj-SIDs attached to the eth-rt4-1 interface
-# -rt2 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt4 (ECMP shouldn't be used anymore)
-# -rt4 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt2 (ECMP shouldn't be used anymore)
-#
-def test_rib_ipv4_step10():
- logger.info("Test (step 10): 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("Removing the IPv4 address from rt4's eth-rt2-1 interface")
- tgen.net["rt4"].cmd(
- 'vtysh -c "conf t" -c "interface eth-rt2-1" -c "no ip address 10.0.2.4/24"'
- )
-
- for rname in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6"]:
- router_compare_json_output(
- rname, "show ip route ospf json", "step10/show_ip_route.ref"
- )
-
-
-def test_mpls_lib_step10():
- logger.info("Test (step 10): verify MPLS LIB")
- 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 mpls table json", "step10/show_mpls_table.ref"
- )
-
-
-# FIXME: These tests don't work yet, this should be fixed with the
-# switchover to a yang based CLI.
-#
-# Step 11
-#
-# Action(s):
-# -Enter invalid SR configuration
-#
-# Expected changes:
-# -All commands should be rejected
-#
-#def test_ospf_invalid_config_step11():
-# logger.info("Test (step 11): check if invalid configuration is rejected")
-# tgen = get_topogen()
-#
-# # Skip if previous fatal error condition is raised
-# if tgen.routers_have_failure():
-# pytest.skip(tgen.errors)
-#
-# logger.info("Entering invalid Segment Routing configuration...")
-# ret = tgen.net["rt1"].cmd(
-# 'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 1.1.1.1/32 index 10000"'
-# )
-# assert (
-# re.search("Configuration failed", ret) is not None
-# ), "Invalid SR configuration wasn't rejected"
-# ret = tgen.net["rt1"].cmd(
-# 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 16000 14999"'
-# )
-# assert (
-# re.search("Configuration failed", ret) is not None
-# ), "Invalid SR configuration wasn't rejected"
-# ret = tgen.net["rt1"].cmd(
-# 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 16000 16001"'
-# )
-# assert (
-# re.search("Configuration failed", ret) is not None
-# ), "Invalid SR configuration wasn't rejected"
-
-
-# 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))