Merge "Retry creating stack when quota fail to ensure quotas"
This commit is contained in:
commit
84b2561afd
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user