Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staticd: Add no form for static-sids command (backport #18263) #18284

Merged
merged 5 commits into from
Feb 28, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 28, 2025

Currently, when the user tries to delete all static SIDs with the no static-sids command, staticd returns an error.

router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
% Unknown command: no  static-sids

The problem is the static-sids does not support the no form.

This PR enables the no form for the static-sids command.

router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
```<hr>This is an automatic backport of pull request #18263 done by [Mergify](https://mergify.com).

This commit converts the `static-sids` command from `DEFUN` to `DEFPY`
to simplify the parsing of the command string definition.

Signed-off-by: Carmine Scarpitta <[email protected]>
(cherry picked from commit e7640f3)
Currently, when the user tries to delete all static SIDs with the
`no static-sids` command, staticd returns an error.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
% Unknown command: no  static-sids
```

The problem is the `static-sids` command does not support the `no` form.

This PR enables the `no` form for the `static-sids` command.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
```

Signed-off-by: Carmine Scarpitta <[email protected]>
(cherry picked from commit ab7a754)
Previous commits introduced the `no` form for the `static-sids` command.
This change allow users to remove all static SIDs at once.

This commit makes the `no static-sids` command available in vtysh.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
```

Signed-off-by: Carmine Scarpitta <[email protected]>
(cherry picked from commit 96134d1)
Add a test case to verify that staticd removes all SIDs when the
`no static-sids` command is executed.

Signed-off-by: Carmine Scarpitta <[email protected]>
(cherry picked from commit 303be67)
Add a test case to verify that staticd is able to re-install all SIDs
after deleting and re-adding them.

Signed-off-by: Carmine Scarpitta <[email protected]>
(cherry picked from commit 641f0c6)
@frrbot frrbot bot added staticd tests Topotests, make check, etc vtysh labels Feb 28, 2025
@Jafaral Jafaral merged commit 13b386b into dev/10.3 Feb 28, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants