]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge "Do not query reservations table when counting resources"
authorJenkins <jenkins@review.openstack.org>
Fri, 21 Aug 2015 23:50:33 +0000 (23:50 +0000)
committerGerrit Code Review <review@openstack.org>
Fri, 21 Aug 2015 23:50:33 +0000 (23:50 +0000)
1  2 
neutron/quota/resource.py

index a5f9c039b4de2223cef9bb752d029090819356f3,1b5e73939bf71909ac0c788c9860fbde78664dcc..900013d8090cb16aca4cb440d21cafdb8f2e8f8c
@@@ -233,13 -232,9 +233,10 @@@ class TrackedResource(BaseResource)
                    {'tenant_id': tenant_id, 'resource': self.name})
          in_use = context.session.query(self._model_class).filter_by(
              tenant_id=tenant_id).count()
-         reservations = quota_api.get_reservations_for_resources(
-             context, tenant_id, [self.name])
-         reserved = reservations.get(self.name, 0)
          # Update quota usage
-         return self._resync(context, tenant_id, in_use, reserved)
+         return self._resync(context, tenant_id, in_use, reserved=0)
  
 +    @lockutils.synchronized('dirty_tenants')
      def count(self, context, _plugin, tenant_id, resync_usage=False):
          """Return the current usage count for the resource.