]>
git.proxmox.com Git - mirror_frr.git/blob - tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
2 # SPDX-License-Identifier: ISC
5 # Part of NetDEF Topology Tests
7 # Copyright (c) 2018, LabN Consulting, L.L.C.
8 # Authored by Lou Berger <lberger@labn.net>
15 sys
.path
.append(os
.path
.join(os
.path
.dirname(os
.path
.realpath(__file__
)), "../"))
17 from lib
.ltemplate
import *
19 pytestmark
= [pytest
.mark
.bgpd
, pytest
.mark
.ospfd
]
22 def test_check_linux_vrf():
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
)
32 def test_adjacencies():
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
)
42 def test_notification_check():
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
)
52 def SKIP_test_add_routes():
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
)
62 def test_check_routes():
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
)
72 # manual data path setup test - remove once have bgp/zebra vrf path working
73 def test_check_linux_mpls():
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
)
83 def test_check_scale_up():
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
)
93 def test_check_scale_down():
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
)
103 def SKIP_test_cleanup_all():
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
)
113 if __name__
== "__main__":
114 retval
= pytest
.main(["-s"])