Merge "Check the project zone quota when accepting zone transfer."

This commit is contained in:
Zuul 2018-09-05 17:00:07 +00:00 committed by Gerrit Code Review
commit 839d1b4d61
1 changed files with 4 additions and 0 deletions

View File

@ -2564,6 +2564,10 @@ class Service(service.RPCService, service.Service):
if zone.action == 'DELETE':
raise exceptions.BadRequest('Can not transfer a deleting zone')
# Ensure the accepting tenant has enough quota to continue
self._enforce_zone_quota(context,
zone_transfer_accept.tenant_id)
zone.tenant_id = zone_transfer_accept.tenant_id
self.storage.update_zone(elevated_context, zone)