summaryrefslogtreecommitdiff
path: root/heatclient/common
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2015-02-16 11:30:14 +1300
committerSteve Baker <sbaker@redhat.com>2015-03-04 09:34:28 +1300
commit5475a2ee347dc81d6d3597a799dd5e5a5f2d822f (patch)
treec170e25d8f0eb41d7563a564c232e3f29760da83 /heatclient/common
parentebc16767cc967ef2c9f39093c57c96b4dd0dde1a (diff)
downloadpython-heatclient-5475a2ee347dc81d6d3597a799dd5e5a5f2d822f.tar.gz
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
Diffstat (limited to 'heatclient/common')
-rw-r--r--heatclient/common/utils.py11
1 files changed, 6 insertions, 5 deletions
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: