diff options
| author | Russ White <russ@riw.us> | 2019-02-27 11:16:38 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-27 11:16:38 -0500 |
| commit | 3f77bcdbe0ebe85ed3937d1ce2047cf19506304f (patch) | |
| tree | 651d12e422401e91a68dc9bd8535133b9e46e187 /tools/frr-reload.py | |
| parent | cacbdfb14ded71e6c36c97a570d30b89c851b2fe (diff) | |
| parent | 06ad470d7cdc2b6c3cf9a8a2f150a72969d744ce (diff) | |
Merge pull request #3872 from dslicenc/frr-reload-vrf-context
tools: keep exit-vrf to change context correctly between vrfs
Diffstat (limited to 'tools/frr-reload.py')
| -rwxr-xr-x | tools/frr-reload.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 298cae7a32..59f1bcf52b 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -433,7 +433,7 @@ end self.save_contexts(ctx_keys, current_context_lines) new_ctx = True - elif line in ["end", "exit-vrf"]: + elif line == "end": self.save_contexts(ctx_keys, current_context_lines) log.debug('LINE %-50s: exiting old context, %-50s', line, ctx_keys) @@ -443,6 +443,17 @@ end ctx_keys = [] current_context_lines = [] + elif line == "exit-vrf": + self.save_contexts(ctx_keys, current_context_lines) + current_context_lines.append(line) + log.debug('LINE %-50s: append to current_context_lines, %-50s', line, ctx_keys) + + #Start a new context + new_ctx = True + main_ctx_key = [] + ctx_keys = [] + current_context_lines = [] + elif line in ["exit-address-family", "exit", "exit-vnc"]: # if this exit is for address-family ipv4 unicast, ignore the pop if main_ctx_key: |
