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 #18263

Merged

Conversation

cscarpitta
Copy link
Contributor

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

@frrbot frrbot bot added staticd tests Topotests, make check, etc labels Feb 26, 2025
@cscarpitta cscarpitta force-pushed the fix/add_no_form_for_static_sids_cli branch from 5e2eb78 to 583c140 Compare February 26, 2025 15:15
@donaldsharp
Copy link
Member

looks like a srv6 test failure. Assuming it is something that needs to be addressed

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 <cscarpit@cisco.com>
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 <cscarpit@cisco.com>
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 <cscarpit@cisco.com>
Add a test case to verify that staticd removes all SIDs when the
`no static-sids` command is executed.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
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 <cscarpit@cisco.com>
@cscarpitta cscarpitta force-pushed the fix/add_no_form_for_static_sids_cli branch from 583c140 to 641f0c6 Compare February 27, 2025 11:20
@frrbot frrbot bot added the vtysh label Feb 27, 2025
@github-actions github-actions bot added size/L and removed size/M labels Feb 27, 2025
@cscarpitta
Copy link
Contributor Author

looks like a srv6 test failure. Assuming it is something that needs to be addressed

@donaldsharp Many thanks for the review.

When I committed the changes, I missed the changes in vtysh.c

Now the PR passes all CI checks.

@pguibert6WIND
Copy link
Member

https://github.com/Mergifyio backport dev/10.3

Copy link

mergify bot commented Feb 28, 2025

backport dev/10.3

✅ Backports have been created

@donaldsharp donaldsharp merged commit 08af876 into FRRouting:master Feb 28, 2025
15 checks passed
Jafaral added a commit that referenced this pull request Feb 28, 2025
staticd: Add `no` form for `static-sids` command (backport #18263)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants