summaryrefslogtreecommitdiff
path: root/tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-10-08 19:38:44 +0300
committerGitHub <noreply@github.com>2020-10-08 19:38:44 +0300
commitebe39ad5d1c4787cf74836c8b453fa4464051a5e (patch)
treef6c52ae4a6c8498c9fe501d8e0170981c273350f /tests/topotests/bgp-vrf-route-leak-basic/test_bgp-vrf-route-leak-basic.py
parent75bc27898db9347ef6ffa4734cfb9f88e25c7b85 (diff)
parent74d5f2543c89bdea7b9a3dcb43dd62c38dfd2ed7 (diff)
Merge pull request #7260 from qlyoung/reformat-python
Reformat python
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)