From 2b7616c09c1e68165666847534e57ba36505930e Mon Sep 17 00:00:00 2001 From: tengqm Date: Wed, 29 Jul 2015 05:15:56 -0400 Subject: [PATCH] Fix cluster-resize operation param checking There are cases where adjustment_type or number is not assigned. The param checking will fail when neither one has got an value. This patch fixes this error by setting the default values to None. Change-Id: I24411324b53fe8b61bd108f2eb3f54687255727f --- senlinclient/v1/shell.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index c30e4d05..22287601 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -815,6 +815,9 @@ def do_cluster_resize(sc, args): raise exc.CommandError(_("Only one of 'capacity', 'adjustment' and " "'percentage' can be specified.")) + action_args['adjustment_type'] = None + action_args['number'] = None + if capacity is not None: if capacity < 0: raise exc.CommandError(_('Cluster capacity must be larger than '