str_replace and list_join only accept strings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Steven Hardy |
Bug Description
When trying to work with json parameters, or json/map data returned by e.g SoftwareDeploym
It's possible to pass map/list data via input_values via SoftwareDeploym
I'd like to:
1. Allow str_replace to accept map and list values (which are currently rejected with an error), and serialize them as json
2. Same for list_join, which also errors for non-string input, we can serialize map/list values to json, then join that
3. Work out a backwards compatible way to enable transparent conversion of a list/map input_values value to a json string when consumed in the hook. We already have a "Json" and "String" types allowed in the inputs schema, but I can't see if/where there is any explicit type conversion associated with this - need to discuss with stevebaker how this might work.
The motivation behind this is to avoid the sort of mess demonstrated here:
https:/
This could probably be improved, but there's a mess attempting to deal with the fact that it's impossible to pass a json parameter in to the node in a format that can be easily deserialized (e.g json, so it can be handled via jq in a shell script or directly via a tiny python script).
Changed in heat: | |
assignee: | nobody → Steven Hardy (shardy) |
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → liberty-3 |
Changed in heat: | |
milestone: | liberty-3 → liberty-rc1 |
Changed in heat: | |
assignee: | Steven Hardy (shardy) → Steve Baker (steve-stevebaker) |
Changed in heat: | |
assignee: | Steve Baker (steve-stevebaker) → Steven Hardy (shardy) |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | liberty-rc1 → 5.0.0 |
Fix proposed to branch: master /review. openstack. org/221765
Review: https:/