Schema.to_schema_type() does not always convert value to schema type

Bug #1353701 reported by andersonvom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
andersonvom

Bug Description

If a user defines a parameter in the template (e.g. version number) with a type string and defined allowed values to be things like 9.0, 9.4, etc... Schema.to_schema_type() should convert these to strings, regardless of whether the user enclosed the version numbers in quotes or not.

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

Changed in heat:
assignee: nobody → andersonvom (andersonvom)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit af21176f1a0efdd12400113e66fe9cae0f23af9f
Author: Anderson Mesquita <email address hidden>
Date: Wed Aug 6 17:48:56 2014 -0400

    Always convert string type params to string

    Schema.to_schema_type() should convert values passed to it to the
    appropriate type. So if the user passed a version number of 9.4 and
    they defined it in the template with a string type, we should get the
    string '9.4' back, instead of the error "The value '9.4' is invalid for
    type 'string'".

    Co-Authored-By: Richard Lee <email address hidden>
    Closes-Bug: #1353701
    Change-Id: If7abd129dc7819c6ac01f9bf7dfdbe397ec09c65

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