Add sample policy file to documentation

Now that Zun has all of its policies registered in code, we can
generate samples to publish in documentation.

bp policy-and-docs-in-code

Change-Id: I8b8efe9bf0af5aef39e293a9ddf9a79da35e5f8f
This commit is contained in:
Lance Bragstad 2017-10-02 20:17:16 +00:00 committed by Hieu LE
parent 8e0e94ba9b
commit ad3dafb3fc
3 changed files with 18 additions and 0 deletions

View File

@ -25,6 +25,8 @@ extensions = [
'sphinx.ext.graphviz',
'openstackdocstheme',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxext',
'oslo_policy.sphinxpolicygen',
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@ -45,6 +47,9 @@ bug_tag = ''
config_generator_config_file = '../../etc/zun/zun-config-generator.conf'
sample_config_basename = '_static/zun'
policy_generator_config_file = '../../etc/zun/zun-policy-generator.conf'
sample_policy_basename = '_static/zun'
# General information about the project.
project = u'zun'
copyright = u'2013, OpenStack Foundation'

View File

@ -5,3 +5,4 @@ Sample Configuration File
:maxdepth: 1
sample-config
policy

View File

@ -0,0 +1,12 @@
====================
Policy configuration
====================
Configuration
~~~~~~~~~~~~~
The following is an overview of all available policies in Zun. For a sample
configuration file.
.. show-policy::
:config-file: ../../etc/zun/zun-policy-generator.conf