Skip to content

Commit

Permalink
pbrd: fix show pbr map detail json
Browse files Browse the repository at this point in the history
'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 d621c36)
  • Loading branch information
Sindhu Parvathi Gopinathan authored and mergify[bot] committed Oct 29, 2023
1 parent 6f47d72 commit 2b5fe6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pbrd/pbr_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ static void vty_json_pbr_map(json_object *j, struct vty *vty,

DEFPY (show_pbr_map,
show_pbr_map_cmd,
"show pbr map [NAME$name] [detail$detail|json$json]",
"show pbr map [NAME$name] [detail$detail] [json$json]",
SHOW_STR
PBR_STR
"PBR Map\n"
Expand Down

0 comments on commit 2b5fe6f

Please sign in to comment.