From ee0286d62ab22808b8ead2f8134f5cfdf1126b4b Mon Sep 17 00:00:00 2001 From: Sindhu Parvathi Gopinathan Date: Sun, 22 Oct 2023 22:59:06 -0700 Subject: [PATCH 1/2] 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 (cherry picked from commit d621c365a65f825adfbc00128360390d0b2bd5be) --- pbrd/pbr_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index 582ffac9b24b..9589e5be2337 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -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" From b3a7641f623b60a28f71ceb630bdb4384d866969 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Fri, 27 Oct 2023 08:06:27 -0700 Subject: [PATCH 2/2] doc: fix pbr map detail json Fix the documentation for the pbr map command with correct syntax. Signed-off-by: Chirag Shah (cherry picked from commit df3d91f0851d551cc481599c1fa1a1dc5a29cd92) --- doc/user/pbr.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/pbr.rst b/doc/user/pbr.rst index 83abfa220eee..7a4effd3fcbc 100644 --- a/doc/user/pbr.rst +++ b/doc/user/pbr.rst @@ -267,7 +267,7 @@ specified in the rule are also applied to the packet. this action, so this field will be ignored unless another dataplane provider is used. -.. clicmd:: show pbr map [NAME] [detail|json] +.. clicmd:: show pbr map [NAME] [detail] [json] Display pbr maps either all or by ``NAME``. If ``detail`` is set, it will give information about each rule's unique internal ID and some extra