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
This commit is contained in:
parent
8ca67832ea
commit
decdf03c61
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue