Merge "Use zone.tenant_id as tenant if context.project_id is None"

This commit is contained in:
Zuul 2019-08-06 17:36:19 +00:00 committed by Gerrit Code Review
commit 3ee7362495
1 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,8 @@ class InfobloxBackend(base.Backend):
def create_zone(self, context, zone):
LOG.info('Create Zone %r', zone)
dns_net_view = self.infoblox.get_dns_view(context.project_id)
project_id = context.project_id or zone.tenant_id
dns_net_view = self.infoblox.get_dns_view(project_id)
self.infoblox.create_zone_auth(
fqdn=zone['name'][0:-1],
dns_view=dns_net_view