Skip to content

Commit

Permalink
Add a none check for vn
Browse files Browse the repository at this point in the history
Add a none check for vn when add_route_target_list message is received because
the network could have been deleted by then.

Change-Id: I834a44d53c36b461f2d5e3d8f9ca07101205b06e
Closes-Bug: 1552899
(cherry picked from commit 6ba2c37)
  • Loading branch information
Sachin Bansal committed Mar 4, 2016
1 parent 91cde0f commit 091fd38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/schema-transformer/to_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2988,6 +2988,8 @@ def add_route_target_list(self, idents, meta):
rt_list = RouteTargetList()
rt_list.build(meta)
vn = VirtualNetworkST.locate(vn_name)
if vn is None:
return
vn.set_route_target_list(rt_list)
self.current_network_set.add(vn_name)
# end add_route_target_list
Expand Down

0 comments on commit 091fd38

Please sign in to comment.