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 <[email protected]>
  • Loading branch information
Sindhu Parvathi Gopinathan authored and chiragshah6 committed Oct 27, 2023
1 parent a709218 commit 3e2ec42
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 @@ -1818,7 +1818,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 3e2ec42

Please sign in to comment.