diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2021-02-01 21:07:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 21:07:57 -0500 |
| commit | d512cb376a025358ec673c96d8ab7ae29460d364 (patch) | |
| tree | 3d7016632f144eee05152856c66800d7a088f40b /ospf6d/ospf6_interface.c | |
| parent | cf8ba91e32f01eb889471499f0f2bbb422a7fb8f (diff) | |
| parent | 35aeb295ed72bbdbc15de93c34aa9e81c2bcab03 (diff) | |
Merge pull request #7402 from ranjanyash54/dev_2
ospf6d: Json support added for command "show ipv6 ospf6 route [json]"
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 948880a4b5..0cc3bd2cc9 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1416,7 +1416,7 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, [<\ detail\ |<X:X::X:X|X:X::X:X/M> [<match|detail>]\ - >]", + >] [json]", SHOW_STR IP6_STR OSPF6_STR @@ -1427,12 +1427,14 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, OSPF6_ROUTE_ADDRESS_STR OSPF6_ROUTE_PREFIX_STR OSPF6_ROUTE_MATCH_STR - "Display details of the prefixes\n") + "Display details of the prefixes\n" + JSON_STR) { int idx_ifname = 4; int idx_prefix = 6; struct interface *ifp; struct ospf6_interface *oi; + bool uj = use_json(argc, argv); ifp = if_lookup_by_name(argv[idx_ifname]->arg, VRF_DEFAULT); if (ifp == NULL) { @@ -1447,8 +1449,8 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, return CMD_WARNING; } - ospf6_route_table_show(vty, idx_prefix, argc, argv, - oi->route_connected); + ospf6_route_table_show(vty, idx_prefix, argc, argv, oi->route_connected, + uj); return CMD_SUCCESS; } @@ -1459,7 +1461,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix, [<\ detail\ |<X:X::X:X|X:X::X:X/M> [<match|detail>]\ - >]", + >] [json]", SHOW_STR IP6_STR OSPF6_STR @@ -1469,12 +1471,14 @@ DEFUN (show_ipv6_ospf6_interface_prefix, OSPF6_ROUTE_ADDRESS_STR OSPF6_ROUTE_PREFIX_STR OSPF6_ROUTE_MATCH_STR - "Display details of the prefixes\n") + "Display details of the prefixes\n" + JSON_STR) { struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); int idx_prefix = 5; struct ospf6_interface *oi; struct interface *ifp; + bool uj = use_json(argc, argv); FOR_ALL_INTERFACES (vrf, ifp) { oi = (struct ospf6_interface *)ifp->info; @@ -1482,7 +1486,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix, continue; ospf6_route_table_show(vty, idx_prefix, argc, argv, - oi->route_connected); + oi->route_connected, uj); } return CMD_SUCCESS; |
