[bgp]: Fix bgp crash after BGP allow list configuration is added ()

The issue was a typo introduced in . In that change, the BGP allow list
configuration manager was updated to use a method of common ConfigMgr
for restarting peer groups. However, the method name 'restart_peers' was
used instead of the correct 'restart_peer_groups'.

This change updated the managers_allow_list.py to use correct method
'restart_peer_groups' for restarting peer groups.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
This commit is contained in:
Xin Wang 2020-12-03 01:15:06 +08:00 committed by Abhishek Dosi
parent 9345fffe8a
commit bf0ce16ebd

View File

@ -149,7 +149,7 @@ class BGPAllowListMgr(Manager):
if cmds:
self.cfg_mgr.push_list(cmds)
peer_groups = self.__find_peer_group_by_deployment_id(deployment_id)
self.cfg_mgr.restart_peers(peer_groups)
self.cfg_mgr.restart_peer_groups(peer_groups)
log_debug("BGPAllowListMgr::__update_policy. The peers configuration scheduled for updates")
else:
log_debug("BGPAllowListMgr::__update_policy. Nothing to update")
@ -179,7 +179,7 @@ class BGPAllowListMgr(Manager):
if cmds:
self.cfg_mgr.push_list(cmds)
peer_groups = self.__find_peer_group_by_deployment_id(deployment_id)
self.cfg_mgr.restart_peers(peer_groups)
self.cfg_mgr.restart_peer_groups(peer_groups)
log_debug("BGPAllowListMgr::__remove_policy. 'Allow list' policy was scheduled for removal")
else:
log_debug("BGPAllowListMgr::__remove_policy. Nothing to remove")