Passing number and bool literals to string properties fails with Property error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Undecided
|
Jan Provaznik | ||
Juno |
Fix Released
|
Undecided
|
Steven Hardy |
Bug Description
This template:
heat_
resources:
my_server:
type: OS::Nova::Server
properties:
key_name: 42
image: fedora-20.x86_64
Fails to launch with this message:
ERROR: Property error : my_server: key_name Value must be a string
YAML treats `42` as a number, but the `key_name` expects a string. The same behaviour occurs with true/false values and it also occurs when we put these as `default` values of `type: string` parameters.
Wrapping the values in quotes fixes the issue and is probably the recommended solution. But I have seen a few people get tripped up by this and since Heat knows to expect a string there, it should be safe to cast numbers and bools.
Changed in heat: | |
assignee: | nobody → Ishant Tyagi (ishant-tyagi) |
Changed in heat: | |
assignee: | Ishant Tyagi (ishant-tyagi) → Razumovsky Peter (prazumovsky) |
status: | New → In Progress |
Changed in heat: | |
assignee: | Razumovsky Peter (prazumovsky) → nobody |
Changed in heat: | |
assignee: | nobody → Jan Provaznik (jan-provaznik) |
Changed in heat: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
tags: | added: juno-backport-potential |
Changed in heat: | |
milestone: | kilo-1 → 2015.1.0 |
tags: |
added: in-stable-juno removed: juno-backport-potential |
Change abandoned by Peter Razumovsky (<email address hidden>) on branch: master /review. openstack. org/122352
Review: https:/