summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/topotests/ospf_metric_propagation/r1/frr.conf9
-rw-r--r--tests/topotests/ospf_metric_propagation/r1/show_ip_route_static.json31
-rw-r--r--tests/topotests/ospf_metric_propagation/r4/frr.conf5
-rw-r--r--tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py6
4 files changed, 15 insertions, 36 deletions
diff --git a/tests/topotests/ospf_metric_propagation/r1/frr.conf b/tests/topotests/ospf_metric_propagation/r1/frr.conf
index 082f7df519..09ae6e8d18 100644
--- a/tests/topotests/ospf_metric_propagation/r1/frr.conf
+++ b/tests/topotests/ospf_metric_propagation/r1/frr.conf
@@ -1,6 +1,10 @@
!
hostname r1
!
+vrf green
+ ip route 10.48.48.0/24 10.0.91.2
+exit
+!
interface r1-eth0
ip address 10.0.1.1/24
ip ospf cost 100
@@ -61,6 +65,7 @@ router bgp 99 vrf green
address-family ipv4 unicast
redistribute connected
redistribute ospf
+ redistribute static
import vrf route-map rmap
import vrf default
import vrf blue
@@ -75,7 +80,7 @@ ip prefix-list min seq 5 permit 10.0.80.0/24
route-map costmax permit 20
set metric-type type-1
set metric +1
- set metric-min 713
+ set min-metric 713
match ip address prefix-list min
exit
!
@@ -83,7 +88,7 @@ ip prefix-list max seq 10 permit 10.0.70.0/24
route-map costplus permit 30
set metric-type type-1
set metric +1
- set metric-max 13
+ set max-metric 13
match ip address prefix-list max
exit
!
diff --git a/tests/topotests/ospf_metric_propagation/r1/show_ip_route_static.json b/tests/topotests/ospf_metric_propagation/r1/show_ip_route_static.json
index 628a556c62..6060e8bd6b 100644
--- a/tests/topotests/ospf_metric_propagation/r1/show_ip_route_static.json
+++ b/tests/topotests/ospf_metric_propagation/r1/show_ip_route_static.json
@@ -3,44 +3,23 @@
{
"prefix":"10.48.48.0/24",
"prefixLen":24,
- "protocol":"ospf",
- "vrfId":0,
- "vrfName":"default",
- "distance":20,
- "metric":134,
- "table":254,
- "nexthops":[
- {
- "flags":3,
- "fib":true,
- "ip":"10.0.1.2",
- "afi":"ipv4",
- "interfaceName":"r1-eth0",
- "active":true,
- "weight":1
- }
- ]
- },
- {
- "prefix":"10.48.48.0/24",
- "prefixLen":24,
"protocol":"bgp",
"vrfId":0,
"vrfName":"default",
"selected":true,
"destSelected":true,
- "distance":20,
- "metric":34,
+ "distance":1,
+ "metric":1,
"installed":true,
"table":254,
"nexthops":[
{
"flags":3,
"fib":true,
- "ip":"10.0.10.5",
+ "ip":"10.0.91.2",
"afi":"ipv4",
- "interfaceName":"r1-eth1",
- "vrf":"blue",
+ "interfaceName":"r1-eth2",
+ "vrf":"green",
"active":true,
"weight":1
}
diff --git a/tests/topotests/ospf_metric_propagation/r4/frr.conf b/tests/topotests/ospf_metric_propagation/r4/frr.conf
index d9832d80b8..b02ae18fc1 100644
--- a/tests/topotests/ospf_metric_propagation/r4/frr.conf
+++ b/tests/topotests/ospf_metric_propagation/r4/frr.conf
@@ -1,10 +1,6 @@
!
hostname r4
!
-vrf green
- ip route 10.48.48.0/24 10.0.94.2
-exit
-
interface r4-eth0
ip address 10.0.3.4/24
ip ospf cost 100
@@ -63,7 +59,6 @@ router bgp 99 vrf green
address-family ipv4 unicast
redistribute connected
redistribute ospf
- redistribute static
import vrf route-map rmap
import vrf default
import vrf blue
diff --git a/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py b/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py
index 4639a1e26b..f574dac4e2 100644
--- a/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py
+++ b/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py
@@ -190,8 +190,8 @@ def test_all_links_up():
assert result is None, assertmsg
-def test_static_remote():
- "Test static route at R1 configured on R4"
+def test_static():
+ "Test static route at R1 leaked from VRF green"
tgen = get_topogen()
if tgen.routers_have_failure():
@@ -201,7 +201,7 @@ def test_static_remote():
json_file = "{}/r1/show_ip_route_static.json".format(CWD)
expected = json.loads(open(json_file).read())
test_func = partial(
- topotest.router_json_cmp, r1, "show ip route 10.48.48.2 json", expected
+ topotest.router_json_cmp, r1, "show ip route 10.48.48.0/24 json", expected
)
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1)