summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/topogen.py
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-11-23 15:38:19 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2023-12-14 10:57:29 +0100
commit92c1a102e41c26cd6adcdcb6cd266da3a22b79d1 (patch)
treea241f9aadccee8e8dcbfc2e0cf4deefaf2489c50 /tests/topotests/lib/topogen.py
parent5e87eae543df6d841cfb812ecaf01f7afd4ef76a (diff)
topotests: require exabgp version >= 4.2.11
Require exabgp >= 4.2.11 to allow to newer version to run exabgp topotests. Next commits will adapt the exabgp topotests when needed. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'tests/topotests/lib/topogen.py')
-rw-r--r--tests/topotests/lib/topogen.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py
index 48caf6f03a..c77a987117 100644
--- a/tests/topotests/lib/topogen.py
+++ b/tests/topotests/lib/topogen.py
@@ -81,20 +81,20 @@ def is_string(value):
def get_exabgp_cmd(commander=None):
- """Return the command to use for ExaBGP version < 4."""
+ """Return the command to use for ExaBGP version >= 4.2.11"""
if commander is None:
commander = Commander("exabgp", logger=logging.getLogger("exabgp"))
def exacmd_version_ok(exacmd):
- logger.debug("checking %s for exabgp < version 4", exacmd)
+ logger.debug("checking %s for exabgp version >= 4.2.11", exacmd)
_, stdout, _ = commander.cmd_status(exacmd + " -v", warn=False)
m = re.search(r"ExaBGP\s*:\s*((\d+)\.(\d+)(?:\.(\d+))?)", stdout)
if not m:
return False
version = m.group(1)
- if topotest.version_cmp(version, "4") >= 0:
- logging.debug("found exabgp version >= 4 in %s will keep looking", exacmd)
+ if topotest.version_cmp(version, "4.2.11") < 0:
+ logging.debug("found exabgp version < 4.2.11 in %s will keep looking", exacmd)
return False
logger.info("Using ExaBGP version %s in %s", version, exacmd)
return True
@@ -1198,7 +1198,7 @@ class TopoExaBGP(TopoHost):
* Run ExaBGP with env file `env_file` and configuration peer*/exabgp.cfg
"""
exacmd = self.tgen.get_exabgp_cmd()
- assert exacmd, "Can't find a usabel ExaBGP (must be < version 4)"
+ assert exacmd, "Can't find a usable ExaBGP (must be version >= 4.2.11)"
self.run("mkdir -p /etc/exabgp")
self.run("chmod 755 /etc/exabgp")
@@ -1371,7 +1371,7 @@ def diagnose_env_linux(rundir):
logger.info("LDPd tests will not run (missing mpls-iptunnel kernel module)")
if not get_exabgp_cmd():
- logger.warning("Failed to find exabgp < 4")
+ logger.warning("Failed to find exabgp >= 4.2.11")
logger.removeHandler(fhandler)
fhandler.close()