summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinesh G Dutt <ddutt@cumulusnetworks.com>2017-01-06 14:52:25 -0800
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-01-30 13:40:53 -0500
commit768bf950cf94b48576d4ddd974971c126ab68f31 (patch)
tree96ebc559309b888359091fdfb564c416dfb1d223
parent0bf7cc2888a984883522f07ddeb897fb1fdb9621 (diff)
tools: Handle deletes of entire interface context as deleting each line
Ticket: CM-14260 Reviewed By: CCR-14260 Testing Done: quagga reload tests (quagga_service, bgp_enhe etc.) Quagga reload handles deletes of entire context by issuing a "no.." on the entire context itself instead of deleting each individual line of the context. However, this doesn't work when the context is "interface" since its not allowed to do "no interface <ifname>" inside quagga. So special case this by deleting each individual line of the context. Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
-rwxr-xr-xtools/frr-reload.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index e15eab4a8f..57e9f026e3 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -700,6 +700,11 @@ def compare_context_objects(newconf, running):
delete_bgpd = True
lines_to_del.append((running_ctx_keys, None))
+ # We cannot do 'no interface' in quagga, and so deal with it
+ elif running_ctx_keys[0].startswith('interface'):
+ for line in running_ctx.lines:
+ lines_to_del.append((running_ctx_keys, line))
+
# If this is an address-family under 'router bgp' and we are already deleting the
# entire 'router bgp' context then ignore this sub-context
elif "router bgp" in running_ctx_keys[0] and len(running_ctx_keys) > 1 and delete_bgpd: