]>
git.proxmox.com Git - mirror_frr.git/blob - tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
4 # Part of NetDEF Topology Tests
6 # Copyright (c) 2018, LabN Consulting, L.L.C.
7 # Authored by Lou Berger <lberger@labn.net>
9 # Permission to use, copy, modify, and/or distribute this software
10 # for any purpose with or without fee is hereby granted, provided
11 # that the above copyright notice and this permission notice appear
14 # THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
15 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
17 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
18 # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19 # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
20 # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
28 sys
.path
.append(os
.path
.join(os
.path
.dirname(os
.path
.realpath(__file__
)), "../"))
30 from lib
.ltemplate
import *
32 pytestmark
= [pytest
.mark
.bgpd
, pytest
.mark
.ospfd
]
35 def test_check_linux_vrf():
37 # For debugging, uncomment the next line
38 # CliOnFail = 'tgen.mininet_cli'
39 CheckFunc
= "ltemplateVersionCheck('4.1', iproute2='4.9')"
40 # uncomment next line to start cli *before* script is run
41 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
42 ltemplateTest("scripts/check_linux_vrf.py", False, CliOnFail
, CheckFunc
)
45 def test_adjacencies():
47 # For debugging, uncomment the next line
48 # CliOnFail = 'tgen.mininet_cli'
49 CheckFunc
= "ltemplateVersionCheck('4.1')"
50 # uncomment next line to start cli *before* script is run
51 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
52 ltemplateTest("scripts/adjacencies.py", False, CliOnFail
, CheckFunc
)
55 def test_notification_check():
57 # For debugging, uncomment the next line
58 # CliOnFail = 'tgen.mininet_cli'
59 CheckFunc
= "ltemplateVersionCheck('4.1', iproute2='4.9')"
60 # uncomment next line to start cli *before* script is run
61 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
62 ltemplateTest("scripts/notification_check.py", False, CliOnFail
, CheckFunc
)
65 def SKIP_test_add_routes():
67 # For debugging, uncomment the next line
68 # CliOnFail = 'tgen.mininet_cli'
69 CheckFunc
= "ltemplateVersionCheck('4.1')"
70 # uncomment next line to start cli *before* script is run
71 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
72 ltemplateTest("scripts/add_routes.py", False, CliOnFail
, CheckFunc
)
75 def test_check_routes():
77 # For debugging, uncomment the next line
78 # CliOnFail = 'tgen.mininet_cli'
79 CheckFunc
= "ltemplateVersionCheck('4.1')"
80 # uncomment next line to start cli *before* script is run
81 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
82 ltemplateTest("scripts/check_routes.py", False, CliOnFail
, CheckFunc
)
85 # manual data path setup test - remove once have bgp/zebra vrf path working
86 def test_check_linux_mpls():
88 # For debugging, uncomment the next line
89 # CliOnFail = 'tgen.mininet_cli'
90 CheckFunc
= "ltemplateVersionCheck('4.1', iproute2='4.9')"
91 # uncomment next line to start cli *before* script is run
92 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
93 ltemplateTest("scripts/check_linux_mpls.py", False, CliOnFail
, CheckFunc
)
96 def test_check_scale_up():
98 # For debugging, uncomment the next line
99 # CliOnFail = 'tgen.mininet_cli'
100 CheckFunc
= "ltemplateVersionCheck('4.1', iproute2='4.9')"
101 # uncomment next line to start cli *before* script is run
102 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
103 ltemplateTest("scripts/scale_up.py", False, CliOnFail
, CheckFunc
)
106 def test_check_scale_down():
108 # For debugging, uncomment the next line
109 # CliOnFail = 'tgen.mininet_cli'
110 CheckFunc
= "ltemplateVersionCheck('4.1', iproute2='4.9')"
111 # uncomment next line to start cli *before* script is run
112 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
113 ltemplateTest("scripts/scale_down.py", False, CliOnFail
, CheckFunc
)
116 def SKIP_test_cleanup_all():
118 # For debugging, uncomment the next line
119 # CliOnFail = 'tgen.mininet_cli'
120 CheckFunc
= "ltemplateVersionCheck('4.1')"
121 # uncomment next line to start cli *before* script is run
122 # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
123 ltemplateTest("scripts/cleanup_all.py", False, CliOnFail
, CheckFunc
)
126 if __name__
== "__main__":
127 retval
= pytest
.main(["-s"])