Exemplo n.º 1
0
 def _usage_greater_than_quota(self, regions):
     quota_manager = QuotaManager(
         self.project_id,
         size_difference_threshold=self.size_difference_threshold)
     quota = settings.PROJECT_QUOTA_SIZES.get(self.size, {})
     for region in regions:
         current_usage = quota_manager.get_current_usage(region)
         if self._region_usage_greater_than_quota(current_usage, quota):
             return True
     return False
Exemplo n.º 2
0
 def _usage_greater_than_quota(self, regions):
     quota_manager = QuotaManager(
         self.project_id,
         size_difference_threshold=self.config.size_difference_threshold,
     )
     quota = CONF.quota.sizes.get(self.size, {})
     for region in regions:
         current_usage = quota_manager.get_current_usage(region)
         if self._region_usage_greater_than_quota(current_usage, quota):
             return True
     return False