Merge "Add policy sample generation"

This commit is contained in:
Jenkins 2016-06-29 14:32:03 +00:00 committed by Gerrit Code Review
commit 176041b655
3 changed files with 12 additions and 0 deletions

1
.gitignore vendored
View File

@ -33,6 +33,7 @@ doc/build/*
api-guide/build/* api-guide/build/*
api-ref/build/* api-ref/build/*
etc/nova/nova.conf.sample etc/nova/nova.conf.sample
etc/nova/policy.yaml.sample
instances instances
keeper keeper
keys keys

View File

@ -36,6 +36,13 @@ oslo.config.opts =
oslo.config.opts.defaults = oslo.config.opts.defaults =
nova.api = nova.common.config:set_middleware_defaults nova.api = nova.common.config:set_middleware_defaults
oslo.policy.policies =
# The sample policies will be ordered by entry point and then by list
# returned from that entry point. If more control is desired split out each
# list_rules method into a separate entry point rather than using the
# aggregate method.
nova = nova.policies:list_rules
nova.compute.monitors.cpu = nova.compute.monitors.cpu =
virt_driver = nova.compute.monitors.cpu.virt_driver:Monitor virt_driver = nova.compute.monitors.cpu.virt_driver:Monitor

View File

@ -60,6 +60,9 @@ commands =
[testenv:genconfig] [testenv:genconfig]
commands = oslo-config-generator --config-file=etc/nova/nova-config-generator.conf commands = oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
[testenv:cover] [testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those # Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage. # tests conflict with coverage.
@ -87,6 +90,7 @@ commands =
python setup.py build_sphinx python setup.py build_sphinx
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python' bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
oslo-config-generator --config-file=etc/nova/nova-config-generator.conf oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
sphinx-build -W -b html api-guide/source api-guide/build/html sphinx-build -W -b html api-guide/source api-guide/build/html
sphinx-build -W -b html api-ref/source api-ref/build/html sphinx-build -W -b html api-ref/source api-ref/build/html