mirror_frr/vtysh
Piotr Suchy 0a17289a3b vtysh, lib: fix 'show ip[v6] prefix-list ... json' formatting by moving it to vtysh
Json output is not valid for 'show ip[v6] prefix-list ... json' commands,
as it goes through all the running daemons and for each one it calls
'vty_show_prefix_list' creating a new json object. To aggreagate the output
and create a valid json that can be parsed, the commands were moved to vtysh.

Before:
{
  "ZEBRA":{
    "DEFAULT":{
      "addressFamily":"IPv4",
      "entries":[
        {
          "sequenceNumber":10,
          "type":"permit",
          "prefix":"0.0.0.0/0"
        }
      ]
    }
  }
}
{
  "OSPF":{
    "DEFAULT":{
      "addressFamily":"IPv4",
      "entries":[
        {
          "sequenceNumber":10,
          "type":"permit",
          "prefix":"0.0.0.0/0"
        }
      ]
    }
  }
}
{
  "BGP":{
    "DEFAULT":{
      "addressFamily":"IPv4",
      "entries":[
        {
          "sequenceNumber":10,
          "type":"permit",
          "prefix":"0.0.0.0/0"
        }
      ]
    }
  }
}

After:
{"zebra":{
  "DEFAULT":{
    "addressFamily":"IPv4",
    "entries":[
      {
        "sequenceNumber":10,
        "type":"permit",
        "prefix":"0.0.0.0/0"
      }
    ]
  }
}
,"ospfd":{
  "DEFAULT":{
    "addressFamily":"IPv4",
    "entries":[
      {
        "sequenceNumber":10,
        "type":"permit",
        "prefix":"0.0.0.0/0"
      }
    ]
  }
}
,"bgpd":{
  "DEFAULT":{
    "addressFamily":"IPv4",
    "entries":[
      {
        "sequenceNumber":10,
        "type":"permit",
        "prefix":"0.0.0.0/0"
      }
    ]
  }
}
}

Signed-off-by: Piotr Suchy <piotrsuchy@proton.me>
2024-04-21 23:40:06 +02:00
..
.gitignore lib,vtysh: add per-daemon log file config 2024-01-17 16:15:07 -05:00
daemons.pl *: manual SPDX License ID conversions 2023-02-09 14:09:07 +01:00
Makefile build: non-recursive vtysh 2018-09-08 21:26:54 +02:00
subdir.am lib,vtysh: add per-daemon log file config 2024-01-17 16:15:07 -05:00
vtysh_config.c vtysh: remove resync workaround when exiting to config node 2024-02-07 18:37:29 +02:00
vtysh_main.c vtysh: Include fnctl.h for vtysh_main 2024-03-09 09:33:40 +02:00
vtysh_user.c vtysh: Give actual pam error messages 2023-05-26 07:44:11 -04:00
vtysh_user.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
vtysh.c vtysh, lib: fix 'show ip[v6] prefix-list ... json' formatting by moving it to vtysh 2024-04-21 23:40:06 +02:00
vtysh.h vtysh, lib: fix 'show ip[v6] prefix-list ... json' formatting by moving it to vtysh 2024-04-21 23:40:06 +02:00