Add policy sample generation
This adds the entry point and config file necessary for using the oslo.policy sample generation script. It also adds a tox target to simplify the usage of it. Change-Id: I7feb522b2ea5f56e48982169c7ebbb2ec2ef2cb3 Partially-Implements: bp policy-in-code
This commit is contained in:
parent
3432685a1e
commit
9bb1556817
3
etc/keystone-policy-generator.conf
Normal file
3
etc/keystone-policy-generator.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
output_file = etc/keystone.policy.yaml.sample
|
||||||
|
namespace = keystone
|
@ -184,6 +184,11 @@ oslo.config.opts =
|
|||||||
oslo.config.opts.defaults =
|
oslo.config.opts.defaults =
|
||||||
keystone = keystone.conf:set_external_opts_defaults
|
keystone = keystone.conf:set_external_opts_defaults
|
||||||
|
|
||||||
|
oslo.policy.policies =
|
||||||
|
# With the move of default policy in code list_rules returns a list of
|
||||||
|
# the default defined polices.
|
||||||
|
keystone = keystone.common.policies:list_rules
|
||||||
|
|
||||||
paste.filter_factory =
|
paste.filter_factory =
|
||||||
healthcheck = oslo_middleware:Healthcheck.factory
|
healthcheck = oslo_middleware:Healthcheck.factory
|
||||||
cors = oslo_middleware:CORS.factory
|
cors = oslo_middleware:CORS.factory
|
||||||
|
3
tox.ini
3
tox.ini
@ -123,6 +123,9 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
|||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
commands = oslo-config-generator --config-file=config-generator/keystone.conf
|
commands = oslo-config-generator --config-file=config-generator/keystone.conf
|
||||||
|
|
||||||
|
[testenv:genpolicy]
|
||||||
|
commands = oslopolicy-sample-generator --config-file etc/keystone-policy-generator.conf
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
import_exceptions =
|
import_exceptions =
|
||||||
keystone.i18n
|
keystone.i18n
|
||||||
|
Loading…
Reference in New Issue
Block a user