summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/topogen.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/lib/topogen.py')
-rw-r--r--tests/topotests/lib/topogen.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py
index ade5933504..8888421bf1 100644
--- a/tests/topotests/lib/topogen.py
+++ b/tests/topotests/lib/topogen.py
@@ -471,6 +471,12 @@ class TopoGear(object):
"""
return self.tgen.net[self.name].cmd(command)
+ def popen(self, *params, **kwargs):
+ """
+ Popen on the router.
+ """
+ return self.tgen.net[self.name].popen(*params, **kwargs)
+
def add_link(self, node, myif=None, nodeif=None):
"""
Creates a link (connection) between myself and the specified node.
@@ -801,8 +807,8 @@ class TopoRouter(TopoGear):
try:
return json.loads(output)
- except ValueError:
- logger.warning("vtysh_cmd: failed to convert json output")
+ except ValueError as error:
+ logger.warning("vtysh_cmd: %s: failed to convert json output: %s: %s", self.name, str(output), str(error))
return {}
def vtysh_multicmd(self, commands, pretty_output=True, daemon=None):