comma_delimited_list parameter returns unicode in parameter list

Bug #1613415 reported by Dan Maas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rico Lin

Bug Description

When running openstack stack show, using the api, or using horizon, comma_delimited_list parameters are rendered as unicode, e.g.

my_parameter: '[u''d74d408f-6a02-46fc-a501-f248e37e4f2f'',u''d74d408f-6a02-46fc-a501-f248e37e4f2g'']'

My expectation was a simple list of strings.

The parameter value is input simply as 'd74d408f-6a02-46fc-a501-f248e37e4f2f,d74d408f-6a02-46fc-a501-f248e37e4f2g'.

This is run against devstack liberty using the latest code from the master heat branch.

Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :

Hi Dan,

It looks like you have too many single quotes in your parameter. I tried this template to verify that it works:

http://paste.openstack.org/raw/559076/

Regards,
Jason

Changed in heat:
status: New → Invalid
Revision history for this message
Dan Maas (drmaas) wrote :

Sorry - I mistyped. The parameter value is showing as:

[u'd74d408f-6a02-46fc-a501-f248e37e4f2f',u'd74d408f-6a02-46fc-a501-f248e37e4f2g']

Revision history for this message
Dan Maas (drmaas) wrote :

To clarify, in horizon I entered the parameters as:

d74d408f-6a02-46fc-a501-f248e37e4f2f,d74d408f-6a02-46fc-a501-f248e37e4f2g

Attaching screenshot of output.

Revision history for this message
Dan Maas (drmaas) wrote :
Dan Maas (drmaas)
summary: - comma_delimited_list parameter returns unicode
+ comma_delimited_list parameter returns unicode in parameter list
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/358106

Changed in heat:
assignee: nobody → Jason Dunsmore (jasondunsmore)
status: Invalid → In Progress
Revision history for this message
Dan Maas (drmaas) wrote :

This also applies to parameters of type json, e.g. {u'foo1': u'bar1', u'foo2': u'bar2'}

Zane Bitter (zaneb)
Changed in heat:
importance: Undecided → Medium
milestone: none → ocata-3
Rabi Mishra (rabi)
Changed in heat:
milestone: ocata-3 → ocata-rc1
Rabi Mishra (rabi)
Changed in heat:
milestone: ocata-rc1 → pike-1
Changed in heat:
assignee: Jason Dunsmore (jasondunsmore) → Zane Bitter (zaneb)
Rico Lin (rico-lin)
Changed in heat:
milestone: pike-1 → pike-2
Rico Lin (rico-lin)
Changed in heat:
milestone: pike-2 → pike-3
Changed in heat:
assignee: Zane Bitter (zaneb) → Rico Lin (rico-lin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit 4940fc1a2a6deb7662916a96167676cd34b82a94
Author: Jason Dunsmore <email address hidden>
Date: Fri Aug 19 15:03:32 2016 -0500

    Pretty print parameters in stack-show

    Previously, we were not using the specialized parameter class' __str__
    method to print the parameters in the stack-show output with python
    2.x.

    Closes-Bug: #1613415
    Change-Id: I44295ae567cef91eb484201099c7646cdb16fe08

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 9.0.0.0b3

This issue was fixed in the openstack/heat 9.0.0.0b3 development milestone.

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.