From: Martin Winter Date: Thu, 6 Sep 2018 22:52:43 +0000 (-0700) Subject: lib: checkRouterVersion to determine version X-Git-Tag: frr-7.1-dev~151^2~8 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6bfe4b8bfc5f6f5765f89b09135971cf32b3637b;p=mirror%2Ffrr.git lib: checkRouterVersion to determine version Signed-off-by: Martin Winter --- diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index a1998bf87b..3d6a0d3733 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -970,6 +970,12 @@ class Router(Node): Usage example: router.checkRouterVersion('>', '1.0') """ + + # Make sure we have version information first + if self.version == None: + self.version = self.cmd(os.path.join(self.daemondir, 'bgpd')+' -v').split()[2] + logger.info('{}: running version: {}'.format(self.name,self.version)) + rversion = self.version if rversion is None: return False