From decdf03c61f303fcfc82fe601beb4096d3305536 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Thu, 16 Apr 2015 11:57:37 -0700 Subject: [PATCH] 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 --- neutron/db/quota_db.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/neutron/db/quota_db.py b/neutron/db/quota_db.py index 262b8f85fca..ad7196675f3 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)