remove redundant value when cluster-show
cluster-show command returned a redundant value named is_profile_only, this path removed the redundant value because it is not a attr belong to cluster. Change-Id: Ic11d0b8ea8eb07a0bbe3b3e125b1ba7d34663784 Closes-Bug: #1693156
This commit is contained in:
parent
3b48c41f7a
commit
0a8fa962c4
@ -144,6 +144,8 @@ def _show_cluster(senlin_client, cluster_id):
|
|||||||
'node_ids': senlin_utils.list_formatter
|
'node_ids': senlin_utils.list_formatter
|
||||||
}
|
}
|
||||||
data = cluster.to_dict()
|
data = cluster.to_dict()
|
||||||
|
if 'is_profile_only' in data:
|
||||||
|
data.pop('is_profile_only')
|
||||||
columns = sorted(data.keys())
|
columns = sorted(data.keys())
|
||||||
return columns, utils.get_dict_properties(data, columns,
|
return columns, utils.get_dict_properties(data, columns,
|
||||||
formatters=formatters)
|
formatters=formatters)
|
||||||
|
@ -552,7 +552,9 @@ def _show_cluster(service, cluster_id):
|
|||||||
'metadata': utils.json_formatter,
|
'metadata': utils.json_formatter,
|
||||||
'node_ids': utils.list_formatter,
|
'node_ids': utils.list_formatter,
|
||||||
}
|
}
|
||||||
utils.print_dict(cluster.to_dict(), formatters=formatters)
|
cluster_attrs = cluster.to_dict()
|
||||||
|
cluster_attrs.pop('is_profile_only')
|
||||||
|
utils.print_dict(cluster_attrs, formatters=formatters)
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('-p', '--profile', metavar='<PROFILE>', required=True,
|
@utils.arg('-p', '--profile', metavar='<PROFILE>', required=True,
|
||||||
|
Loading…
Reference in New Issue
Block a user