mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 01:40:16 +00:00
ospfd: Use vty_json() for show_ip_ospf_gr_helper_cmd
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
66964cf6bf
commit
a38db2fac7
@ -10350,12 +10350,8 @@ DEFPY (show_ip_ospf_gr_helper,
|
|||||||
vty, ospf, use_vrf, json, uj, detail);
|
vty, ospf, use_vrf, json, uj, detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uj) {
|
if (uj)
|
||||||
vty_out(vty, "%s\n",
|
vty_json(vty, json);
|
||||||
json_object_to_json_string_ext(
|
|
||||||
json, JSON_C_TO_STRING_PRETTY));
|
|
||||||
json_object_free(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -10364,12 +10360,9 @@ DEFPY (show_ip_ospf_gr_helper,
|
|||||||
|
|
||||||
if (ospf == NULL || !ospf->oi_running) {
|
if (ospf == NULL || !ospf->oi_running) {
|
||||||
|
|
||||||
if (uj) {
|
if (uj)
|
||||||
vty_out(vty, "%s\n",
|
vty_json(vty, json);
|
||||||
json_object_to_json_string_ext(
|
else
|
||||||
json, JSON_C_TO_STRING_PRETTY));
|
|
||||||
json_object_free(json);
|
|
||||||
} else
|
|
||||||
vty_out(vty, "%% OSPF instance not found\n");
|
vty_out(vty, "%% OSPF instance not found\n");
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -10381,12 +10374,9 @@ DEFPY (show_ip_ospf_gr_helper,
|
|||||||
|
|
||||||
if (ospf == NULL || !ospf->oi_running) {
|
if (ospf == NULL || !ospf->oi_running) {
|
||||||
|
|
||||||
if (uj) {
|
if (uj)
|
||||||
vty_out(vty, "%s\n",
|
vty_json(vty, json);
|
||||||
json_object_to_json_string_ext(
|
else
|
||||||
json, JSON_C_TO_STRING_PRETTY));
|
|
||||||
json_object_free(json);
|
|
||||||
} else
|
|
||||||
vty_out(vty, "%% OSPF instance not found\n");
|
vty_out(vty, "%% OSPF instance not found\n");
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -10396,11 +10386,8 @@ DEFPY (show_ip_ospf_gr_helper,
|
|||||||
detail);
|
detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uj) {
|
if (uj)
|
||||||
vty_out(vty, "%s\n", json_object_to_json_string_ext(
|
vty_json(vty, json);
|
||||||
json, JSON_C_TO_STRING_PRETTY));
|
|
||||||
json_object_free(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user