summaryrefslogtreecommitdiffstats
path: root/pbrd
diff options
context:
space:
mode:
authorIgor Ryzhov <idryzhov@gmail.com>2021-11-29 00:11:29 +0100
committerGitHub <noreply@github.com>2021-11-29 00:11:29 +0100
commitcb3fa0a61242e542734362918e6afa974c00ce06 (patch)
treeb3e8d090202e56829af3248acfa35878bba74be0 /pbrd
parentMerge pull request #10134 from donaldsharp/isis_topo1_vrf_fix (diff)
parent*: Remove redundand braces for single statement blocks (diff)
downloadfrr-cb3fa0a61242e542734362918e6afa974c00ce06.tar.xz
frr-cb3fa0a61242e542734362918e6afa974c00ce06.zip
Merge pull request #10124 from ton31337/feature/vty_json
Diffstat (limited to 'pbrd')
-rw-r--r--pbrd/pbr_vty.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c
index 47acfd82a..ebcbbb720 100644
--- a/pbrd/pbr_vty.c
+++ b/pbrd/pbr_vty.c
@@ -1032,12 +1032,8 @@ DEFPY (show_pbr_map,
vty_show_pbr_map(vty, pbrm, detail);
}
- if (j) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- j, JSON_C_TO_STRING_PRETTY));
- json_object_free(j);
- }
+ if (j)
+ vty_json(vty, j);
return CMD_SUCCESS;
}
@@ -1059,11 +1055,7 @@ DEFPY(show_pbr_nexthop_group,
if (j) {
pbr_nht_json_nexthop_group(j, word);
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- j, JSON_C_TO_STRING_PRETTY));
-
- json_object_free(j);
+ vty_json(vty, j);
} else
pbr_nht_show_nexthop_group(vty, word);
@@ -1137,12 +1129,8 @@ DEFPY (show_pbr_interface,
}
}
- if (j) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- j, JSON_C_TO_STRING_PRETTY));
- json_object_free(j);
- }
+ if (j)
+ vty_json(vty, j);
return CMD_SUCCESS;
}