diff options
| author | paulzlabn <paulz@labn.net> | 2018-03-14 13:31:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-14 13:31:58 -0700 |
| commit | 3f1224cd1a9408bdad6aca8c0c205211cb548d5c (patch) | |
| tree | 87e6a52a3e7ad7b09caa3207f081fd92bc8fd018 /tools/frr-reload.py | |
| parent | fd9b55a2b77c187730600d429b3f290ab58fa035 (diff) | |
| parent | 6ca96cc6ada990d052fcfc48cffeef454ae64a10 (diff) | |
Merge branch 'master' into working/master/bgp-vpn-vrf-leaking
Diffstat (limited to 'tools/frr-reload.py')
| -rwxr-xr-x | tools/frr-reload.py | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 0b7e80962c..208fb116e6 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -413,7 +413,7 @@ end ctx_keys = [] current_context_lines = [] - elif line == "exit-address-family" or line == "exit" or line == "exit-vni": + elif line in ["exit-address-family", "exit", "exit-vnc", "exit-vni"]: # if this exit is for address-family ipv4 unicast, ignore the pop if main_ctx_key: self.save_contexts(ctx_keys, current_context_lines) @@ -433,26 +433,14 @@ end current_context_lines = [] new_ctx = False log.debug('LINE %-50s: entering new context, %-50s', line, ctx_keys) - - # The 'vni' keyword under 'router bgp X/address-family l2vpn evpn' creates - # a sub-context but the 'vni' keyword in other places (such as 'vrf BLUE') - # does not. - elif ("vni " in line and - len(ctx_keys) == 2 and - ctx_keys[0].startswith('router bgp') and - ctx_keys[1] == 'address-family l2vpn evpn'): - - main_ctx_key = [] - - # Save old context first - self.save_contexts(ctx_keys, current_context_lines) - current_context_lines = [] - main_ctx_key = copy.deepcopy(ctx_keys) - log.debug('LINE %-50s: entering sub-context, append to ctx_keys', line) - - ctx_keys.append(line) - - elif "address-family " in line: + elif (line.startswith("address-family ") or + line.startswith("vnc defaults") or + line.startswith("vnc l2-group") or + line.startswith("vnc nve-group") or + (line.startswith("vni ") and + len(ctx_keys) == 2 and + ctx_keys[0].startswith('router bgp') and + ctx_keys[1] == 'address-family l2vpn evpn')): main_ctx_key = [] # Save old context first |
