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.

The command is also run in the docs tox target since the sample file
can be considered documentation.

Change-Id: I18a1fa567fc04b0e0a37c02f20024b2ce483f060
Partially-Implements: bp policy-in-code
This commit is contained in:
Andrew Laski
2016-06-21 16:53:57 -04:00
parent 41616f9d55
commit 5e38fa3cb5
4 changed files with 15 additions and 0 deletions
+7
View File
@@ -36,6 +36,13 @@ oslo.config.opts =
oslo.config.opts.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 =
virt_driver = nova.compute.monitors.cpu.virt_driver:Monitor
nova.compute.resources =