[apic-mapping] single_tenant should not kick in for preexisting obj

Partial-Bug: 1637278

Change-Id: I438837d322acd57d10a909a0323c4dace915dabb
This commit is contained in:
Kent Wu 2016-12-01 18:08:51 -08:00
parent 600e479357
commit f739b5b65d
1 changed files with 2 additions and 1 deletions

View File

@ -2539,7 +2539,8 @@ class ApicMappingDriver(api.ResourceMappingDriver,
raise SharedAttributeUpdateNotSupportedOnApic(type=type)
def _tenant_by_sharing_policy(self, object):
if self.single_tenant_mode:
if self.single_tenant_mode and not self.name_mapper._is_apic_reference(
object):
return self.single_tenant_name
if object.get('reuse_bd'):