3d85afb24a
By calling set_default[1] on a conf object it only applies to opts registered to that object. This causes an incorrect value to appear in the generated sample config because it deals with a list of raw opts, not a conf object. To fix this, we can call the global set_defaults[2] on the cfg module which alters the opts directly. This is the method used in the cors middleware[3] and works as expected there. This does complicate the unit tests, however. Because we're altering global state we need to save the original opts and restore them after the test. Furthermore, the conf.reset() call in the config fixture doesn't sufficiently reset the conf object to allow it to recognize the replaced opts. For the purposes of this test we can just create a standalone conf object though, which gets past that problem. It's possible that we should fix reset() so it actually removes opts in groups completely, but I'm unsure what implications that might have for other users of the function. 1: |
||
---|---|---|
doc/source | ||
oslo_policy | ||
releasenotes | ||
sample_data | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.stestr.conf | ||
.zuul.yaml | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
babel.cfg | ||
lower-constraints.txt | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
Team and repository tags
oslo.policy
The Oslo Policy library provides support for RBAC policy enforcement across all OpenStack services.
- Free software: Apache license
- Documentation: https://docs.openstack.org/oslo.policy/latest/
- Source: https://git.openstack.org/cgit/openstack/oslo.policy
- Bugs: https://bugs.launchpad.net/oslo.policy
- Blueprints: https://blueprints.launchpad.net/oslo.policy
- Release Notes: https://docs.openstack.org/releasenotes/oslo.policy