summaryrefslogtreecommitdiff
path: root/troveclient/v1
diff options
context:
space:
mode:
authorwangyao <wangyao@cmss.chinamobile.com>2017-12-21 16:46:06 +0800
committerwangyao <wangyao@cmss.chinamobile.com>2017-12-21 16:46:06 +0800
commite3a7d83ea1d5ba579752730a396a7107eea74562 (patch)
treebaeee2b00b5ca0a7a2106508b054ae117a246dd7 /troveclient/v1
parentf92e62465348b8958ab31e04ebc8031bba5d70c1 (diff)
downloadpython-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.py5
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)