]> git.proxmox.com Git - mirror_frr.git/blob - tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / tests / topotests / bgp_l3vpn_to_bgp_vrf / test_bgp_l3vpn_to_bgp_vrf.py
1 #!/usr/bin/env python
2 # SPDX-License-Identifier: ISC
3
4 #
5 # Part of NetDEF Topology Tests
6 #
7 # Copyright (c) 2018, LabN Consulting, L.L.C.
8 # Authored by Lou Berger <lberger@labn.net>
9 #
10
11 import os
12 import sys
13 import pytest
14
15 sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
16
17 from lib.ltemplate import *
18
19 pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd]
20
21
22 def test_check_linux_vrf():
23 CliOnFail = None
24 # For debugging, uncomment the next line
25 # CliOnFail = 'tgen.mininet_cli'
26 CheckFunc = "ltemplateVersionCheck('4.1', iproute2='4.9')"
27 # uncomment next line to start cli *before* script is run
28 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
29 ltemplateTest("scripts/check_linux_vrf.py", False, CliOnFail, CheckFunc)
30
31
32 def test_adjacencies():
33 CliOnFail = None
34 # For debugging, uncomment the next line
35 # CliOnFail = 'tgen.mininet_cli'
36 CheckFunc = "ltemplateVersionCheck('4.1')"
37 # uncomment next line to start cli *before* script is run
38 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
39 ltemplateTest("scripts/adjacencies.py", False, CliOnFail, CheckFunc)
40
41
42 def test_notification_check():
43 CliOnFail = None
44 # For debugging, uncomment the next line
45 # CliOnFail = 'tgen.mininet_cli'
46 CheckFunc = "ltemplateVersionCheck('4.1', iproute2='4.9')"
47 # uncomment next line to start cli *before* script is run
48 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
49 ltemplateTest("scripts/notification_check.py", False, CliOnFail, CheckFunc)
50
51
52 def SKIP_test_add_routes():
53 CliOnFail = None
54 # For debugging, uncomment the next line
55 # CliOnFail = 'tgen.mininet_cli'
56 CheckFunc = "ltemplateVersionCheck('4.1')"
57 # uncomment next line to start cli *before* script is run
58 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
59 ltemplateTest("scripts/add_routes.py", False, CliOnFail, CheckFunc)
60
61
62 def test_check_routes():
63 CliOnFail = None
64 # For debugging, uncomment the next line
65 # CliOnFail = 'tgen.mininet_cli'
66 CheckFunc = "ltemplateVersionCheck('4.1')"
67 # uncomment next line to start cli *before* script is run
68 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
69 ltemplateTest("scripts/check_routes.py", False, CliOnFail, CheckFunc)
70
71
72 # manual data path setup test - remove once have bgp/zebra vrf path working
73 def test_check_linux_mpls():
74 CliOnFail = None
75 # For debugging, uncomment the next line
76 # CliOnFail = 'tgen.mininet_cli'
77 CheckFunc = "ltemplateVersionCheck('4.1', iproute2='4.9')"
78 # uncomment next line to start cli *before* script is run
79 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
80 ltemplateTest("scripts/check_linux_mpls.py", False, CliOnFail, CheckFunc)
81
82
83 def test_check_scale_up():
84 CliOnFail = None
85 # For debugging, uncomment the next line
86 # CliOnFail = 'tgen.mininet_cli'
87 CheckFunc = "ltemplateVersionCheck('4.1', iproute2='4.9')"
88 # uncomment next line to start cli *before* script is run
89 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
90 ltemplateTest("scripts/scale_up.py", False, CliOnFail, CheckFunc)
91
92
93 def test_check_scale_down():
94 CliOnFail = None
95 # For debugging, uncomment the next line
96 # CliOnFail = 'tgen.mininet_cli'
97 CheckFunc = "ltemplateVersionCheck('4.1', iproute2='4.9')"
98 # uncomment next line to start cli *before* script is run
99 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
100 ltemplateTest("scripts/scale_down.py", False, CliOnFail, CheckFunc)
101
102
103 def SKIP_test_cleanup_all():
104 CliOnFail = None
105 # For debugging, uncomment the next line
106 # CliOnFail = 'tgen.mininet_cli'
107 CheckFunc = "ltemplateVersionCheck('4.1')"
108 # uncomment next line to start cli *before* script is run
109 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
110 ltemplateTest("scripts/cleanup_all.py", False, CliOnFail, CheckFunc)
111
112
113 if __name__ == "__main__":
114 retval = pytest.main(["-s"])
115 sys.exit(retval)