]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Call policy.init() once per API request
authorSalvatore Orlando <salv.orlando@gmail.com>
Fri, 4 Apr 2014 10:09:57 +0000 (03:09 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Fri, 4 Apr 2014 14:54:23 +0000 (07:54 -0700)
commit1d41ba485f060a4d6dbe0767845391f955247b08
tree59e94817bfcce54e0446e11728ef69b20b03afed
parentf1de09d60b2142f9abd9563f04fe3a0f0089a6be
Call policy.init() once per API request

This patch changes the policy engine behaviour and the API base
controller in order to ensure policy.init is invoked only once
for each API request.
This will avoid issues arising from policy file updates during
API processing and speed up response generation for list operations,
by about 5%.

This patch also removes an obsolete TODO comment.

Change-Id: I108ebd26fccdea19cb00959f70d87c3bc1587df9
Closes-Bug: 1302611
neutron/api/v2/base.py
neutron/policy.py
neutron/tests/unit/test_policy.py