From 9cb85e90574e31d09fc1ed4e1c774221d0f05f5d Mon Sep 17 00:00:00 2001
From: sever-sever <v.gletenko@vyos.io>
Date: Thu, 12 Nov 2020 10:56:02 +0000
Subject: bgp-new: T2174: Fix abbility to del global route-map param

---
 src/conf_mode/protocols_bgp.py | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src')

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)
-- 
cgit v1.2.3