diff options
author | PriyaDuggirala <priyaduggirala02@gmail.com> | 2017-10-26 19:54:07 +0530 |
---|---|---|
committer | PriyaDuggirala <priyaduggirala02@gmail.com> | 2017-10-27 20:33:25 +0530 |
commit | f73c2a4177377b710a02577feea38560b00a24bf (patch) | |
tree | 29f9dd14b93bc01911ad8385585537f9f66ad33e /heatclient/common | |
parent | 868f3b80b7c701607b644afd19e320a9f35e0cfc (diff) | |
download | python-heatclient-f73c2a4177377b710a02577feea38560b00a24bf.tar.gz |
Modify error message encountered during stack update
Parameters of an existing stack can be updated with
openstack stack update <stack> --existing --parameter <parameter>=<newvalue>
Example : openstack stack update stack1 --parameter p1=v1
If the --existing option is skipped, it leads to the below error
Need to specify exactly one of --template-file, --template-url or --template-object
This error is misleading as the user might think that stack update
cannot be performed without specifying a new template.
Modify the error message with --existing option.
Change-Id: Idce88bde848378e00b1c873245600ba205939668
Closes-Bug: #1723864
Diffstat (limited to 'heatclient/common')
-rw-r--r-- | heatclient/common/template_utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/heatclient/common/template_utils.py b/heatclient/common/template_utils.py index b38710b..cdb330a 100644 --- a/heatclient/common/template_utils.py +++ b/heatclient/common/template_utils.py @@ -74,11 +74,13 @@ def get_template_contents(template_file=None, template_url=None, return {}, None else: raise exc.CommandError(_('Need to specify exactly one of ' - '%(arg1)s, %(arg2)s or %(arg3)s') % + '[%(arg1)s, %(arg2)s or %(arg3)s]' + ' or %(arg4)s') % { 'arg1': '--template-file', 'arg2': '--template-url', - 'arg3': '--template-object'}) + 'arg3': '--template-object', + 'arg4': '--existing'}) if not tpl: raise exc.CommandError(_('Could not fetch template from %s') |