summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/common_config.py
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2021-08-02 22:24:08 +0000
committerChristian Hopps <chopps@labn.net>2021-08-03 09:07:49 +0000
commit269a822be49b2bd7f8304f0335fc48a490e00dd0 (patch)
treec0f7bc5a4811721588226627dbc72bb2e7d8bb8b /tests/topotests/lib/common_config.py
parenta76301c11c10bc87ff14d954bab21bca8679fad9 (diff)
tests: dump the actual json values to log
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tests/topotests/lib/common_config.py')
-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,
)