From f8a158134d89b25063b059cd4241ffc84c48f469 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Mon, 30 Sep 2013 16:26:33 +0530 Subject: cli: snapshot create cli interface. $ gluster snapshot help snapshot help - display help for snapshot commands snapshot create [-n ] [-d ] - Snapshot Create. $ gluster snapshot create vol1 snapshot create: ???: snap created successfully $ gluster snapshot create vol1 vol2 snapshot create: ???: consistency group created successfully (The ??? will be replaced by the glusterd snap create command with the generated snap-name or cg-name) $ gluster snapshot create vol1 vol2 -n CG1 snapshot create: CG1: consistency group created successfully $ gluster snapshot create vol1 -n snap1 -d Description snapshot create: snap1: snap created successfully $ gluster snapshot create vol1 -n snap1 -d "Description can have -d within quotes" snapshot create: snap1: snap created successfully $ gluster snapshot create vol1 -n snap1 -d Description cant have -d without quotes snapshot create: failed: Options(-n/-d) are not valid descriptions Usage: snapshot create [-n ] [-d ] $ gluster snapshot create vol1 -n "Multi word snap name" -d Description snapshot create: failed: Invalid snap name Usage: snapshot create [-n ] [-d ] $ gluster snapshot create vol1 -d Description -n "-d" snapshot create: failed: Options(-n/-d) are not valid snap names Usage: snapshot create [-n ] [-d ] $ gluster snapshot create vol1 -d -n snap1 snapshot create: failed: No description provided Usage: snapshot create [-n ] [-d ] Change-Id: I74b5a8406d72282fbb7ba7d07e0c7fe395148d38 Signed-off-by: Avra Sengupta --- cli/src/cli.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli/src/cli.h') diff --git a/cli/src/cli.h b/cli/src/cli.h index bc71ee2b4..65f9b857f 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -387,4 +387,8 @@ cli_xml_output_vol_status_tasks_detail (cli_local_t *local, dict_t *dict); char * is_server_debug_xlator (void *myframe); + +int32_t +cli_cmd_snapshot_parse (const char **words, int wordcount, dict_t **options); + #endif /* __CLI_H__ */ -- cgit