Add common checks for json to yaml policy file migration
As part of community goal[1] for migrating the policy file
from JSON format to YAML we need to add upgrade check to
detect any JSON formatted file. That check needs to be
done in each service side which are deprecating the JSON
format. So to avoid duplicate code, this commit add that
check in oslo_upgradechecks and that can be enabled from
service side during they migrate to YAML format.
Service will enable it like below:
_upgrade_checks = (
(_('Policy File JSON to YAML Migration'),
(common_checks.check_policy_json, {'conf': CONF})),
)
Also modify the check() method to accept the **kwargs for checks.
[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
Change-Id: Ifa71c20879c964f794a40b981744d95db4ab1602
| ... | ... | @@ -5,3 +5,4 @@ |
| oslo.config>=5.2.0 # Apache-2.0 | ||
| oslo.i18n>=3.15.3 # Apache-2.0 | ||
| PrettyTable<0.8,>=0.7.1 # BSD | ||
| oslo.utils>=4.5.0 # Apache-2.0 |
| ... | ... | @@ -6,3 +6,4 @@ hacking>=3.0,<3.1.0 # Apache-2.0 |
| oslotest>=1.5.1 | ||
| stestr>=2.0.0 | ||
| pre-commit>=2.6.0 # MIT | ||
| oslo.serialization>=2.21.1 # Apache-2.0 |
Please register or sign in to comment