Skip to content

Commit d9051cf

Browse files
committed
Use symbolic wait times in OSPFv2/OSPFv3 validation tests
1 parent 30eb2f9 commit d9051cf

27 files changed

+115
-73
lines changed

tests/integration/ospf/ospfv2/01-network.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ message: |
88
likely on the 'broadcast' link) or due to MTU mismatch (in which case both
99
adjacencies would fail).
1010
11+
defaults.sources.extra: [ ../../wait_times.yml ]
1112
module: [ ospf ]
1213

1314
groups:
@@ -34,6 +35,6 @@ validate:
3435
adj:
3536
description: Check OSPF adjacencies
3637
wait_msg: Waiting for OSPF adjacency process to complete
37-
wait: 50
38+
wait: ospfv2_adj_lan
3839
nodes: [ x1, x2 ]
3940
plugin: ospf_neighbor(nodes.dut.ospf.router_id)

tests/integration/ospf/ospfv2/02-areas.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ message: |
33
This lab tests the OSPF areas. The device under test has three interfaces
44
in three different areas and the loopback interface in one of those areas.
55
6+
defaults.sources.extra: [ ../../wait_times.yml ]
67
module: [ ospf ]
78

89
groups:
@@ -42,19 +43,19 @@ links:
4243
validate:
4344
adj:
4445
description: Check OSPF adjacencies
45-
wait: 30
46+
wait: ospfv2_adj_p2p
4647
wait_msg: Waiting for OSPF adjacency process to complete
4748
nodes: [ x1, x2, x3 ]
4849
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
4950
lb:
5051
description: Check for DUT loopback prefix being an inter-area route in areas 0 and 3
51-
wait: 20
52+
wait: ospfv2_spf
5253
wait_msg: Waiting for DUT and SPF to do their magic
5354
nodes: [ x1, x3 ]
5455
plugin: ospf_prefix('10.0.0.1/32',rt='N IA')
5556
lb2:
5657
description: Check for DUT loopback prefix being an intra-area route in area 2
57-
wait: 10
58+
wait: ospfv2_spf
5859
wait_msg: Waiting for SPF to do its magic
5960
nodes: [ x2 ]
6061
plugin: ospf_prefix('10.0.0.1/32',rt='N')

tests/integration/ospf/ospfv2/03-cost.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ message: |
33
This lab tests whether the OSPF costs are correctly applied
44
to physical and loopback interfaces.
55
6+
defaults.sources.extra: [ ../../wait_times.yml ]
67
module: [ ospf ]
78

89
groups:
@@ -33,19 +34,19 @@ links:
3334
validate:
3435
adj:
3536
description: Check OSPF adjacencies
36-
wait: 30
37+
wait: ospfv2_adj_p2p
3738
wait_msg: Waiting for OSPF adjacency process to complete
3839
nodes: [ x1, x2 ]
3940
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
4041
c_x1:
4142
description: Check cost X2 => X1
42-
wait: 10
43+
wait: ospfv2_spf
4344
wait_msg: Wait for SPF run to complete
4445
nodes: [ x1 ]
4546
plugin: ospf_prefix(nodes.x2.loopback.ipv4,cost=20)
4647
c_x2:
4748
description: Check cost X1 => X2
48-
wait: 10
49+
wait: ospfv2_spf
4950
wait_msg: Wait for SPF run to complete
5051
nodes: [ x2 ]
5152
plugin: ospf_prefix(nodes.x1.loopback.ipv4,cost=27)

tests/integration/ospf/ospfv2/04-passive.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ message: |
33
This lab tests whether the OSPF interfaces on device under test are correctly
44
configured as passive interfaces.
55
6+
defaults.sources.extra: [ ../../wait_times.yml ]
67
module: [ ospf ]
78

89
groups:
@@ -43,7 +44,7 @@ links:
4344
validate:
4445
adj_x1:
4546
description: Is DUT a neigbor of X1?
46-
wait: 30
47+
wait: ospfv2_adj_p2p
4748
wait_msg: Waiting for OSPF adjacency process to complete
4849
pass: OK, X1 has DUT as a neighbor
4950
nodes: [ x1 ]

