From 0625035e9fb2e2844e33ce6e3dc8c097f3e3d667 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 28 Apr 2020 10:47:18 +0100 Subject: [PATCH] docs: Add description of 'oslopolicy-policy-generator' Change-Id: I6c98efa7463fc71176f9635f6ffebb5c7050bd49 Signed-off-by: Stephen Finucane --- doc/source/cli/index.rst | 41 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst index 87f9fcfc..c7023dea 100644 --- a/doc/source/cli/index.rst +++ b/doc/source/cli/index.rst @@ -51,6 +51,44 @@ with the plain member token --access sample_data/auth_v3_token_member.json \ --rule compute_extension:flavorextraspecs:index +oslopolicy-policy-generator +=========================== + +The ``oslopolicy-policy-generator`` command can be used to generate a policy +file that shows the effective policy in use. This is generated by merging the +registered defaults and policies loaded from a configuration file. + +Examples +-------- + +The generate the effective policy file for a namespace called ``keystone``: + +.. code-block:: bash + + oslopolicy-policy-generator --namespace keystone + +To generate the effective policy file in JSON: + +.. code-block:: bash + + oslopolicy-policy-generator --namespace keystone --format json + +To generate the effective policy file and output directly to a file: + +.. code-block:: bash + + oslopolicy-policy-generator \ + --namespace keystone \ + --format yaml \ + --output-file keystone-policy.yaml + +To show the additional options and arguments supported by +``oslopolicy-policy-generator``: + +.. code-block:: bash + + oslopolicy-policy-generator --help + oslopolicy-sample-generator =========================== @@ -67,12 +105,11 @@ To generate sample policies for a namespace called ``keystone``: oslopolicy-sample-generator --namespace keystone - To generate sample policies in JSON use: .. code-block:: bash - oslopolicy-sample-generator --namespace nova --format json + oslopolicy-sample-generator --namespace keystone --format json To generate a sample policy file and output directly to a file: