]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Module for converting JSON to YAML, and parsing both
authorSteve Baker <sbaker@redhat.com>
Sun, 25 Nov 2012 23:52:47 +0000 (12:52 +1300)
committerSteve Baker <sbaker@redhat.com>
Mon, 26 Nov 2012 02:10:51 +0000 (15:10 +1300)
commitf1c762b110100903121e13afc7870737161d2828
tree3f5169ca9eab078b1c5489c50c7d3ffa8f9ab612
parent60531b4ca53379a7cb0124d47ce2028e3d475e94
Module for converting JSON to YAML, and parsing both

convert_json_to_yaml is a utility function used for tests and file conversion
utilities.

parse_to_template will take any string, infer the format, and parse to a
python structure. Currently it assumes the file is JSON if it starts with '{'
otherwise it attempts to parse it as YAML.

Change-Id: If15ccdaf912693f76b74bb1fe879145af1cb36b1
heat/engine/format.py [new file with mode: 0644]
heat/tests/test_format.py [new file with mode: 0644]