From 0a9faeece4060e288045667f24304de9f9658097 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Mon, 1 Feb 2021 11:11:05 -0600 Subject: [PATCH] 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 --- doc/source/conf.py | 5 +++++ .../configuration/sample-configuration.rst | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 06825e9649..7890bbd6fd 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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' diff --git a/doc/source/configuration/sample-configuration.rst b/doc/source/configuration/sample-configuration.rst index 82975cb9f6..823fc46a39 100644 --- a/doc/source/configuration/sample-configuration.rst +++ b/doc/source/configuration/sample-configuration.rst @@ -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