mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-27 20:33:20 +00:00
Merge pull request #14103 from opensourcerouting/reload-keychain
tools: fix key chain reload removal
This commit is contained in:
commit
f3a4a85da7
@ -1567,6 +1567,7 @@ def compare_context_objects(newconf, running):
|
||||
candidates_to_add = []
|
||||
delete_bgpd = False
|
||||
area_stub_no_sum = "area (\S+) stub no-summary"
|
||||
deleted_keychains = []
|
||||
|
||||
# Find contexts that are in newconf but not in running
|
||||
# Find contexts that are in running but not in newconf
|
||||
@ -1617,6 +1618,22 @@ def compare_context_objects(newconf, running):
|
||||
):
|
||||
continue
|
||||
|
||||
# Check if key chain is being deleted:
|
||||
# - If it is being deleted then avoid deleting its contexts
|
||||
# - Else delete its configuration without removing the root node
|
||||
elif (
|
||||
running_ctx_keys[0].startswith("key chain ")
|
||||
and len(running_ctx_keys) == 1
|
||||
):
|
||||
deleted_keychains.append(running_ctx_keys[0])
|
||||
lines_to_del.append((running_ctx_keys, None))
|
||||
elif (
|
||||
running_ctx_keys[0].startswith("key chain ")
|
||||
and len(running_ctx_keys) > 1
|
||||
and running_ctx_keys[0] in deleted_keychains
|
||||
):
|
||||
continue
|
||||
|
||||
# Delete an entire vni sub-context under "address-family l2vpn evpn"
|
||||
elif (
|
||||
"router bgp" in running_ctx_keys[0]
|
||||
|
Loading…
Reference in New Issue
Block a user