diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-11-12 17:22:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 17:22:23 +0100 |
commit | 8909c7933eaefaca56e8d3118602e95a4d613209 (patch) | |
tree | 8b4275fd281cb664397a0efb7d173a4f460fa73d | |
parent | 0f3da81ac2fc18b4341b1d7fa6a7fa802ecb3c02 (diff) | |
parent | 9cb85e90574e31d09fc1ed4e1c774221d0f05f5d (diff) | |
download | vyos-1x-8909c7933eaefaca56e8d3118602e95a4d613209.tar.gz vyos-1x-8909c7933eaefaca56e8d3118602e95a4d613209.zip |
Merge pull request #600 from sever-sever/T2174
bgp-new: T2174: Fix abbility to del global route-map param
-rwxr-xr-x | src/conf_mode/protocols_bgp.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index 957f72ed5..654874232 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -32,8 +32,13 @@ def get_config(): conf = Config() base = ['protocols', 'nbgp'] bgp = conf.get_config_dict(base, key_mangling=('-', '_')) + if not conf.exists(base): bgp = {} + call('vtysh -c \"conf t\" -c \"no ip protocol bgp\" ') + + if not conf.exists(base + ['route-map']): + call('vtysh -c \"conf t\" -c \"no ip protocol bgp\" ') from pprint import pprint pprint(bgp) |