From: Salvatore Orlando Date: Thu, 16 Apr 2015 18:57:37 +0000 (-0700) Subject: Quota model: use HasTenantId mixin X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=decdf03c61f303fcfc82fe601beb4096d3305536;p=openstack-build%2Fneutron-build.git Quota model: use HasTenantId mixin This change simply changes the Quota model class to obtain the tenant_id from the mixin class. As the attribute in the mixin is identical to that in the model there is no need for a migration. This patch also removes a reference to quota classes in the docstring, as Neutron does not implement those. It is good to be careful when copying and paste code. Change-Id: Idab15d5ef2ddd2b830a7dcde46990506064535f7 Closes-Bug: #1445169 --- diff --git a/neutron/db/quota_db.py b/neutron/db/quota_db.py index 262b8f85f..ad7196675 100644 --- a/neutron/db/quota_db.py +++ b/neutron/db/quota_db.py @@ -20,13 +20,12 @@ from neutron.db import model_base from neutron.db import models_v2 -class Quota(model_base.BASEV2, models_v2.HasId): +class Quota(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant): """Represent a single quota override for a tenant. If there is no row for a given tenant id and resource, then the - default for the quota class is used. + default for the deployment is used. """ - tenant_id = sa.Column(sa.String(255), index=True) resource = sa.Column(sa.String(255)) limit = sa.Column(sa.Integer)