oslo.policy/doc/source/cli/oslopolicy-sample-generator.rst
Stephen Finucane 597fd0440b docs: Add separate man page for each CLI tool
Change-Id: Ifcfc88a67b038528f03756d550e1ddf8726cb37a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-06-30 14:17:56 +01:00

1.5 KiB

oslopolicy-sample-generator

oslopolicy-sample-generator

Synopsis

oslopolicy-sample-generator [-h] [--config-dir DIR]
                            [--config-file PATH] [--format FORMAT]
                            [--namespace NAMESPACE]
                            [--output-file OUTPUT_FILE]

Description

The oslopolicy-sample-generator command can be used to generate a sample policy file based on the default policies in a given namespace. This tool requires a namespace to query for policies and supports output in JSON or YAML.

Options

Examples

To generate sample policies for a namespace called keystone:

oslopolicy-sample-generator --namespace keystone

To generate sample policies in JSON use:

oslopolicy-sample-generator --namespace keystone --format json

To generate a sample policy file and output directly to a file:

oslopolicy-sample-generator --namespace keystone \
  --format yaml \
  --output-file keystone-policy.yaml

Use the following to generate help text for additional options and arguments supported by oslopolicy-sample-generator:

oslopolicy-sample-generator --help

See Also

oslopolicy-policy-generator, oslopolicy-list-redundant, oslopolicy-checker