mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 10:54:47 +00:00
tests: adding LDP tests for advertising host-routes.
Adding test to verify that proper LDP labels are advertised if host-route configuration is changed. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
This commit is contained in:
parent
8fcca5024f
commit
6b4830dc1e
61
tests/topotests/ldp-oc-acl-topo1/r1/show_ldp_all_binding.ref
Normal file
61
tests/topotests/ldp-oc-acl-topo1/r1/show_ldp_all_binding.ref
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"bindings":[
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"1.1.1.1/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"2.2.2.2/32",
|
||||
"neighborId":"2.2.2.2",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"3.3.3.3/32",
|
||||
"neighborId":"2.2.2.2",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"4.4.4.4/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.1.0/24",
|
||||
"neighborId":"2.2.2.2",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.2.0/24",
|
||||
"neighborId":"2.2.2.2",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.3.0/24",
|
||||
"neighborId":"2.2.2.2",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"123.0.1.0/24",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
}
|
||||
]
|
||||
}
|
63
tests/topotests/ldp-oc-acl-topo1/r2/show_ldp_all_binding.ref
Normal file
63
tests/topotests/ldp-oc-acl-topo1/r2/show_ldp_all_binding.ref
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"bindings":[
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"1.1.1.1/32",
|
||||
"neighborId":"1.1.1.1",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"2.2.2.2/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"3.3.3.3/32",
|
||||
"neighborId":"3.3.3.3",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"4.4.4.4/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.1.0/24",
|
||||
"neighborId":"1.1.1.1",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.2.0/24",
|
||||
"neighborId":"3.3.3.3",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.3.0/24",
|
||||
"neighborId":"3.3.3.3",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"123.0.1.0/24",
|
||||
"neighborId":"1.1.1.1",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
}
|
||||
]
|
||||
}
|
61
tests/topotests/ldp-oc-acl-topo1/r3/show_ldp_all_binding.ref
Normal file
61
tests/topotests/ldp-oc-acl-topo1/r3/show_ldp_all_binding.ref
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"bindings":[
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"1.1.1.1/32",
|
||||
"neighborId":"2.2.2.2",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"2.2.2.2/32",
|
||||
"neighborId":"2.2.2.2",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"3.3.3.3/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"4.4.4.4/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.1.0/24",
|
||||
"neighborId":"2.2.2.2",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":1
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.2.0/24",
|
||||
"neighborId":"2.2.2.2",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"imp-null",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.3.0/24",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"123.0.1.0/24",
|
||||
"neighborId":"2.2.2.2",
|
||||
"inUse":1
|
||||
}
|
||||
]
|
||||
}
|
68
tests/topotests/ldp-oc-acl-topo1/r4/show_ldp_all_binding.ref
Normal file
68
tests/topotests/ldp-oc-acl-topo1/r4/show_ldp_all_binding.ref
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"bindings":[
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"1.1.1.1/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"2.2.2.2/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"3.3.3.3/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"4.4.4.4/32",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.1.0/24",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.2.0/24",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"10.0.3.0/24",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
},
|
||||
{
|
||||
"addressFamily":"ipv4",
|
||||
"prefix":"123.0.1.0/24",
|
||||
"neighborId":"0.0.0.0",
|
||||
"localLabel":"imp-null",
|
||||
"remoteLabel":"-",
|
||||
"inUse":0
|
||||
}
|
||||
]
|
||||
}
|
@ -213,6 +213,22 @@ def test_ldp_bindings():
|
||||
for rname in ['r1', 'r2', 'r3', 'r4']:
|
||||
router_compare_json_output(rname, "show mpls ldp binding json", "show_ldp_binding.ref")
|
||||
|
||||
def test_ldp_bindings_all_routes():
|
||||
logger.info("Test: verify LDP bindings after host filter removed")
|
||||
tgen = get_topogen()
|
||||
|
||||
# Skip if previous fatal error condition is raised
|
||||
if tgen.routers_have_failure():
|
||||
pytest.skip(tgen.errors)
|
||||
|
||||
# remove ACL that blocks advertising everything but host routes */
|
||||
cmd = 'vtysh -c \"configure terminal\" -c \"mpls ldp\" -c \"address-family ipv4\" -c \"no label local allocate host-routes\"'
|
||||
tgen.net['r1'].cmd(cmd)
|
||||
sleep(2)
|
||||
|
||||
for rname in ['r1', 'r2', 'r3', 'r4']:
|
||||
router_compare_json_output(rname, "show mpls ldp binding json", "show_ldp_all_binding.ref")
|
||||
|
||||
# Memory leak test template
|
||||
def test_memory_leak():
|
||||
"Run the memory leak test and report results."
|
||||
|
Loading…
Reference in New Issue
Block a user