
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
oslo.upgradecheck
Common code for writing OpenStack upgrade checks
This project contains the common code necessary for writing upgrade checks in OpenStack projects. It includes a module (oslo_upgradecheck.upgradecheck) for the common code as well as an example (oslo_upgradecheck.__main__) of integrating that code into a project.
- Free software: Apache license
- Documentation: https://docs.openstack.org/oslo.upgradecheck/latest/
- Source: https://opendev.org/openstack/oslo.upgradecheck
- Bugs: https://bugs.launchpad.net/oslo.upgradecheck
Description
Languages
Python
100%