def _set_region_quota(self, region_name, quota_size): # Set the quota for an individual region quota_settings = settings.PROJECT_QUOTA_SIZES.get(quota_size, {}) if not quota_settings: self.add_note( "Project quota not defined for size '%s' in region %s." % (quota_size, region_name)) return quota_manager = QuotaManager(self.project_id, self.size_difference_threshold) quota_manager.set_region_quota(region_name, quota_settings) self.add_note("Project quota for region %s set to %s" % (region_name, quota_size))
def _set_region_quota(self, region_name, quota_size): # Set the quota for an individual region quota_config = CONF.quota.sizes.get(quota_size, {}) if not quota_config: self.add_note( "Project quota not defined for size '%s' in region %s." % (quota_size, region_name)) return quota_manager = QuotaManager(self.project_id, self.config.size_difference_threshold) quota_manager.set_region_quota(region_name, quota_config) self.add_note("Project quota for region %s set to %s" % (region_name, quota_size))