Skip to content

Commit

Permalink
pathd: fix 'no msd' command not possible under pcc node
Browse files Browse the repository at this point in the history
It should be possible to reset the configured msd value,
and not mentioning the previous msd value.

> ubuntu2204(config-sr-te-pcep-pcc)# no msd
> % Command incomplete: no msd
> ubuntu2204(config-sr-te-pcep-pcc)#

Fix this by defining the msd parameter optional.

Fixe: efba098 ("pathd: Add optional support for PCEP to pathd")

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Nov 9, 2023
1 parent acb17c2 commit 28a6b2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/user/pathd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ Configuration Commands
Disable or start the definition of a PCC.


.. clicmd:: msd (1-32)
.. clicmd:: msd [(1-32)]

Specify the maximum SID depth in a PCC definition.

Expand Down
4 changes: 2 additions & 2 deletions pathd/path_pcep_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ static int path_pcep_cli_pcc_pcc_msd(struct vty *vty, const char *msd_str,
{
if (reset)
pcc_msd_configured_g = false;
else {
else if (msd_str) {
pcc_msd_configured_g = true;
PCEP_VTYSH_INT_ARG_CHECK(msd_str, msd, pcc_msd_g, 0, 33);
}
Expand Down Expand Up @@ -2043,7 +2043,7 @@ DEFPY(pcep_cli_no_pcc,

DEFPY(pcep_cli_pcc_pcc_msd,
pcep_cli_pcc_pcc_msd_cmd,
"[no] msd (1-32)",
"[no] msd [(1-32)]",
NO_STR
"PCC maximum SID depth \n"
"PCC maximum SID depth value\n")
Expand Down

0 comments on commit 28a6b2f

Please sign in to comment.