From 0a8d633169d039f2be465f6db9f31d2db8fbe4fd Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Wed, 25 Nov 2020 19:24:36 -0600 Subject: [PATCH] Update example and oslo code usage in JSON->YAML goal Change-Id: I962a1a0e610f65a4192d071e744db068885f293a --- ...igrate-policy-format-from-json-to-yaml.rst | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.rst b/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.rst index 8e0c9e449..364103c64 100644 --- a/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.rst +++ b/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.rst @@ -55,10 +55,13 @@ any break when the operator re-generated the policy file in JSON format. What projects need to do: -#. Add upgrade checks to detect the JSON format file and warn about it. - `Example `_ +#. Enable upgrade checks to detect the JSON format file which is defined + in oslo.upgradecheck 1.2.0 and warn about it. + `Example `_ -#. 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. @@ -68,19 +71,25 @@ also which allow policy deprecation without causing pain to OpenStack deployers. 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 + `_ + tool to convert a JSON to YAML formatted policy file in + backward compatible way. deprecations: - | - The default value of the ``[oslo_policy] policy_file`` config option has been - changed from ``policy.json`` - to ``policy.yaml``. The current default value of the ``[oslo_policy] policy_file`` - config option (``policy.json``) does not work for deprecated policy rules - when ``policy.json`` is generated by the - `oslopolicy-sample-generator - `_ - tool. Use the `oslopolicy-convert-json-to-yaml - `_ - tool to convert the existing JSON formatted policy file to YAML in a backward - compatible way. + Use of JSON policy files was deprecated by the ``oslo.policy`` library + during the Victoria development cycle. As a result, this deprecation is + being noted in the Wallaby cycle with an anticipated future removal of support + by ``oslo.policy``. As such operators will need to convert to YAML policy + files. Please see the upgrade notes for details on migration of any + custom policy files. Doc warning sample:: @@ -94,11 +103,14 @@ Doc warning sample:: 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 `_ + Champion ========