diff options
Diffstat (limited to 'zebra/zebra_srv6_vty.c')
| -rw-r--r-- | zebra/zebra_srv6_vty.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c index cb1e6c4228..ebe0fffcb2 100644 --- a/zebra/zebra_srv6_vty.c +++ b/zebra/zebra_srv6_vty.c @@ -108,9 +108,7 @@ DEFUN (show_srv6_locator, } - vty_out(vty, "%s\n", json_object_to_json_string_ext(json, - JSON_C_TO_STRING_PRETTY)); - json_object_free(json); + vty_json(vty, json); } else { vty_out(vty, "Locator:\n"); vty_out(vty, "Name ID Prefix Status\n"); @@ -147,10 +145,16 @@ DEFUN (show_srv6_locator_detail, struct listnode *node; char str[256]; const char *locator_name = argv[4]->arg; + json_object *json_locator = NULL; if (uj) { - vty_out(vty, "JSON format isn't supported\n"); - return CMD_WARNING; + locator = zebra_srv6_locator_lookup(locator_name); + if (!locator) + return CMD_WARNING; + + json_locator = srv6_locator_detailed_json(locator); + vty_json(vty, json_locator); + return CMD_SUCCESS; } for (ALL_LIST_ELEMENTS_RO(srv6->locators, node, locator)) { |
