From 58b193887a9e66a1affd4631189c15a32c80a373 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Tue, 14 Sep 2021 11:56:06 -0400 Subject: [PATCH] Remove sample policy config from docs generation Everything is fine for HTML, but something here is causing a problem for the PDF build, which is causing the openstack-tox-docs job to fail, and is blocking the gate. We can revert this patch when we figure out what's going on. Change-Id: Ic752048b3a1f87a95e51df43b6c86b571098ecea --- .../block-storage/policy-config-HOWTO.rst | 7 +-- .../configuration/block-storage/policy.rst | 4 +- .../block-storage/samples/index.rst | 1 - .../block-storage/samples/policy.yaml.rst | 54 ------------------- 4 files changed, 3 insertions(+), 63 deletions(-) delete mode 100644 doc/source/configuration/block-storage/samples/policy.yaml.rst diff --git a/doc/source/configuration/block-storage/policy-config-HOWTO.rst b/doc/source/configuration/block-storage/policy-config-HOWTO.rst index 51285d313c7..bcb02ce9892 100644 --- a/doc/source/configuration/block-storage/policy-config-HOWTO.rst +++ b/doc/source/configuration/block-storage/policy-config-HOWTO.rst @@ -35,9 +35,6 @@ model Cinder employs and how it can be modified by adjusting policies. run Cinder with a custom policy configuration, however, you'll need to write your changes into a policy file. -* Elsewhere in this documentation, you can find a copy of the :doc:`sample - policy file <./samples/policy.yaml>` that contains all the default settings. - * Instructions for generating a sample ``policy.yaml`` file directly from the Cinder source code can be found in the file ``README-policy.generate.md`` in the ``etc/cinder`` directory in the Cinder `source code repository @@ -134,8 +131,8 @@ of policy file configuration. "context_is_admin" This defines the administrative context in Cinder. You'll notice that it's - defined once at the beginning of the :doc:`sample policy file - <./samples/policy.yaml>` and isn't referred to anywhere else in that file. + defined once at the beginning of the sample policy file + and isn't referred to anywhere else in that file. To understand what this does, it's helpful to know something about the API implementation. diff --git a/doc/source/configuration/block-storage/policy.rst b/doc/source/configuration/block-storage/policy.rst index ee8c14e7e95..9e302a28f7e 100644 --- a/doc/source/configuration/block-storage/policy.rst +++ b/doc/source/configuration/block-storage/policy.rst @@ -7,9 +7,7 @@ Policy configuration Configuration ~~~~~~~~~~~~~ -The following is an overview of all available policies in Cinder. For -information on how to write a custom policy file to modify these policies, -see :ref:`policy-file` in the Cinder configuration documentation. +The following is an overview of all available policies in Cinder. .. show-policy:: :config-file: tools/config/cinder-policy-generator.conf diff --git a/doc/source/configuration/block-storage/samples/index.rst b/doc/source/configuration/block-storage/samples/index.rst index 161779c6066..7649c6cc8ce 100644 --- a/doc/source/configuration/block-storage/samples/index.rst +++ b/doc/source/configuration/block-storage/samples/index.rst @@ -11,5 +11,4 @@ All the files in this section can be found in ``/etc/cinder``. cinder.conf.rst api-paste.ini.rst - policy.yaml.rst rootwrap.conf.rst diff --git a/doc/source/configuration/block-storage/samples/policy.yaml.rst b/doc/source/configuration/block-storage/samples/policy.yaml.rst deleted file mode 100644 index 8fa5433e69d..00000000000 --- a/doc/source/configuration/block-storage/samples/policy.yaml.rst +++ /dev/null @@ -1,54 +0,0 @@ -.. _policy-file: - -=========== -policy.yaml -=========== - -The ``policy.yaml`` file defines additional access controls that apply -to the Block Storage service. - -Prior to Cinder 12.0.0 (the Queens release), a JSON policy file was required to -run Cinder. From the Queens release onward, the following hold: - -* It is possible to run Cinder safely without a policy file, as sensible - default values are defined in the code. - -* If you wish to run Cinder with policies different from the default, you may - write a policy file. - - * Given that JSON does not allow comments, we recommend using YAML to write - a custom policy file. (Also, see next item.) - - * OpenStack has deprecated the use of a JSON policy file since the Wallaby - release (Cinder 18.0.0). If you are still using the JSON format, there - is a `oslopolicy-convert-json-to-yaml`__ tool that will migrate your - existing JSON-formatted policy file to YAML in a backward-compatible way. - - .. __: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html - -* If you supply a custom policy file, you only need to supply entries for the - policies you wish to change from their default values. For instance, if you - want to change the default value of "volume:create", you only need to keep - this single rule in your policy config file. - -* The default policy file location is ``/etc/cinder/policy.yaml``. You may - override this by specifying a different file location as the value of the - ``policy_file`` configuration option in the ``[oslo_policy]`` section of the - the Cinder configuration file. - -* Instructions for generating a sample ``policy.yaml`` file directly from the - Cinder source code can be found in the file ``README-policy.generate.md`` - in the ``etc/cinder`` directory in the Cinder `source code repository - `_ (or its `github mirror - `_). - -The following provides a listing of the default policies. It is not recommended -to copy this file into ``/etc/cinder`` unless you are planning on providing a -different policy for an operation that is not the default. - -.. only:: html - - The sample policy file can also be viewed in `file form - <../../../_static/cinder.policy.yaml.sample>`_. - -.. literalinclude:: ../../../_static/cinder.policy.yaml.sample