From 72b57e311fe8634d26b4c56a78016f9359208443 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Sun, 17 Apr 2011 11:21:51 +0000 Subject: cli: UI cleanup for geo-replication command * provide a unified output in case of failure of geo-replication session * provide a better formatting of the output geo-replication status command * update the help option of geo-replication command * fix few typos Signed-off-by: Kaushik BV Signed-off-by: Anand Avati BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536 --- cli/src/cli-cmd-volume.c | 4 ++-- cli/src/cli-rpc-ops.c | 56 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 21 deletions(-) (limited to 'cli') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 9dc70d2ea..f6caddbc3 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1086,7 +1086,7 @@ out: dict_unref (options); if (ret && parse_err == 0) - cli_out (GEOREP" start failed"); + cli_out (GEOREP" command failed"); return ret; } @@ -1165,7 +1165,7 @@ struct cli_cmd volume_cmds[] = { "reset all the reconfigured options"}, #if (SYNCDAEMON_COMPILE) - {"volume "GEOREP" [options]", + {"volume "GEOREP" [[] ] [options]", cli_cmd_volume_gsync_set_cbk, "Geo-sync operations"}, #endif diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 1b882cd8f..aa6d80f37 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -2630,20 +2630,27 @@ gf_cli3_1_gsync_out_status (dict_t *dict) char mst[PATH_MAX] = {0, }; char slv[PATH_MAX]= {0, }; char sts[PATH_MAX] = {0, }; + char hyphens[81] = {0, }; char *mst_val = NULL; char *slv_val = NULL; char *sts_val = NULL; + cli_out ("%-20s %-50s %-10s", "MASTER", "SLAVE", "STATUS"); + + for (i=0; i