diff options
author | wangyao <wangyao@cmss.chinamobile.com> | 2017-12-21 16:46:06 +0800 |
---|---|---|
committer | wangyao <wangyao@cmss.chinamobile.com> | 2017-12-21 16:46:06 +0800 |
commit | e3a7d83ea1d5ba579752730a396a7107eea74562 (patch) | |
tree | baeee2b00b5ca0a7a2106508b054ae117a246dd7 /troveclient/v1 | |
parent | f92e62465348b8958ab31e04ebc8031bba5d70c1 (diff) | |
download | python-troveclient-e3a7d83ea1d5ba579752730a396a7107eea74562.tar.gz |
Fix error with configuration-parameter-show
According bug description, there will be an error when
use configuration-parameter-show without version_id
and datastore. To fix this problem, I add an judgement
for use the cmd without parameter datstore and
datastore_version not like an uuid.
Now in such a case, the cmd will has an exception info.
Change-Id: I01fd56bad80f389da369be90dff5c89b05e6a8dc
Closes-Bug: #1363065
Diffstat (limited to 'troveclient/v1')
-rw-r--r-- | troveclient/v1/shell.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/troveclient/v1/shell.py b/troveclient/v1/shell.py index a6efa1f..d33fc0b 100644 --- a/troveclient/v1/shell.py +++ b/troveclient/v1/shell.py @@ -1601,6 +1601,11 @@ def do_configuration_parameter_show(cs, args): param = cs.configuration_parameters.get_parameter_by_version( args.datastore_version, args.parameter) + else: + raise exceptions.NoUniqueMatch(_('The datastore name or id is' + ' required to retrieve the' + ' parameter for the configuration' + ' group by name.')) _print_object(param) |