Skip to content

Commit 55b612d

Browse files
vganesan-nokiaFengPan-Frank
authored andcommitted
Revert "[bgpcfgd]BGP suppress fib pending support for multi-asic (#23187)" (#24883)
This reverts commit 1b2cead. - Not sending suppress-fib-pending configuration to FRR is intentional to avoid traffic distruption. As per design, the suppress-fib-pending is non-distruptively handled by avoiding sending the suppress-fib-pending command to FRR. Therefore reverting to address issue: #24679 Signed-off-by: vedganes <veda.ganesan@nokia.com> Signed-off-by: Feng Pan <fenpan@microsoft.com>
1 parent f874941 commit 55b612d

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

src/sonic-bgpcfgd/bgpcfgd/managers_db.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,10 @@ def __init__(self, common_objs, db, table):
1919

2020
def set_handler(self, key, data):
2121
""" Implementation of 'SET' command for this class """
22-
23-
if self.__set_handler_validate(key, data) == True:
24-
cmd_list = []
25-
bgp_asn = data["bgp_asn"]
26-
state = data["suppress-fib-pending"]
27-
cmd_list.append("router bgp %s" % bgp_asn)
28-
if state == "disabled":
29-
cmd_list.append("no bgp suppress-fib-pending")
30-
else:
31-
cmd_list.append("bgp suppress-fib-pending")
32-
cmd_list.append("exit")
33-
34-
self.cfg_mgr.push_list(cmd_list)
35-
3622
self.directory.put(self.db_name, self.table_name, key, data)
3723

3824
return True
3925

4026
def del_handler(self, key):
4127
""" Implementation of 'DEL' command for this class """
42-
self.directory.remove(self.db_name, self.table_name, key)
43-
44-
def __set_handler_validate(self, key, data):
45-
if data:
46-
if ((key == "localhost") and ("bgp_asn" in data) and ("suppress-fib-pending" in data and data["suppress-fib-pending"] in ["enabled","disabled"])):
47-
return True
48-
return False
28+
self.directory.remove(self.db_name, self.table_name, key)

src/sonic-bgpcfgd/tests/test_db.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ def test_set_del_handler():
3030
assert "test_key2" in m.directory.get_slot(m.db_name, m.table_name)
3131
assert m.directory.get(m.db_name, m.table_name, "test_key2") == {}
3232

33-
res = m.set_handler("localhost", {'bgp_asn':'65100','suppress-fib-pending':'enabled'})
34-
assert res, "Returns always True"
35-
assert m.directory.get(m.db_name, m.table_name, "localhost") == {'bgp_asn':'65100','suppress-fib-pending':'enabled'}
36-
37-
res = m.set_handler("localhost", {'bgp_asn':'65100','suppress-fib-pending':'disabled'})
38-
assert res, "Returns always True"
39-
assert m.directory.get(m.db_name, m.table_name, "localhost") == {'bgp_asn':'65100','suppress-fib-pending':'disabled'}
40-
4133
# test del_handler
4234
m.del_handler("test_key")
4335
assert "test_key" not in m.directory.get_slot(m.db_name, m.table_name)

0 commit comments

Comments
 (0)