tests/integration/ospf/ospfv2/05-unnumbered.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
message: |
33
This lab tests OSPF running over unnumbered IPv4 interfaces.
44
5+
defaults.sources.extra: [ ../../wait_times.yml ]
56
module: [ ospf ]
67

78
groups:
@@ -24,14 +25,14 @@ links:
2425
validate:
2526
adj:
2627
description: Is DUT a neigbor of X1?
27-
wait: 30
28+
wait: ospfv2_adj_p2p
2829
wait_msg: Waiting for OSPF adjacency process to complete
2930
pass: OK, X1 has DUT as a neighbor
3031
nodes: [ x1 ]
3132
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
3233
lb:
3334
description: Check the DUT loopback prefix on X1
34-
wait: 10
35+
wait: ospfv2_spf
3536
wait_msg: Waiting for SPF process to complete
3637
nodes: [ x1 ]
3738
plugin: ospf_prefix(nodes.dut.loopback.ipv4,rt='N')

tests/integration/ospf/ospfv2/06-vlan-mtu.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ message: |
88
potential problem with system MTU. Failure to establish X3-DUT adjacency
99
indicates the MTU is not set correctly on VLAN/SVI interface.
1010
11+
defaults.sources.extra: [ ../../wait_times.yml ]
1112
module: [ ospf, vlan ]
1213

1314
defaults.vlan.start_vlan_id: 500
@@ -49,6 +50,6 @@ validate:
4950
adj:
5051
description: Check OSPF adjacencies
5152
wait_msg: Waiting for OSPF adjacency process to complete
52-
wait: 60
53+
wait: ospfv2_adj_lan
5354
nodes: [ x1, x2, x3 ]
5455
plugin: ospf_neighbor(nodes.dut.ospf.router_id)

tests/integration/ospf/ospfv2/10-import.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
message: |
33
This lab tests the simple import of BGP routes into OSPF.
44
5+
defaults.sources.extra: [ ../../wait_times.yml ]
56
groups:
67
probes:
78
device: frr
@@ -25,18 +26,18 @@ validate:
2526
adj_ospf:
2627
description: Check OSPF adjacency
2728
wait_msg: Waiting for OSPF adjacency process to complete
28-
wait: 50
29+
wait: ospfv2_adj_p2p
2930
nodes: [ r2 ]
3031
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
3132
adj_bgp:
3233
description: Check EBGP sessions with DUT
3334
wait_msg: Wait for BGP sessions to be established
34-
wait: 30
35+
wait: ebgp_session
3536
nodes: [ x1 ]
3637
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3738
redist:
3839
description: Check for redistributed X1 loopback on R2
39-
wait: 20
40+
wait: ospf_import
4041
wait_msg: Waiting for routing protocols to do their magic
4142
nodes: [ r2 ]
4243
plugin: ospf_prefix(nodes.x1.loopback.ipv4)

tests/integration/ospf/ospfv2/11-import-policy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
message: |
33
This lab tests the simple import of IPv4 BGP routes into OSPF via a route-map
44
5+
defaults.sources.extra: [ ../../wait_times.yml ]
56
groups:
67
probes:
78
device: frr
@@ -44,24 +45,24 @@ validate:
4445
adj_ospf:
4546
description: Check OSPF adjacency
4647
wait_msg: Waiting for OSPF adjacency process to complete
47-
wait: 50
48+
wait: ospfv2_adj_p2p
4849
nodes: [ r2 ]
4950
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
5051
adj_bgp:
5152
description: Check EBGP sessions with DUT
5253
wait_msg: Wait for BGP sessions to be established
53-
wait: 30
54+
wait: ebgp_session
5455
nodes: [ x1 ]
5556
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
5657
r_bcn:
5758
description: Check for redistributed beacon prefix R2
58-
wait: 20
59+
wait: ospf_import
5960
wait_msg: Waiting for routing protocols to do their magic
6061
nodes: [ r2 ]
6162
plugin: ospf_prefix(prefix.beacon.ipv4)
6263
r_lb:
6364
description: Check for redistributed X1 loopback on R2
64-
wait: 20
65+
wait: ospf_import
6566
wait_msg: Waiting for routing protocols to do their magic
6667
nodes: [ r2 ]
6768
plugin: ospf_prefix(nodes.x1.loopback.ipv4,state='missing')

