diff options
author | sever-sever <v.gletenko@vyos.io> | 2020-11-12 10:56:02 +0000 |
---|---|---|
committer | sever-sever <v.gletenko@vyos.io> | 2020-11-12 10:56:02 +0000 |
commit | 9cb85e90574e31d09fc1ed4e1c774221d0f05f5d (patch) | |
tree | 7b334a3b78ecb605220beea996bf488378d1f5d8 /src/conf_mode | |
parent | 2e498164218851f1b958c43a7b903849a80b8304 (diff) | |
download | vyos-1x-9cb85e90574e31d09fc1ed4e1c774221d0f05f5d.tar.gz vyos-1x-9cb85e90574e31d09fc1ed4e1c774221d0f05f5d.zip |
bgp-new: T2174: Fix abbility to del global route-map param
Diffstat (limited to 'src/conf_mode')
-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) |