From e40632bb4b1783599aecc01ddcba363930811790 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Tue, 25 Aug 2020 19:37:09 -0500 Subject: Add oslopolicy-convert-json-to-yaml tool Add ``oslopolicy-convert-json-to-yaml`` tool which can be used to convert the json formatted policy file to yaml format. It takes json formatted policy file as input and convert it to a yaml formatted policy file similar to 'oslopolicy-sample-generator' tool except keeping the overridden rule as uncommented. This tool does the following: * Comment out any rules that match the default from policy-in-code. * Keep rules uncommented if rule is overridden. * Does not auto add the deprecated rules in the file unless it not already present in the file. * Keep any extra rules or already exist deprecated rules uncommented but at the end of the file with a warning text. I did not add the new functionality in existing 'oslopolicy-policy-upgrade' tool because the above listed features of new tool end up creating a complete different code path instead of reusing it from existing tool so it better to have separate tool which can be removed in future once all deployments are migrated to YAML formatted file. This commits add doc and reno also for this tool Partial implement blueprint policy-json-to-yaml Change-Id: Icc245951b2992cc09a891516ffd14f3d4c009920 --- setup.cfg | 1 + 1 file changed, 1 insertion(+) (limited to 'setup.cfg') diff --git a/setup.cfg b/setup.cfg index 056fb14..ce12d55 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,6 +36,7 @@ console_scripts = oslopolicy-list-redundant = oslo_policy.generator:list_redundant oslopolicy-policy-upgrade = oslo_policy.generator:upgrade_policy oslopolicy-validator = oslo_policy.generator:validate_policy + oslopolicy-convert-json-to-yaml = oslo_policy.generator:convert_policy_json_to_yaml oslo.policy.rule_checks = http = oslo_policy._external:HttpCheck -- cgit v1.2.1