Fix more issues around config of quota_services

Fix another issues introduced by 'Update the QUOTA_SERVICES
config to be a region mapping' and not properly testing my own
bloody logic.

Correctly process the region as a dict.

Change-Id: I69226879faf992b54727bef476aaaab4d63c737f
This commit is contained in:
Adrian Turjak 2018-02-12 15:35:25 +13:00
parent 31a1d63559
commit 8d72c920dc
1 changed files with 5 additions and 3 deletions

View File

@ -147,10 +147,12 @@ class QuotaManager(object):
self.default_helpers[service] = \
self._quota_updaters[service]
for region in quota_services:
for service in region:
for region, services in quota_services.items():
self.helpers[region] = {}
for service in services:
if service in self._quota_updaters:
self.helpers[service] = self._quota_updaters[service]
self.helpers[region][service] = \
self._quota_updaters[service]
self.project_id = project_id
self.size_diff_threshold = (size_difference_threshold or