]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Ensures policy file is reloaded only if updated.
authorSalvatore Orlando <salv.orlando@gmail.com>
Thu, 19 Jul 2012 00:59:42 +0000 (17:59 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Thu, 19 Jul 2012 00:59:42 +0000 (17:59 -0700)
commitb7501f2be1f423755b1fef56d9e79561215ff673
treec779a6cb74d07e549c6489f2d10196968968ed66
parent659d0ba03a076bdacc141069ee4837ac5bc1ccc8
Ensures policy file is reloaded only if updated.

Fixes bug 1023649

The fix is 'inspired' (ie: copied) from nova. It is cached in memory unless a
change in policy file is detected. In that case, a reload is triggered.

This patch also adds a set of unit tests for quantum/policy.py, which was
previously not covered.

Change-Id: I337042ae418b518268acd30c26ef02559887a8be
quantum/common/utils.py
quantum/policy.py
quantum/tests/unit/test_policy.py [new file with mode: 0644]