Add policy sample file in doc

policy sample file with all the default rules
commented out is missing in glance doc which can be
used for reference or when few rules needs to
be overriden (and keep all other default rule commented
out).

Change-Id: I0cc461f7061358389186ac4751f6e037e1bf6dc7
This commit is contained in:
Ghanshyam Mann 2021-02-01 11:11:05 -06:00
parent 0c45de3ed8
commit 0a9faeece4
2 changed files with 22 additions and 0 deletions

View File

@ -33,6 +33,7 @@ extensions = [
'sphinx.ext.viewcode',
'oslo_config.sphinxext',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxpolicygen',
'openstackdocstheme',
'sphinxcontrib.apidoc',
]
@ -65,6 +66,10 @@ config_generator_config_file = [
'_static/glance-scrubber'),
]
policy_generator_config_file = [
('../../etc/glance-policy-generator.conf', '_static/glance'),
]
# The master toctree document.
master_doc = 'index'

View File

@ -43,3 +43,20 @@ This sample configuration can also be viewed in `glance-cache.conf.sample
<../_static/glance-cache.conf.sample>`_.
.. literalinclude:: ../_static/glance-cache.conf.sample
Sample Policy File for Glance
-----------------------------
The following is a Glance sample policy file for adaptation and use.
The sample policy can also be viewed in :download:`file form
<../_static/glance.policy.yaml.sample>`.
.. important::
The sample policy file is auto-generated from glance when this documentation
is built. You must ensure your version of glance matches the version of this
documentation.
.. literalinclude:: ../_static/glance.policy.yaml.sample