From e5737546071bd1d38430503bb64b9998bd7870dd Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Tue, 17 Aug 2010 03:37:46 +0000 Subject: cli: Implement help command Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 1229 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1229 --- cli/src/cli-cmd-volume.c | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) (limited to 'cli/src/cli-cmd-volume.c') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 63c15473072..5a0817e128d 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -437,48 +437,62 @@ cli_cmd_volume_set_transport_cbk (struct cli_state *state, struct cli_cmd volume_cmds[] = { { "volume info [all|]", - cli_cmd_volume_info_cbk }, + cli_cmd_volume_info_cbk, + "list information of all volumes"}, { "volume create [stripe ] [replicate ] ...", - cli_cmd_volume_create_cbk }, + cli_cmd_volume_create_cbk, + "create a new volume of specified type with mentioned bricks"}, { "volume delete ", - cli_cmd_volume_delete_cbk }, + cli_cmd_volume_delete_cbk, + "delete volume specified by "}, { "volume start ", - cli_cmd_volume_start_cbk }, + cli_cmd_volume_start_cbk, + "start volume specified by "}, { "volume stop ", - cli_cmd_volume_stop_cbk }, + cli_cmd_volume_stop_cbk, + "stop volume specified by "}, { "volume rename ", - cli_cmd_volume_rename_cbk }, + cli_cmd_volume_rename_cbk, + "rename volume to "}, { "volume add-brick [(replica )|(stripe )] ...", - cli_cmd_volume_add_brick_cbk }, + cli_cmd_volume_add_brick_cbk, + "add brick to volume "}, { "volume remove-brick [(replica )|(stripe )] ...", - cli_cmd_volume_remove_brick_cbk }, + cli_cmd_volume_remove_brick_cbk, + "remove brick from volume "}, { "volume rebalance start", - cli_cmd_volume_defrag_cbk }, + cli_cmd_volume_defrag_cbk, + "start rebalance of volume "}, { "volume rebalance stop", - cli_cmd_volume_defrag_cbk }, + cli_cmd_volume_defrag_cbk, + "stop rebalance of volume "}, { "volume rebalance status", - cli_cmd_volume_defrag_cbk }, + cli_cmd_volume_defrag_cbk, + "rebalance status of volume "}, { "volume replace-brick ( )|pause|abort|start|status", - cli_cmd_volume_replace_brick_cbk }, + cli_cmd_volume_replace_brick_cbk, + "replace-brick operations"}, { "volume set-transport [] ...", - cli_cmd_volume_set_transport_cbk }, + cli_cmd_volume_set_transport_cbk, + "set transport type for volume "}, { "volume set ", - cli_cmd_volume_set_cbk }, + cli_cmd_volume_set_cbk, + "set options for volume "}, - { NULL, NULL } + { NULL, NULL, NULL } }; @@ -489,7 +503,8 @@ cli_cmd_volume_register (struct cli_state *state) struct cli_cmd *cmd = NULL; for (cmd = volume_cmds; cmd->pattern; cmd++) { - ret = cli_cmd_register (&state->tree, cmd->pattern, cmd->cbk); + ret = cli_cmd_register (&state->tree, cmd->pattern, cmd->cbk, + cmd->desc); if (ret) goto out; } -- cgit