summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/topotests/lib/common_config.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index 07bb5153ab..7a00629892 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -30,6 +30,7 @@ from functools import wraps
from re import search as re_search
from tempfile import mkdtemp
+import json
import os
import sys
import traceback
@@ -235,14 +236,12 @@ def run_frr_cmd(rnode, cmd, isjson=False):
if True:
if isjson:
- logger.debug(ret_data)
- print_data = rnode.vtysh_cmd(cmd.rstrip("json"), isjson=False)
+ print_data = json.dumps(ret_data)
else:
print_data = ret_data
-
logger.info(
- "Output for command [ %s] on router %s:\n%s",
- cmd.rstrip("json"),
+ "Output for command [%s] on router %s:\n%s",
+ cmd,
rnode.name,
print_data,
)