]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Pecan: fix quota management
authorSalvatore Orlando <salv.orlando@gmail.com>
Fri, 18 Sep 2015 21:10:26 +0000 (14:10 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Wed, 13 Jan 2016 17:10:25 +0000 (09:10 -0800)
commit5fe6f8015ac3e532c4cf95201209f49e6b69955f
treedf5c522a07505f3fe3a12fd6557762ea119375d8
parent293c3e01efce74d110ff34703a9e68ce2cd782e6
Pecan: fix quota management

This patch fixes quota management APIs in the Pecan framework.
To this aim:

1) an ad-hoc pair of collection/item controllers are introduced
   for the quota resource; as the new controllers have been added
   in a separate module, the neutron.pecan_wsgi.controllers.utils
   module has been added as well for helpers, routines and classes
   used by all pecan controllers;
2) the quota API extension is made pecan-aware, meaning that it
   simply returns a Pecan controller instance rather than deferring
   the task to the startup process that builds controllers using the
   home-grown WSGI framework ext manager;
3) the quota resource is now "almost" a standard neutron resource;
   unfortunately since it does not yet have its own service plugin a
   special provision is made in the attribute population hook in
   order to ensure the object is loaded for allowing correct
   policy enforcement.
4) Functional tests for the quota controller have been added.

Closes-Bug: #1505843

Change-Id: I44a1fd73f678e493d5b1163e5f183d9efdc678ac
neutron/extensions/quotasv2.py
neutron/pecan_wsgi/controllers/__init__.py
neutron/pecan_wsgi/controllers/quota.py [new file with mode: 0644]
neutron/pecan_wsgi/controllers/root.py
neutron/pecan_wsgi/controllers/utils.py [new file with mode: 0644]
neutron/pecan_wsgi/hooks/policy_enforcement.py
neutron/pecan_wsgi/startup.py
neutron/tests/functional/pecan_wsgi/test_functional.py