From a034d05cc852e2dbe966f353ad3add40a63e510a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 30 Oct 2018 16:10:37 -0400 Subject: [PATCH] Draft tabular output of disk information Print out roughly the data that will be desired in the storage show. --- confluent_client/bin/nodestorage | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_client/bin/nodestorage b/confluent_client/bin/nodestorage index 8ad2020c..2003beea 100644 --- a/confluent_client/bin/nodestorage +++ b/confluent_client/bin/nodestorage @@ -57,8 +57,12 @@ def showstorage(noderange, options, args): curr = e['databynode'][node] storagebynode[node][curr['type'] + 's'].append(curr) for node in storagebynode: + print('{0:10}{1:28}{2:10}{3:10}'.format('Disk', 'Description', + 'Status', 'Serial', 'FRU')) for disk in storagebynode[node]['disks']: - print(repr(disk)) + print('{0:10}{1:28}{2:10}{3:10}'.format( + disk['name'], disk['description'], disk['status'], + disk['serial'], disk['fru'])) def createstorage(noderange, options, args):