Skip to content

Commit

Permalink
Merge "Avoid destroying servicechains on schema init" into R2.22.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 22, 2016
2 parents 6fc2404 + 8d3669f commit d27aeb0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/config/schema-transformer/to_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def get_si_vns(si_obj, si_props):
si_if_list = si_props.get_interface_list()
for idx in range(0, len(st_if_list)):
st_if = st_if_list[idx]
if not si_if_list or len(si_if_list) <= idx:
break
si_if = si_if_list[idx]
if st_if.get_service_interface_type() == 'left':
left_vn = si_if.get_virtual_network()
Expand Down Expand Up @@ -3225,16 +3227,17 @@ def process_stale_objects(self):

def process_poll_result(self, poll_result_str):
something_done = False
initial_search = False
result_list = parse_poll_result(poll_result_str)
self.current_network_set = set()

# first pass thru the ifmap message and build data model
for (result_type, idents, metas) in result_list:
if result_type != 'searchResult' and not self.ifmap_search_done:
self.ifmap_search_done = True
self.process_stale_objects()
self.current_network_set = set(VirtualNetworkST.keys())
something_done = True
initial_search = True
for meta in metas:
meta_name = re.sub('{.*}', '', meta.tag)
if result_type == 'deleteResult':
Expand All @@ -3260,6 +3263,8 @@ def process_poll_result(self, poll_result_str):
return
if self.ifmap_search_done:
self.process_networks()
if initial_search:
self.process_stale_objects()
# end process_poll_results

def process_networks(self):
Expand Down Expand Up @@ -3548,9 +3553,9 @@ def reset():
def set_ifmap_search_done(transformer):
gevent.sleep(60)
transformer.ifmap_search_done = True
transformer.process_stale_objects()
transformer.current_network_set = set(VirtualNetworkST.keys())
transformer.process_networks()
transformer.process_stale_objects()
# end set_ifmap_search_done

def launch_arc(transformer, ssrc_mapc):
Expand Down

0 comments on commit d27aeb0

Please sign in to comment.