diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2018-01-18 09:32:41 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-18 09:32:41 -0600 |
| commit | 81dadaca1a07ce26b41576093c9ac3dd33ffab66 (patch) | |
| tree | c15e5f2c9bfd4e96381a0837627bcdb02ae905ea | |
| parent | f5b366fcef607d581316d6836dfcf6283b4a267a (diff) | |
| parent | 9d877afc13d71bbf1b6fa4ec83f2b1e0d6896fd9 (diff) | |
Merge pull request #1648 from dwalton76/frr-reload
tools: frr-reload 'vni' keyword does not always create a sub-context
| -rwxr-xr-x | tools/frr-reload.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 2c651ffbd5..0b7e80962c 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -434,7 +434,14 @@ end new_ctx = False log.debug('LINE %-50s: entering new context, %-50s', line, ctx_keys) - elif "vni " in line: + # 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 |
