From 6bfe4b8bfc5f6f5765f89b09135971cf32b3637b Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Thu, 6 Sep 2018 15:52:43 -0700 Subject: [PATCH] lib: checkRouterVersion to determine version Signed-off-by: Martin Winter --- tests/topotests/lib/topotest.py | 6 ++++++ 1 file changed, 6 insertions(+) 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