summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bgp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-12 17:22:23 +0100
committerGitHub <noreply@github.com>2020-11-12 17:22:23 +0100
commit8909c7933eaefaca56e8d3118602e95a4d613209 (patch)
tree8b4275fd281cb664397a0efb7d173a4f460fa73d /src/conf_mode/protocols_bgp.py
parent0f3da81ac2fc18b4341b1d7fa6a7fa802ecb3c02 (diff)
parent9cb85e90574e31d09fc1ed4e1c774221d0f05f5d (diff)
downloadvyos-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
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)