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
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user