tests: iproute2 VRF capability check examples

Example usage of iproute2_is_vrf_capable check in bgp_multi_vrf_topo1
and bgp_multi_vrf_topo2 topotests.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
This commit is contained in:
David Schweizer 2021-03-15 12:49:59 +01:00
parent 0414a76446
commit ddbc1ad2a0
2 changed files with 10 additions and 2 deletions

View File

@ -115,7 +115,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
from mininet.topo import Topo
from lib.topotest import iproute2_is_vrf_capable
from lib.common_config import (
step,
verify_rib,
@ -215,6 +215,10 @@ def setup_module(mod):
if result is not True:
pytest.skip("Kernel requirements are not met")
# iproute2 needs to support VRFs for this suite to run.
if not iproute2_is_vrf_capable():
pytest.skip("Installed iproute2 version does not support VRFs")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
logger.info("=" * 40)

View File

@ -71,7 +71,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
from mininet.topo import Topo
from lib.topotest import iproute2_is_vrf_capable
from lib.common_config import (
step,
verify_rib,
@ -164,6 +164,10 @@ def setup_module(mod):
if result is not True:
pytest.skip("Kernel requirements are not met")
# iproute2 needs to support VRFs for this suite to run.
if not iproute2_is_vrf_capable():
pytest.skip("Installed iproute2 version does not support VRFs")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
logger.info("=" * 40)