summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bgp.py
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2020-11-12 10:56:02 +0000
committersever-sever <v.gletenko@vyos.io>2020-11-12 10:56:02 +0000
commit9cb85e90574e31d09fc1ed4e1c774221d0f05f5d (patch)
tree7b334a3b78ecb605220beea996bf488378d1f5d8 /src/conf_mode/protocols_bgp.py
parent2e498164218851f1b958c43a7b903849a80b8304 (diff)
downloadvyos-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/protocols_bgp.py')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py5
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)