Update example and oslo code usage in JSON->YAML goal
Change-Id: I962a1a0e610f65a4192d071e744db068885f293a
This commit is contained in:
@@ -55,10 +55,13 @@ any break when the operator re-generated the policy file in JSON format.
|
|||||||
|
|
||||||
What projects need to do:
|
What projects need to do:
|
||||||
|
|
||||||
#. Add upgrade checks to detect the JSON format file and warn about it.
|
#. Enable upgrade checks to detect the JSON format file which is defined
|
||||||
`Example <https://review.opendev.org/#/c/748059/16/nova/cmd/status.py>`_
|
in oslo.upgradecheck 1.2.0 and warn about it.
|
||||||
|
`Example <https://review.opendev.org/c/openstack/keystone/+/764240/2/keystone/cmd/status.py>`_
|
||||||
|
|
||||||
#. Change the default for config ``policy_file`` via ``set_defaults``.
|
#. Change the default for config ``policy_file`` via ``set_defaults``. To avoid
|
||||||
|
breaking the deployment, a fallback logic to use the existing
|
||||||
|
``policy.json`` is added in oslo.policy 3.6.0.
|
||||||
|
|
||||||
#. Deprecate the JSON format support via warnings in doc and release notes.
|
#. Deprecate the JSON format support via warnings in doc and release notes.
|
||||||
|
|
||||||
@@ -68,19 +71,25 @@ also which allow policy deprecation without causing pain to OpenStack deployers.
|
|||||||
Release notes sample::
|
Release notes sample::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The default value of ``[oslo_policy] policy_file`` config option has
|
||||||
|
been changed from ``policy.json`` to ``policy.yaml``.
|
||||||
|
Operators who are utilizing customized or previously generated
|
||||||
|
static policy JSON files (which are not needed by default), should
|
||||||
|
generate new policy files or convert them in YAML format. Use the
|
||||||
|
`oslopolicy-convert-json-to-yaml
|
||||||
|
<https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html>`_
|
||||||
|
tool to convert a JSON to YAML formatted policy file in
|
||||||
|
backward compatible way.
|
||||||
deprecations:
|
deprecations:
|
||||||
- |
|
- |
|
||||||
The default value of the ``[oslo_policy] policy_file`` config option has been
|
Use of JSON policy files was deprecated by the ``oslo.policy`` library
|
||||||
changed from ``policy.json``
|
during the Victoria development cycle. As a result, this deprecation is
|
||||||
to ``policy.yaml``. The current default value of the ``[oslo_policy] policy_file``
|
being noted in the Wallaby cycle with an anticipated future removal of support
|
||||||
config option (``policy.json``) does not work for deprecated policy rules
|
by ``oslo.policy``. As such operators will need to convert to YAML policy
|
||||||
when ``policy.json`` is generated by the
|
files. Please see the upgrade notes for details on migration of any
|
||||||
`oslopolicy-sample-generator
|
custom policy files.
|
||||||
<https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-sample-generator.html>`_
|
|
||||||
tool. Use the `oslopolicy-convert-json-to-yaml
|
|
||||||
<https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html>`_
|
|
||||||
tool to convert the existing JSON formatted policy file to YAML in a backward
|
|
||||||
compatible way.
|
|
||||||
|
|
||||||
Doc warning sample::
|
Doc warning sample::
|
||||||
|
|
||||||
@@ -94,11 +103,14 @@ Doc warning sample::
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
Nova: https://review.opendev.org/#/c/748059/
|
* Keystone: https://review.opendev.org/c/openstack/keystone/+/764240
|
||||||
|
* Nova (common code is moved from nova to oslo side): https://review.opendev.org/#/c/748059/
|
||||||
|
|
||||||
Work done till now: https://review.opendev.org/#/q/topic:bp/policy-json-to-yaml+(status:open+OR+status:merged)
|
* Work done till now: https://review.opendev.org/#/q/topic:bp/policy-json-to-yaml+(status:open+OR+status:merged)
|
||||||
|
|
||||||
|
|
||||||
|
Tracking for this work will be done in `this etherpad <https://etherpad.opendev.org/p/migrate-policy-format-from-json-to-yaml>`_
|
||||||
|
|
||||||
Champion
|
Champion
|
||||||
========
|
========
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user