From 5475a2ee347dc81d6d3597a799dd5e5a5f2d822f Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Mon, 16 Feb 2015 11:30:14 +1300 Subject: Make ; parsing optional in format_parameters Semicolon splitting is legacy behaviour from the old cfn client. New arguments (like deployment input values) can use format_parameters but won't want to support semicolon splitting. This change makes semicolon parsing optional. Change-Id: I1126fd8882d3ba68a03822e5f519656d78d2d535 --- heatclient/common/utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'heatclient/common/utils.py') diff --git a/heatclient/common/utils.py b/heatclient/common/utils.py index 3cc1b4b..3ffb35a 100644 --- a/heatclient/common/utils.py +++ b/heatclient/common/utils.py @@ -117,16 +117,17 @@ def exit(msg=''): sys.exit(1) -def format_parameters(params): +def format_parameters(params, parse_semicolon=True): '''Reformat parameters into dict of format expected by the API.''' if not params: return {} - # expect multiple invocations of --parameters but fall back - # to ; delimited if only one --parameters is specified - if len(params) == 1: - params = params[0].split(';') + if parse_semicolon: + # expect multiple invocations of --parameters but fall back + # to ; delimited if only one --parameters is specified + if len(params) == 1: + params = params[0].split(';') parameters = {} for p in params: -- cgit v1.2.1