From 864f65e4fdb9b9343dfba299fc8d7bbd1a589454 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 26 Sep 2016 14:53:18 +0100 Subject: [PATCH] doc: Integrate oslo_policy.sphinxpolicygen Change-Id: I80e75b8a592e1125e02ca6177661177a7c17c927 --- .gitignore | 1 + doc/source/conf.py | 6 +++++- doc/source/index.rst | 7 +++++++ doc/source/sample_policy.rst | 12 ++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 doc/source/sample_policy.rst diff --git a/.gitignore b/.gitignore index ca61a4883f1f..1baab3825b6a 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ nova/tests/cover/* nova/vcsversion.py tools/conf/nova.conf* doc/source/_static/nova.conf.sample +doc/source/_static/nova.policy.yaml.sample # Files created by releasenotes build releasenotes/build diff --git a/doc/source/conf.py b/doc/source/conf.py index 7249f97c77f0..e7c1bb52536f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -34,8 +34,9 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.graphviz', 'oslosphinx', - "ext.support_matrix", + 'ext.support_matrix', 'oslo_config.sphinxconfiggen', + 'oslo_policy.sphinxpolicygen', 'ext.versioned_notifications', 'ext.feature_matrix', ] @@ -43,6 +44,9 @@ extensions = ['sphinx.ext.autodoc', config_generator_config_file = '../../etc/nova/nova-config-generator.conf' sample_config_basename = '_static/nova' +policy_generator_config_file = '../../etc/nova/nova-policy-generator.conf' +sample_policy_basename = '_static/nova' + todo_include_todos = True # The suffix of source filenames. diff --git a/doc/source/index.rst b/doc/source/index.rst index d3f93418bce1..4389cac68ae5 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -190,6 +190,13 @@ Sample Configuration File sample_config +Sample Policy file +------------------ + +.. toctree:: + :maxdepth: 1 + + sample_policy Man Pages ---------- diff --git a/doc/source/sample_policy.rst b/doc/source/sample_policy.rst new file mode 100644 index 000000000000..dba4d27abcb1 --- /dev/null +++ b/doc/source/sample_policy.rst @@ -0,0 +1,12 @@ +=========== +Nova Policy +=========== + +The following is a sample nova policy file, autogenerated from nova when this +documentation is built. To prevent conflicts, ensure your version of nova +aligns with the version of this documentation. + +The sample policy can also be viewed in `file form +<_static/nova.policy.yaml.sample>`_. + +.. literalinclude:: _static/nova.policy.yaml.sample