![Ghanshyam Mann](/assets/img/avatar_default.png)
As part of oslo_policy policy_file JSON to YAML migration BP, we need to check if oslo policy_file is JSON or YAML formatted (almost on all projects with policy in code, example Needed-By). - https://specs.openstack.org/openstack/oslo-specs/specs/victoria/policy-json-to-yaml.html These util methods try quick checks of file type by loading the file using json or yaml. Needed-By: https://review.opendev.org/#/c/748059/ Related Blueprint: policy-json-to-yaml Change-Id: I0edf030dc5cd6b77e0101089746589332860fa16
7 lines
149 B
YAML
7 lines
149 B
YAML
---
|
|
features:
|
|
- |
|
|
New method ``is_json`` ``is_yaml`` added in fileutils.
|
|
These can be used to check if file is JSON or YAML
|
|
formatted.
|