Parameters schema is not validated

Bug #1265862 reported by Thomas Herve
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Thomas Herve

Bug Description

For example, if you use a parameter with an invalid constraints list:

parameters:
  instance_type:
    type: string
    description: Instance type for WordPress server.
    default: m2.medium
    constraints:
      allowed_values:
        - m1.small
        - m1.medium
        - m1.large

heat template-validate doesn't complain. If I try to create a stack with it, it gets ugly:

$ heat stack-create ...
ERROR: 'unicode' object has no attribute 'get'

We should validate the schema, and make it output a better error.

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/65091

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/69655

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

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

commit 4974d680923dee77c13d41d8f27f280e35cf5ffc
Author: Thomas Herve <email address hidden>
Date: Tue Jan 28 16:23:21 2014 +0100

    Add a validation step to parameters schema

    This enables validation of of the parameters section of the template, so
    that operations like template-validate now return a proper error if
    something is wrong.

    Closes-Bug: #1265862
    Co-Authored-By: <email address hidden>
    Change-Id: Ic5d67f18d7bc53fd3e4e765ca221e21be0b9546d

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
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.