whether the template is using the JSON or YAML format

Bug #1267379 reported by huangtianhua
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
huangtianhua

Bug Description

My operations as:

1. make a file, but only written some string such as "hello test" in it, it's obvious not JSON or YAML format.

2. use template-validate api to validate the file.

3. an error is raised: "The server could not comply with the request since\r\nit is either malformed or otherwise incorrect."

4. because an unexpected exception raised in default_for_missing():
   "TypeError:'unicode' object does not support item assignment"

5. I think it's a bug, at least we should catch the exception and raise the correct error message such as "invalid format" and to tell the template is not using the JSON or YAML format.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/65644

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/67396

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/67396
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=dbc66c1efdd0504dad47f03203794039287d4a9f
Submitter: Jenkins
Branch: master

commit dbc66c1efdd0504dad47f03203794039287d4a9f
Author: huangtianhua <email address hidden>
Date: Fri Jan 17 16:00:33 2014 +0800

    Fixes template not using the JSON or YAML format

    An internal unexpected exception is raised while validating a template
    which only has string content. We should handle the case and raise the
    correct error message such as "invalid format" and to tell the template is
    not using the JSON or YAML format.

    And modify incorrect version name and version date in this patch.
    And change "template" from global variale to class varialbe in
    test_api_cfn_v1.py. (missed in another patch which this patch
    depends on: Change Idc2ba2b9 by misoperation)

    Change-Id: I46ee8c48e3ddae71be061cfda0c029d86d132684
    Closes-Bug: #1267379

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.