summaryrefslogtreecommitdiff
path: root/tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py')
-rw-r--r--tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py76
1 files changed, 14 insertions, 62 deletions
diff --git a/tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py b/tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py
index 5aa1bdf329..36f1d8cd56 100644
--- a/tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py
+++ b/tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py
@@ -90,84 +90,36 @@ def test_vrf_route_leak():
# Test DONNA VRF.
expect = {
- '10.0.0.0/24': [
- {
- 'protocol': 'connected',
- }
+ "10.0.0.0/24": [{"protocol": "connected",}],
+ "10.0.1.0/24": [
+ {"protocol": "bgp", "selected": True, "nexthops": [{"fib": True}]}
],
- '10.0.1.0/24': [
- {
- 'protocol': 'bgp',
- 'selected': True,
- 'nexthops': [
- {
- 'fib': True
- }
- ]
- }
+ "10.0.2.0/24": [{"protocol": "connected"}],
+ "10.0.3.0/24": [
+ {"protocol": "bgp", "selected": True, "nexthops": [{"fib": True}]}
],
- '10.0.2.0/24': [
- {
- 'protocol': 'connected'
- }
- ],
- '10.0.3.0/24': [
- {
- 'protocol': 'bgp',
- 'selected': True,
- 'nexthops': [
- {
- 'fib': True
- }
- ]
- }
- ]
}
test_func = partial(
- topotest.router_json_cmp, r1, 'show ip route vrf DONNA json', expect
+ topotest.router_json_cmp, r1, "show ip route vrf DONNA json", expect
)
result, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result, "BGP VRF DONNA check failed:\n{}".format(diff)
# Test EVA VRF.
expect = {
- '10.0.0.0/24': [
- {
- 'protocol': 'bgp',
- 'selected': True,
- 'nexthops': [
- {
- 'fib': True
- }
- ]
- }
- ],
- '10.0.1.0/24': [
- {
- 'protocol': 'connected',
- }
+ "10.0.0.0/24": [
+ {"protocol": "bgp", "selected": True, "nexthops": [{"fib": True}]}
],
- '10.0.2.0/24': [
- {
- 'protocol': 'bgp',
- 'selected': True,
- 'nexthops': [
- {
- 'fib': True
- }
- ]
- }
+ "10.0.1.0/24": [{"protocol": "connected",}],
+ "10.0.2.0/24": [
+ {"protocol": "bgp", "selected": True, "nexthops": [{"fib": True}]}
],
- '10.0.3.0/24': [
- {
- 'protocol': 'connected',
- }
- ]
+ "10.0.3.0/24": [{"protocol": "connected",}],
}
test_func = partial(
- topotest.router_json_cmp, r1, 'show ip route vrf EVA json', expect
+ topotest.router_json_cmp, r1, "show ip route vrf EVA json", expect
)
result, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result, "BGP VRF EVA check failed:\n{}".format(diff)