Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
For transit VN, the route target of the primary RI should be added to…
… the first

service RI (for left VN), or last service RI (for right VN). Earlier, we were
always adding it to the first service RI.

Change-Id: I7e086753b4710431b419e19add132ba3ed5f1b45
Closes-Bug: 1505449
  • Loading branch information
Sachin Bansal committed Oct 20, 2015
1 parent 1dd6a54 commit 178eb38
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/config/schema-transformer/to_bgp.py
Expand Up @@ -703,8 +703,15 @@ def set_properties(self, properties):
self.allow_transit = properties.allow_transit
for sc_list in self.service_chains.values():
for service_chain in sc_list:
ri_name = self.get_service_name(service_chain.name,
service_chain.service_list[0])
if not service_chain.created:
continue
if self.name == service_chain.left_vn:
si_name = service_chain.service_list[0]
elif self.name == service_chain.right_vn:
si_name = service_chain.service_list[-1]
else:
continue
ri_name = self.get_service_name(service_chain.name, si_name)
ri = self.rinst.get(ri_name)
if not ri:
continue
Expand All @@ -716,8 +723,7 @@ def set_properties(self, properties):
else:
# if the network is not a transit network any more, then we
# need to delete the route target from service RIs
ri.update_route_target_list([], [self.get_route_target()],
import_export='export')
ri.update_route_target_list([], [self.get_route_target()])
# end set_properties

def set_route_target_list(self, rt_list):
Expand Down

0 comments on commit 178eb38

Please sign in to comment.