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
  • Loading branch information
Sachin Bansal committed Mar 3, 2016
1 parent 6b96ff3 commit 6ba2c37
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 @@ -2975,6 +2975,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 6ba2c37

Please sign in to comment.