]> git.puffer.fish Git - mirror/frr.git/commit
pbrd: fix show pbr map detail json
authorSindhu Parvathi Gopinathan <sgopinathan@nvidia.com>
Mon, 23 Oct 2023 05:59:06 +0000 (22:59 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sun, 29 Oct 2023 08:42:34 +0000 (08:42 +0000)
commit2b5fe6f5cc43151f8b61951e9d9a2d8f9306c67c
tree22b7116f025512a38bdf264415a882032cadcc8e
parent6f47d72711461fdec7aabf1537ae290ea5b9b247
pbrd: fix show pbr map detail json

'detail' and 'josn' keyword is given as an optional parameter
for cli arguments. Hence 'detail' keyword was consider as a
pbr 'name' for "show pbr map detail json" command.

Before Fix:

```
cumulus#
cumulus# show pbr map detail json
[
]
cumulus#
```

After Fix:
```
cumulus# show pbr map detail json
[
  {
    "name":"MAP1",
    "valid":false,
    "policies":[
      {
        "id":1,
        "sequenceNumber":10,
        "ruleNumber":309,
        "vrfUnchanged":false,
        "installed":false,
        "installedReason":"Invalid Src or Dst",
        "vrfName":"default"
      }
    ]
  }
]
cumulus#
```

Ticket:#3638600

Issue:3638600

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
(cherry picked from commit d621c365a65f825adfbc00128360390d0b2bd5be)
pbrd/pbr_vty.c