Merge "Verify aim_epg exists before proceeding" into stable/newton

This commit is contained in:
Zuul 2019-09-12 23:21:55 +00:00 committed by Gerrit Code Review
commit afaa7ebdfc
1 changed files with 3 additions and 0 deletions

View File

@ -4171,6 +4171,9 @@ class ApicMechanismDriver(api_plus.MechanismDriver,
mapping = self._get_network_mapping(session, port['network_id'])
epg = self._get_network_epg(mapping)
aim_epg = self.aim.get(aim_ctx, epg)
# Verify that the aim_epg is present before proceeding further.
if not aim_epg:
return
host_id = port[portbindings.HOST_ID]
aim_hd_mappings = (self.aim.find(aim_ctx,
aim_infra.HostDomainMappingV2,