diff options
author | Shu Yingya <yingya.shu@easystack.cn> | 2017-09-21 11:23:31 +0800 |
---|---|---|
committer | Shu Yingya <yingya.shu@easystack.cn> | 2017-09-21 11:23:31 +0800 |
commit | b1c541581fc3a8465ddd79e381db8cec15717743 (patch) | |
tree | 8a3ed022676de50bcac4caa85c7555bb24820e35 | |
parent | de595e2a3de0d3dc1e780ca912b048e7756b36af (diff) | |
download | python-saharaclient-b1c541581fc3a8465ddd79e381db8cec15717743.tar.gz |
Fix KeyError in "cluster scale" command
When executing "openstack dataprocessing cluster scale" command,
the method "_format_cluster_output" gets the argument which is wrapped.
So the command will get the KeyError.
Change-Id: I6883878ade46e2a8cec881a6a5df931922507ac6
Closes-Bug: #1718564
-rw-r--r-- | saharaclient/osc/v1/clusters.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/saharaclient/osc/v1/clusters.py b/saharaclient/osc/v1/clusters.py index 72355a2..b197c1d 100644 --- a/saharaclient/osc/v1/clusters.py +++ b/saharaclient/osc/v1/clusters.py @@ -561,7 +561,7 @@ class ScaleCluster(command.ShowOne): 'An error occurred when reading ' 'template from file %s: %s' % (parsed_args.json, e)) - data = client.clusters.scale(cluster.id, template).to_dict() + data = client.clusters.scale(cluster.id, template).cluster else: scale_object = { "add_node_groups": [], @@ -601,7 +601,7 @@ class ScaleCluster(command.ShowOne): self.log.error( 'Error occurred during cluster scaling: %s' % cluster.id) - data = client.clusters.get(cluster.id).to_dict() + data = client.clusters.get(cluster.id).cluster _format_cluster_output(data) data = utils.prepare_data(data, CLUSTER_FIELDS) |