Merge "Retry creating stack when quota fail to ensure quotas"

This commit is contained in:
Zuul 2022-02-08 09:07:08 +00:00 committed by Gerrit Code Review
commit 84b2561afd
3 changed files with 8 additions and 2 deletions

View File

@ -451,8 +451,12 @@ class HeatStackFixture(tobiko.SharedFixture):
def ensure_quota_limits(self):
"""Ensures quota limits before creating a new stack
"""
self.ensure_neutron_quota_limits()
self.ensure_nova_quota_limits()
try:
self.ensure_neutron_quota_limits()
self.ensure_nova_quota_limits()
except (nova.EnsureNovaQuotaLimitsError,
neutron.EnsureNeutronQuotaLimitsError) as ex:
raise InvalidStackError(name=self.stack_name) from ex
def ensure_neutron_quota_limits(self):
required_quota_set = self.neutron_required_quota_set

View File

@ -92,6 +92,7 @@ list_device_ip_addresses = _port.list_device_ip_addresses
get_neutron_quota_set = _quota_set.get_neutron_quota_set
set_neutron_quota_set = _quota_set.set_neutron_quota_set
ensure_neutron_quota_limits = _quota_set.ensure_neutron_quota_limits
EnsureNeutronQuotaLimitsError = _quota_set.EnsureNeutronQuotaLimitsError
NeutronNetworkFixture = _network.NeutronNetworkFixture
NoSuchNetwork = _network.NoSuchNetwork

View File

@ -73,6 +73,7 @@ list_servers_hypervisors = _hypervisor.list_servers_hypervisors
get_nova_quota_set = _quota_set.get_nova_quota_set
ensure_nova_quota_limits = _quota_set.ensure_nova_quota_limits
set_nova_quota_set = _quota_set.set_nova_quota_set
EnsureNovaQuotaLimitsError = _quota_set.EnsureNovaQuotaLimitsError
find_server_ip_address = _server.find_server_ip_address
HasServerMixin = _server.HasServerMixin