Merge pull request #16723 from jklaiber/fix-reload-interface-deletion

tools: fix reload interface deletion
This commit is contained in:
Donatas Abraitis 2025-01-21 16:28:28 +02:00 committed by GitHub
commit 5f231287a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1757,12 +1757,13 @@ def compare_context_objects(newconf, running):
delete_bgpd = True
lines_to_del.append((running_ctx_keys, None))
# We cannot do 'no interface' or 'no vrf' in FRR, and so deal with it
elif (
running_ctx_keys[0].startswith("interface")
or running_ctx_keys[0].startswith("vrf")
or running_ctx_keys[0].startswith("router pim")
):
elif running_ctx_keys[0].startswith("interface"):
lines_to_del.append((running_ctx_keys, None))
# We cannot do 'no vrf' in FRR, and so deal with it
elif running_ctx_keys[0].startswith("vrf") or running_ctx_keys[
0
].startswith("router pim"):
for line in running_ctx.lines:
lines_to_del.append((running_ctx_keys, line))