From: Emanuele Di Pascale Date: Wed, 11 Nov 2020 16:29:15 +0000 (+0100) Subject: tools: fix frr-reload l2vpn delete X-Git-Tag: base_7.6~255^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F7552%2Fhead;p=mirror%2Ffrr.git tools: fix frr-reload l2vpn delete when deleting a whole l2vpn context in ldpd which also had pseudowires in it, we were first deleting the l2vpn with a 'no l2vpn XXX' command, and then adding it again by running 'l2vpn XXX\n no member pseudowire YYY' which obviously was not needed. As a result the l2vpn would be reinstated. Signed-off-by: Emanuele Di Pascale --- diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 951383beb2..0de6c1c2e3 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -1301,6 +1301,12 @@ def compare_context_objects(newconf, running): ): continue + # same thing for a pseudowire sub-context inside an l2vpn context + elif (len(running_ctx_keys) > 1 and running_ctx_keys[0].startswith('l2vpn') and + running_ctx_keys[1].startswith('member pseudowire') and + (running_ctx_keys[:1], None) in lines_to_del): + continue + # Non-global context elif running_ctx_keys and not any( "address-family" in key for key in running_ctx_keys