Support unicode in parameter values

This fixes an exception that occurs when showing a stack if any of the
parameter values contain non-ASCII characters.

Change-Id: I3a36b581c85c37f88646922c02f14541892ded63
Closes-Bug: #1534375
This commit is contained in:
Zane Bitter 2016-01-14 18:47:32 -05:00 committed by Rico Lin
parent 6d3212ecac
commit 434295e670
2 changed files with 3 additions and 3 deletions

View File

@ -218,7 +218,7 @@ def format_stack(stack, preview=False, resolve_outputs=True):
rpc_api.STACK_CREATION_TIME: created_time.isoformat(),
rpc_api.STACK_UPDATED_TIME: updated_time,
rpc_api.STACK_NOTIFICATION_TOPICS: [], # TODO(?) Not implemented yet
rpc_api.STACK_PARAMETERS: stack.parameters.map(str),
rpc_api.STACK_PARAMETERS: stack.parameters.map(six.text_type),
rpc_api.STACK_DESCRIPTION: stack.t[stack.t.DESCRIPTION],
rpc_api.STACK_TMPL_DESCRIPTION: stack.t[stack.t.DESCRIPTION],
rpc_api.STACK_CAPABILITIES: [], # TODO(?) Not implemented yet

View File

@ -27,14 +27,14 @@ from heat.tests import fakes as test_fakes
from heat.tests.openstack.nova import fakes as fakes_nova
from heat.tests import utils
wp_template = '''
wp_template = u'''
heat_template_version: 2014-10-16
description: WordPress
parameters:
KeyName:
description: KeyName
type: string
default: test
default: test\u2042
resources:
WebServer:
type: AWS::EC2::Instance