json parameters require json strings rather than accepting arbitrary json structures

Bug #1342487 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Ryan Brown

Bug Description

e.g. if I have a json parameter foo , in my env file I can do:

Parameters:
   foo: "[ \" A JSON list \" ]"

but not

Parameters:
  foo:
  - A JSON list

Confusingly, I can do:

Parameters:
  foo:
    bar:
    - A list in an object.

Revision history for this message
Zane Bitter (zaneb) wrote :

Workaround for now:

  {Fn::Select: [bar, {Ref: foo}]}

This should be an easy fix, but we also really need to switch provider templates over to using the Json parameter type for lists, preferably without breaking any existing templates.

Changed in heat:
status: New → Triaged
importance: Undecided → High
Ryan Brown (sb-p)
Changed in heat:
assignee: nobody → Ryan Brown (sb-p)
Ryan Brown (sb-p)
Changed in heat:
status: Triaged → In Progress
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/109357

Zane Bitter (zaneb)
Changed in heat:
milestone: none → juno-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit f3791a0b450b5851dae43be5a2dffa53b18ee0c1
Author: Ryan Brown <email address hidden>
Date: Thu Jul 24 13:15:15 2014 -0400

    Allow JSON parameters in environment files

    Currently users can specify:
    Parameters:
      foo: "[ \"a\", \"stringified\", \"JSON\", \"list\" ]"

    This change allows:
    Parameters:
      foo:
      - a
      - JSON
      - list

    Change-Id: Ie1616ec4a215f62bc8e06ae2588f953246870b37
    Closes-Bug: #1342487

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: 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.