
As Cyborg is switching to new policy, this is required to avoid breaking the existing deployment using policy file in json format and relying on default value of 'CONF.oslo_policy.policy_file'. Default value of 'CONF.oslo_policy.policy_file' config option has been changed from 'policy.json' to 'policy.yaml'. If new default file 'policy.yaml' does not exist but old default 'policy.json' exist then fallback to use old default file. An upgrade checks is added to check the policy_file format and fail upgrade checks if it is JSON formatted. Added a warning in policy doc about JSON formatted file is deprecated, also removed all the reference to policy.json file in doc as well as in tests. Related Blueprint: https://blueprints.launchpad.net/oslo.policy/+spec/policy-json-to-yaml Change-Id: I865227e516dc7505c463ac279309169d95ea6a22
28 lines
1.2 KiB
ReStructuredText
28 lines
1.2 KiB
ReStructuredText
====================
|
|
Cyborg Sample Policy
|
|
====================
|
|
|
|
.. warning::
|
|
|
|
JSON formatted policy file is deprecated since Cyborg 5.0.0(Victoria).
|
|
Use YAML formatted file. Use `oslopolicy-convert-json-to-yaml`__ tool
|
|
to convert the existing JSON to YAML formatted policy file in backward
|
|
compatible way.
|
|
|
|
.. __: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html
|
|
|
|
The following is a sample cyborg policy file that has been auto-generated
|
|
from default policy values in code. If you're using the default policies, then
|
|
the maintenance of this file is not necessary, and it should not be copied into
|
|
a deployment. Doing so will result in duplicate policy definitions. It is here
|
|
to help explain which policy operations protect specific cyborg APIs, but it
|
|
is not suggested to copy and paste into a deployment unless you're planning on
|
|
providing a different policy for an operation that is not the default.
|
|
|
|
If you wish build a policy file, you can also use ``tox -e genpolicy`` to
|
|
generate it.
|
|
|
|
The sample policy file can also be downloaded in `file form </_static/cyborg.policy.yaml.sample>`_.
|
|
|
|
.. literalinclude:: /_static/cyborg.policy.yaml.sample
|