diff options
| author | Farid Mihoub <farid.mihoub@6wind.com> | 2023-10-30 15:11:47 +0100 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-10-31 16:05:31 +0000 |
| commit | e9efe992c9af83c1478fbf083392966522f9cfef (patch) | |
| tree | 568b2bdac65131e380338db59fa09c35c9bb63a8 | |
| parent | d0a8f8074a9d510829f1892daec1efd24278c3e6 (diff) | |
pathd: add no msd command in the pcc context
Add the "no msd" command to deconfigure pcc/msd node.
Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
(cherry picked from commit 444b08d16afa192c4a9d7209f1328ac95f7b289b)
| -rw-r--r-- | pathd/path_pcep_cli.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pathd/path_pcep_cli.c b/pathd/path_pcep_cli.c index 9880081f35..2da321c02c 100644 --- a/pathd/path_pcep_cli.c +++ b/pathd/path_pcep_cli.c @@ -1018,10 +1018,14 @@ static int path_pcep_cli_pcc_delete(struct vty *vty) } static int path_pcep_cli_pcc_pcc_msd(struct vty *vty, const char *msd_str, - long msd) + long msd, bool reset) { - pcc_msd_configured_g = true; - PCEP_VTYSH_INT_ARG_CHECK(msd_str, msd, pcc_msd_g, 0, 33); + if (reset) + pcc_msd_configured_g = false; + else { + pcc_msd_configured_g = true; + PCEP_VTYSH_INT_ARG_CHECK(msd_str, msd, pcc_msd_g, 0, 33); + } return CMD_SUCCESS; } @@ -2007,11 +2011,12 @@ DEFPY(pcep_cli_no_pcc, DEFPY(pcep_cli_pcc_pcc_msd, pcep_cli_pcc_pcc_msd_cmd, - "msd (1-32)", + "[no] msd (1-32)", + NO_STR "PCC maximum SID depth \n" "PCC maximum SID depth value\n") { - return path_pcep_cli_pcc_pcc_msd(vty, msd_str, msd); + return path_pcep_cli_pcc_pcc_msd(vty, msd_str, msd, no); } DEFPY(pcep_cli_pcc_pcc_peer, |
