Revise command reminder when we run senlin cluster-resize

This patch revises command reminder when we run `senlin cluster-resize`.
Closes-Bug: #1677559

Change-Id: Idfaf8793371c5bef9aee585d537d18acf6103bf0
This commit is contained in:
jonnary 2017-03-30 17:41:35 +08:00
parent 80df1b309d
commit 68b54e237e

@ -960,6 +960,12 @@ def do_cluster_resize(service, args):
max_size = args.max_size
min_step = args.min_step
if sum(v is not None for v in (capacity, adjustment, percentage, min_size,
max_size)) == 0:
raise exc.CommandError(_("At least one parameter of 'capacity', "
"'adjustment', 'percentage', 'min_size', "
" and 'max_size' should be specified."))
if sum(v is not None for v in (capacity, adjustment, percentage)) > 1:
raise exc.CommandError(_("Only one of 'capacity', 'adjustment' and "
"'percentage' can be specified."))