]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add DB support for resource usage tracking
authorSalvatore Orlando <salv.orlando@gmail.com>
Tue, 19 May 2015 16:49:26 +0000 (09:49 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Sun, 26 Jul 2015 22:26:10 +0000 (15:26 -0700)
commitb3d4851f6370d9892a189c35d14b22dcbeb58200
treec5ca0605d5cecf08feb16058dee005074229ec7e
parente95bc6f5be6b0d3bcf0677e515660f6b972163fe
Add DB support for resource usage tracking

This patch introduces database support for tracking Neutron
resource usage data. A single DB model class tracks usage
info for all neutron resources.

The patch also provides a simple API for managing resource
usage info, as well as unit tests providing coverage for
this API.

This patch also makes a slight change to the ContextBase
class, adding the ability to explicitly set is_advsvc at
initialization time. While this probably makes no difference
for practical use of the context class, it simplifies
development of DB-only unit tests.

Related-Blueprint: better-quotas

Change-Id: I62100551b89103a21555dcc45e84195c05e89800
neutron/context.py
neutron/db/migration/alembic_migrations/versions/HEADS
neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py [new file with mode: 0644]
neutron/db/migration/models/head.py
neutron/db/quota/__init__.py [new file with mode: 0644]
neutron/db/quota/api.py [new file with mode: 0644]
neutron/db/quota/models.py [new file with mode: 0644]
neutron/db/quota_db.py
neutron/tests/unit/db/quota/__init__.py [new file with mode: 0644]
neutron/tests/unit/db/quota/test_api.py [new file with mode: 0644]