summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Laski <andrew@lascii.com>2016-09-21 11:06:43 -0400
committerAndrew Laski <andrew@lascii.com>2016-09-28 13:55:35 -0400
commit47d8960af8b32c5696c5848052f94504ed38f077 (patch)
treeb03e006e2a81ac244e222b2a9d815edf44cc24a8
parent6a4e90f46e78f47c5bd90e45e360216786e61dec (diff)
downloadoslo-policy-47d8960af8b32c5696c5848052f94504ed38f077.tar.gz
Update docs on policy sample generator
The docs for the policy sample generator were inconsistent with how it is typically used in practice, with just one namespace. This led to questions about using one namespace when in reality that's what happens. This patch brings the example more in line with reality. Change-Id: Id3c21459eff09aaf6e31c6f3aa4f8d829f87c513
-rw-r--r--doc/source/usage.rst8
1 files changed, 3 insertions, 5 deletions
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
index 3f90ee4..144c0c5 100644
--- a/doc/source/usage.rst
+++ b/doc/source/usage.rst
@@ -90,15 +90,14 @@ In setup.cfg of a project using oslo.policy::
[entry_points]
oslo.policy.policies =
- nova.api = nova.api.opts:list_policies
- nova.compute.api = nova.compute.api.opts:list_policies
+ nova = nova.policy:list_policies
where list_policies is a method that returns a list of policy.RuleDefault
objects.
Run the oslopolicy-sample-generator script with some configuration options::
- oslopolicy-sample-generator --namespace nova.api --namespace nova.compute.api --output-file policy-sample.yaml
+ oslopolicy-sample-generator --namespace nova --output-file policy-sample.yaml
or::
@@ -108,8 +107,7 @@ where policy-generator.conf looks like::
[DEFAULT]
output_file = policy-sample.yaml
- namespace = nova.api
- namespace = nova.compute.api
+ namespace = nova
If output_file is ommitted the sample file will be sent to stdout.