diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2025-03-02 00:02:57 +0100 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2025-03-03 07:14:40 +0000 |
| commit | 4b638cbed81702eedd592bd25d7415a5c90eb05a (patch) | |
| tree | a1cfa259357be5c1431c41ebb6edeef15f1a2410 | |
| parent | a4a3926582860dd684917b065738c512a25eca02 (diff) | |
tools: Fix `frr-reload.py` error related to `static-sids`
```
[...]
segment-routing
srv6
static-sids
sid fcbb:bbbb:1::/48 locator MAIN behavior uN
sid fcbb:bbbb:1:fe10::/64 locator MAIN behavior uDT4 vrf Vrf10
sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20
sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30
sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2
[...]
```
When the user has a configuration like the one above and runs the
command `frr-reload.py --reload`, the following error occurs:
```
[1129654|mgmtd] sending configuration
line 17: % Unknown command[76]: sid fcbb:bbbb:1::/48 locator MAIN behavior uN
line 23: % Unknown command[76]: sid fcbb:bbbb:1:fe10::/64 locator MAIN behavior uDT4 vrf Vrf10
line 29: % Unknown command[76]: sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20
line 35: % Unknown command[76]: sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30
line 41: % Unknown command[76]: sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2
```
The problem is that in `frr-reload-py` all commands that start a new
multi-line context must be included in the `ctx_keyword` dictionary.
However, the `static-sids` command is not part of the `ctx_keyword`
dictionary.
This commit fixes the problem by adding `static-sids` to `ctx_keyword`.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit a515de1c46f617ee3608ab55cdef5f2a262d387a)
| -rwxr-xr-x | tools/frr-reload.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py index f124cae713..9d3a23ae29 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -289,6 +289,7 @@ ctx_keywords = { }, "srv6": { "locators": {"locator ": {}}, + "static-sids": {}, "encapsulation": {}, "formats": {"format": {}}, }, |
