Merge "[Admin Util] Do not write edge mapp file if no mappings found" into stable/train

This commit is contained in:
Zuul 2021-08-20 14:27:22 +00:00 committed by Gerrit Code Review
commit 435294cdae
1 changed files with 4 additions and 0 deletions

View File

@ -683,6 +683,10 @@ def build_edge_mapping_file(resource, event, trigger, **kwargs):
mappings.append(
{'v_edges': [edge_id],
'policy_gateway_name': router['id']})
if not mappings:
LOG.info("No edge mapping available. Not producing output file")
return
data = [{'name': 'dlr_edges_to_migrate',
'v_edges_to_policy_gateways_mappings': mappings}]
LOG.info(formatters.output_formatter(