cli: Format the hostname column properly in the 'pool list' o/p
authorVijaikumar M <vmallika@redhat.com>
Fri, 20 Jun 2014 10:10:46 +0000 (15:40 +0530)
committerKaushal M <kaushal@redhat.com>
Wed, 2 Jul 2014 11:04:25 +0000 (04:04 -0700)
commitca6980d0828a6e7f38d7638a3b99db5d9be36260
tree7f00b6149b93cde1cf8987d2040393d8ad31c964
parent0e6cd39d55be3f4397772dcd75b0b59daedc8f55
cli: Format the hostname column properly in the 'pool list' o/p

In the pool list output, if the hostname is lengthier, then the indentation was not proper.

Solution:
1) get the full list of hostnames first (prior to display)
2) Determine the maximum length of the hostname strings from that
3) Create an appropriate display padding amount, using the length from (2)

Change-Id: Icc3724975a5e30b02b8e06db709930cbac5e0875
BUG: 1028871
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8127
Tested-by: Justin Clift <justin@gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
cli/src/cli-rpc-ops.c