Skip to content

Commit

Permalink
bgpaas_clients dict is indexed by vmi fq_name
Browse files Browse the repository at this point in the history
bgpaas_clients dict is indexed by vmi fq name, but during reinit,
we were indexing it incorrectly by vmi/router name. This causes
the bgp router to get deleted during re-evaluation.

Change-Id: I574780b6830f689937114b62dc0ca9357930f8bb
Closes-Bug: 1565153
(cherry picked from commit 43f3f10)
  • Loading branch information
Sachin Bansal committed Apr 2, 2016
1 parent 50927d3 commit 8010845
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config/schema-transformer/config_db.py
Expand Up @@ -3025,7 +3025,10 @@ def __init__(self, name, obj=None):
def set_bgpaas_clients(self):
for bgp_router in self.bgp_routers:
bgpr = BgpRouterST.get(bgp_router)
self.bgpaas_clients[bgpr.obj.name] = bgpr.obj.get_fq_name_str()
for vmi in self.virtual_machine_interfaces():
if vmi.split(':')[-1] == bgpr.obj.name:
self.bgpaas_clients[vmi] = bgpr.obj.get_fq_name_str()
break
# end set_bgp_clients

def update(self, obj=None):
Expand Down

0 comments on commit 8010845

Please sign in to comment.