From ad3dafb3fc618316b27265c031a3763bce61c83e Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Mon, 2 Oct 2017 20:17:16 +0000 Subject: [PATCH] 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 --- doc/source/conf.py | 5 +++++ doc/source/configuration/index.rst | 1 + doc/source/configuration/policy.rst | 12 ++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 doc/source/configuration/policy.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index ecbffa368..37219009d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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' diff --git a/doc/source/configuration/index.rst b/doc/source/configuration/index.rst index c3eddc1c9..f6f549799 100644 --- a/doc/source/configuration/index.rst +++ b/doc/source/configuration/index.rst @@ -5,3 +5,4 @@ Sample Configuration File :maxdepth: 1 sample-config + policy diff --git a/doc/source/configuration/policy.rst b/doc/source/configuration/policy.rst new file mode 100644 index 000000000..a7ad57838 --- /dev/null +++ b/doc/source/configuration/policy.rst @@ -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