From e3a7d83ea1d5ba579752730a396a7107eea74562 Mon Sep 17 00:00:00 2001 From: wangyao Date: Thu, 21 Dec 2017 16:46:06 +0800 Subject: [PATCH] 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 --- troveclient/v1/shell.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/troveclient/v1/shell.py b/troveclient/v1/shell.py index a6efa1f2..d33fc0b0 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)