OS::Heat::Value json type should accept lists

Bug #1738188 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Low
Steven Hardy

Bug Description

A Json parameter type accepts the following:

- map
- list
- json string (serializing either a map or a list)

It seems like the OS::Heat::Value resource is more restrictive, which can be confusing, as e.g trying to pass a list with type: json results in an error like:

heat.common.exception.StackValidationFailed: Property error: resources.my_value.properties.value: "[u'a', u'Z', u'B', u'y']" is not a map

The workaround is to use comma_delimited_list, but it'd be nice to make this consistent with how the Json parameter validation works.

Steven Hardy (shardy)
Changed in heat:
status: New → Triaged
importance: Undecided → Low
milestone: none → queens-3
assignee: nobody → Steven Hardy (shardy)
Revision history for this message
Zane Bitter (zaneb) wrote :

Good catch, it would be nice to fix that.

The reaaon is that although it's using the parameter names for stuff, internally it's converting that to the property constraints. I wonder if it's possible to use a parameters.Schema object in place of a properties.Schema one in a Property without any side-effects...

Rico Lin (rico-lin)
Changed in heat:
milestone: queens-3 → queens-rc1
Rabi Mishra (rabi)
Changed in heat:
milestone: queens-rc1 → rocky-1
Rico Lin (rico-lin)
Changed in heat:
milestone: rocky-1 → rocky-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.