tests/integration/ospf/ospfv2/20-default.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ message: |
44
should originate the default route, one always, the other one based one
55
BGP default route.
66
7+
defaults.sources.extra: [ ../../wait_times.yml ]
78
module: [ ospf ]
89

910
groups:
@@ -43,29 +44,29 @@ links:
4344
validate:
4445
adj_a:
4546
description: Check OSPF adjacencies with DUT_A
46-
wait: 30
47+
wait: ospfv2_adj_p2p
4748
wait_msg: Waiting for OSPF adjacency process to complete
4849
nodes: [ probe ]
4950
plugin: ospf_neighbor(nodes.dut_a.ospf.router_id)
5051
stop_on_error: True
5152
adj_c:
5253
description: Check OSPF adjacencies with DUT_C
53-
wait: 30
54+
wait: ospfv2_adj_p2p
5455
wait_msg: Waiting for OSPF adjacency process to complete
5556
nodes: [ probe ]
5657
plugin: ospf_neighbor(nodes.dut_c.ospf.router_id)
5758
stop_on_error: True
5859
adj_x:
5960
description: Check EBGP sessions with DUT_C
6061
wait_msg: Wait for BGP sessions to be established
61-
wait: 30
62+
wait: ebgp_session
6263
nodes: [ xf ]
6364
plugin: bgp_neighbor(node.bgp.neighbors,'dut_c')
6465
stop_on_error: True
6566
df_a:
6667
description: Do we have at least some default route?
6768
wait_msg: Wait for SPF to complete
68-
wait: 10
69+
wait: ospfv2_spf
6970
nodes: [ probe ]
7071
plugin: ospf_prefix('0.0.0.0/0')
7172
stop_on_error: True
@@ -92,7 +93,7 @@ validate:
9293
df_c:
9394
description: Check for the conditional default route
9495
wait_msg: Wait for SPF to complete
95-
wait: 10
96+
wait: ospfv2_spf
9697
nodes: [ probe ]
9798
plugin: ospf_prefix('0.0.0.0/0')
9899
df_c_cost:

tests/integration/ospf/ospfv2/21-default-policy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ message: |
44
under test should originate the default route if the external router
55
advertises its loopback interface.
66
7+
defaults.sources.extra: [ ../../wait_times.yml ]
78
module: [ ospf ]
89

910
groups:
@@ -42,20 +43,20 @@ links:
4243
validate:
4344
adj_ospf:
4445
description: Check OSPF adjacencies with DUT
45-
wait: 30
46+
wait: ospfv2_adj_p2p
4647
wait_msg: Waiting for OSPF adjacency process to complete
4748
nodes: [ probe ]
4849
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
4950
adj_bgp:
5051
description: Check EBGP sessions with DUT
5152
wait_msg: Wait for BGP sessions to be established
52-
wait: 30
53+
wait: ebgp_session
5354
nodes: [ xf ]
5455
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
5556
df:
5657
description: Do we have at least some default route?
5758
wait_msg: Wait for SPF to complete
58-
wait: 10
59+
wait: ospfv2_spf
5960
nodes: [ probe ]
6061
plugin: ospf_prefix('0.0.0.0/0')
6162
bgp_lbd:
@@ -68,7 +69,7 @@ validate:
6869
df_c:
6970
description: Check for the conditional default route
7071
wait_msg: Wait for SPF to complete
71-
wait: 10
72+
wait: ospfv2_spf
7273
nodes: [ probe ]
7374
plugin: ospf_prefix('0.0.0.0/0',state='missing')
7475
bgp_lbe:

0 commit comments

Comments
 (0)