Skip to content

Commit

Permalink
Tools: Fixed unknown password related isis commands
Browse files Browse the repository at this point in the history
When removing router isis area-password and domain-password using
frr-reload.py system drops errors.
This is a fix for the issue FRRouting#17722:
FRRouting#17722

Signed-off-by: Yaroslav Kholod <y.kholod@vyos.io>
  • Loading branch information
Yaroslav Kholod committed Dec 26, 2024
1 parent 3f6c106 commit a500aa7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tools/frr-reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,9 +1182,26 @@ def pim_delete_move_lines(lines_to_add, lines_to_del):
return (lines_to_add, lines_to_del)


def isis_delete_password_lines(lines_to_add, lines_to_del):
index = -1
for ctx_keys, line in lines_to_del:
index = index + 1
if ctx_keys[0].startswith("router isis") and line and line.startswith("area-password"):
new_line = "area-password"
lines_to_del.remove((ctx_keys, line))
lines_to_del.insert(index, (ctx_keys, new_line))
if ctx_keys[0].startswith("router isis") and line and line.startswith("domain-password"):
new_line = "domain-password"
lines_to_del.remove((ctx_keys, line))
lines_to_del.insert(index, (ctx_keys, new_line))

return (lines_to_add, lines_to_del)


def delete_move_lines(lines_to_add, lines_to_del):
lines_to_add, lines_to_del = bgp_delete_move_lines(lines_to_add, lines_to_del)
lines_to_add, lines_to_del = pim_delete_move_lines(lines_to_add, lines_to_del)
lines_to_add, lines_to_del = isis_delete_password_lines(lines_to_add, lines_to_del)

return (lines_to_add, lines_to_del)

Expand Down

0 comments on commit a500aa7

Please sign in to comment.