1# test ospfd together with two interface state machines
2
3use strict;
4use warnings;
5use Default qw($ospfd_ip $ospfd_rtrid);
6
7our %tst_args = (
8    client => {
9	state => [
10	    {
11		pri => 1,
12	    },
13	    {
14		pri => 2,
15	    },
16	],
17	tasks => [
18	    {
19		name => "receive hello with dr 0.0.0.0 bdr 0.0.0.0, ".
20		    "enter $ospfd_rtrid as our neighbor",
21		check => {
22		    dr  => "0.0.0.0",
23		    bdr => "0.0.0.0",
24		    nbrs => [],
25		},
26		state => [
27		    {
28			nbrs => [ $ospfd_rtrid, "10.188.0.19" ],
29		    },
30		    {
31			nbrs => [ $ospfd_rtrid, "10.188.0.18" ],
32		    },
33		],
34	    },
35	    {
36		name => "wait for neighbor 10.188.0.18 in received hello",
37		check => {
38		    dr  => "0.0.0.0",
39		    bdr => "0.0.0.0",
40		},
41		wait => {
42		    nbrs => [ "10.188.0.18", "10.188.0.19" ],
43		},
44		timeout => 5,  # 2 * hello interval + 1 second
45	    },
46	    {
47		name => "we are 2-way, wait for dr $ospfd_ip and ".
48		    "bdr 10.188.6.18 in received hello",
49		check => {
50		    nbrs => [ "10.188.0.18", "10.188.0.19" ],
51		},
52		wait => {
53		    dr  => $ospfd_ip,
54		    bdr => "10.188.6.19",
55		},
56		timeout => 11,  # dead interval + hello interval + 1 second
57	    },
58	],
59    },
60);
61
621;
63