summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-02-25 08:38:44 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-03-01 02:05:51 -0800
commitbf73fd2d8d6805a9a3b947464c65a9847442bba3 (patch)
tree261db5b8f1c4f1f1ec1a8c9323ab222049a265c0 /cli
parent36bd0291118dfee4df9d387eb94681d41a0abcbb (diff)
glusterd: separate out cli specific programs and mgmt specific programs
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2333 (make glusterd more rpc friendly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2333
Diffstat (limited to 'cli')
-rw-r--r--cli/src/Makefile.am2
-rw-r--r--cli/src/cli-cmd-peer.c6
-rw-r--r--cli/src/cli-cmd-system.c6
-rw-r--r--cli/src/cli-cmd-volume.c38
-rw-r--r--cli/src/cli-rpc-ops.c (renamed from cli/src/cli3_1-cops.c)107
-rw-r--r--cli/src/cli.c4
6 files changed, 81 insertions, 82 deletions
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
index aa66ed1405f..f2a03030f1f 100644
--- a/cli/src/Makefile.am
+++ b/cli/src/Makefile.am
@@ -1,7 +1,7 @@
sbin_PROGRAMS = gluster
gluster_SOURCES = cli.c registry.c input.c cli-cmd.c cli-rl.c \
- cli-cmd-volume.c cli-cmd-peer.c cli3_1-cops.c cli-cmd-parser.c\
+ cli-cmd-volume.c cli-cmd-peer.c cli-rpc-ops.c cli-cmd-parser.c\
cli-cmd-system.c cli-cmd-misc.c
gluster_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GF_LDADD)\
diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c
index 0c4d54dc155..c931341c38b 100644
--- a/cli/src/cli-cmd-peer.c
+++ b/cli/src/cli-cmd-peer.c
@@ -57,7 +57,7 @@ cli_cmd_peer_probe_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_PROBE];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_PROBE];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -116,7 +116,7 @@ cli_cmd_peer_deprobe_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_DEPROBE];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_DEPROBE];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -164,7 +164,7 @@ cli_cmd_peer_status_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_LIST_FRIENDS];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_LIST_FRIENDS];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
diff --git a/cli/src/cli-cmd-system.c b/cli/src/cli-cmd-system.c
index e92376cef8a..36583893b81 100644
--- a/cli/src/cli-cmd-system.c
+++ b/cli/src/cli-cmd-system.c
@@ -69,7 +69,7 @@ cli_cmd_getspec_cbk (struct cli_state *state, struct cli_cmd_word *word,
if (ret)
goto out;
- proc = &cli_rpc_prog->proctable[GF1_CLI_GETSPEC];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_GETSPEC];
if (proc->fn) {
ret = proc->fn (frame, THIS, dict);
}
@@ -112,7 +112,7 @@ cli_cmd_pmap_b2p_cbk (struct cli_state *state, struct cli_cmd_word *word,
if (ret)
goto out;
- proc = &cli_rpc_prog->proctable[GF1_CLI_PMAP_PORTBYBRICK];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_PMAP_PORTBYBRICK];
if (proc->fn) {
ret = proc->fn (frame, THIS, dict);
}
@@ -145,7 +145,7 @@ cli_cmd_fsm_log (struct cli_state *state, struct cli_cmd_word *word,
if (wordcount == 3)
name = (char*)words[2];
- proc = &cli_rpc_prog->proctable[GF1_CLI_FSM_LOG];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_FSM_LOG];
if (proc && proc->fn) {
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index e022cce1149..5039fa2dd48 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -53,7 +53,7 @@ cli_cmd_volume_info_cbk (struct cli_state *state, struct cli_cmd_word *word,
int sent = 0;
int parse_error = 0;
- proc = &cli_rpc_prog->proctable[GF1_CLI_GET_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_GET_VOLUME];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -62,7 +62,7 @@ cli_cmd_volume_info_cbk (struct cli_state *state, struct cli_cmd_word *word,
if ((wordcount == 2) || (wordcount == 3 &&
!strcmp (words[2], "all"))) {
ctx.flags = GF_CLI_GET_NEXT_VOLUME;
- proc = &cli_rpc_prog->proctable[GF1_CLI_GET_NEXT_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_GET_NEXT_VOLUME];
} else if (wordcount == 3) {
ctx.flags = GF_CLI_GET_VOLUME;
ctx.volname = (char *)words[2];
@@ -70,7 +70,7 @@ cli_cmd_volume_info_cbk (struct cli_state *state, struct cli_cmd_word *word,
cli_out ("Invalid volume name");
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_GET_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_GET_VOLUME];
} else {
cli_usage_out (word->pattern);
parse_error = 1;
@@ -129,7 +129,7 @@ cli_cmd_sync_volume_cbk (struct cli_state *state, struct cli_cmd_word *word,
req.hostname = (char *)words[2];
- proc = &cli_rpc_prog->proctable[GF1_CLI_SYNC_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_SYNC_VOLUME];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -160,7 +160,7 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word,
int sent = 0;
int parse_error = 0;
- proc = &cli_rpc_prog->proctable[GF1_CLI_CREATE_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_CREATE_VOLUME];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -206,7 +206,7 @@ cli_cmd_volume_delete_cbk (struct cli_state *state, struct cli_cmd_word *word,
question = "Deleting volume will erase all information about the volume. "
"Do you want to continue?";
- proc = &cli_rpc_prog->proctable[GF1_CLI_DELETE_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_DELETE_VOLUME];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -277,7 +277,7 @@ cli_cmd_volume_start_cbk (struct cli_state *state, struct cli_cmd_word *word,
}
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_START_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_START_VOLUME];
if (proc->fn) {
ret = proc->fn (frame, THIS, &req);
@@ -381,7 +381,7 @@ cli_cmd_volume_stop_cbk (struct cli_state *state, struct cli_cmd_word *word,
}
req.flags = flags;
- proc = &cli_rpc_prog->proctable[GF1_CLI_STOP_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_STOP_VOLUME];
if (proc->fn) {
ret = proc->fn (frame, THIS, &req);
@@ -434,7 +434,7 @@ cli_cmd_volume_rename_cbk (struct cli_state *state, struct cli_cmd_word *word,
if (ret)
goto out;
- proc = &cli_rpc_prog->proctable[GF1_CLI_RENAME_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_RENAME_VOLUME];
if (proc->fn) {
ret = proc->fn (frame, THIS, dict);
@@ -490,7 +490,7 @@ cli_cmd_volume_defrag_cbk (struct cli_state *state, struct cli_cmd_word *word,
if (ret)
goto out;
- proc = &cli_rpc_prog->proctable[GF1_CLI_DEFRAG_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_DEFRAG_VOLUME];
if (proc->fn) {
ret = proc->fn (frame, THIS, dict);
@@ -521,7 +521,7 @@ cli_cmd_volume_reset_cbk (struct cli_state *state, struct cli_cmd_word *word,
call_frame_t *frame = NULL;
dict_t *options = NULL;
- proc = &cli_rpc_prog->proctable[GF1_CLI_RESET_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_RESET_VOLUME];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -566,7 +566,7 @@ cli_cmd_volume_set_cbk (struct cli_state *state, struct cli_cmd_word *word,
call_frame_t *frame = NULL;
dict_t *options = NULL;
- proc = &cli_rpc_prog->proctable[GF1_CLI_SET_VOLUME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_SET_VOLUME];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -622,7 +622,7 @@ cli_cmd_volume_add_brick_cbk (struct cli_state *state,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_ADD_BRICK];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_ADD_BRICK];
if (proc->fn) {
ret = proc->fn (frame, THIS, options);
@@ -677,7 +677,7 @@ cli_cmd_volume_remove_brick_cbk (struct cli_state *state,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_REMOVE_BRICK];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_REMOVE_BRICK];
if (proc->fn) {
ret = proc->fn (frame, THIS, options);
@@ -713,7 +713,7 @@ cli_cmd_volume_replace_brick_cbk (struct cli_state *state,
cli_out ("Command not supported on Solaris");
goto out;
#endif
- proc = &cli_rpc_prog->proctable[GF1_CLI_REPLACE_BRICK];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_REPLACE_BRICK];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -771,7 +771,7 @@ cli_cmd_log_filename_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_LOG_FILENAME];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_LOG_FILENAME];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -816,7 +816,7 @@ cli_cmd_log_locate_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_LOG_LOCATE];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_LOG_LOCATE];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -860,7 +860,7 @@ cli_cmd_log_rotate_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
- proc = &cli_rpc_prog->proctable[GF1_CLI_LOG_ROTATE];
+ proc = &cli_rpc_prog->proctable[GLUSTER_CLI_LOG_ROTATE];
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
@@ -897,7 +897,7 @@ cli_cmd_volume_gsync_set_cbk (struct cli_state *state, struct cli_cmd_word *word
rpc_clnt_procedure_t *proc = NULL;
call_frame_t *frame = NULL;
- proc = &cli_rpc_prog->proctable [GF1_CLI_GSYNC_SET];
+ proc = &cli_rpc_prog->proctable [GLUSTER_CLI_GSYNC_SET];
if (proc == NULL) {
ret = -1;
goto out;
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli-rpc-ops.c
index 8255f8184cd..c2373e2a576 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -38,7 +38,7 @@
#include "portmap.h"
extern rpc_clnt_prog_t *cli_rpc_prog;
-extern int cli_op_ret;
+extern int cli_op_ret;
char *cli_volume_type[] = {"Distribute",
"Stripe",
@@ -1367,7 +1367,7 @@ gf_cli3_1_probe (call_frame_t *frame, xlator_t *this,
req.port = port;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_PROBE, NULL, gf_xdr_from_cli_probe_req,
+ GLUSTER_CLI_PROBE, NULL, gf_xdr_from_cli_probe_req,
this, gf_cli3_1_probe_cbk);
out:
@@ -1403,7 +1403,7 @@ gf_cli3_1_deprobe (call_frame_t *frame, xlator_t *this,
req.port = port;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_DEPROBE, NULL,
+ GLUSTER_CLI_DEPROBE, NULL,
gf_xdr_from_cli_deprobe_req,
this, gf_cli3_1_deprobe_cbk);
@@ -1427,7 +1427,7 @@ gf_cli3_1_list_friends (call_frame_t *frame, xlator_t *this,
req.flags = GF_CLI_LIST_ALL;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_LIST_FRIENDS, NULL,
+ GLUSTER_CLI_LIST_FRIENDS, NULL,
gf_xdr_from_cli_peer_list_req,
this, gf_cli3_1_list_friends_cbk);
@@ -1506,7 +1506,7 @@ gf_cli3_1_get_volume (call_frame_t *frame, xlator_t *this,
(size_t *)&req.dict.dict_len);
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_GET_VOLUME, NULL,
+ GLUSTER_CLI_GET_VOLUME, NULL,
gf_xdr_from_cli_get_vol_req,
this, gf_cli3_1_get_volume_cbk);
@@ -1563,7 +1563,7 @@ gf_cli3_1_create_volume (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_CREATE_VOLUME, NULL,
+ GLUSTER_CLI_CREATE_VOLUME, NULL,
gf_xdr_from_cli_create_vol_req,
this, gf_cli3_1_create_volume_cbk);
@@ -1605,7 +1605,7 @@ gf_cli3_1_delete_volume (call_frame_t *frame, xlator_t *this,
req.volname = data;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_DELETE_VOLUME, NULL,
+ GLUSTER_CLI_DELETE_VOLUME, NULL,
gf_xdr_from_cli_delete_vol_req,
this, gf_cli3_1_delete_volume_cbk);
@@ -1638,7 +1638,7 @@ gf_cli3_1_start_volume (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit (req, frame, cli_rpc_prog,
- GD_MGMT_CLI_START_VOLUME, NULL,
+ GLUSTER_CLI_START_VOLUME, NULL,
gf_xdr_from_cli_start_vol_req,
this, gf_cli3_1_start_volume_cbk);
@@ -1671,7 +1671,7 @@ gf_cli3_1_stop_volume (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_STOP_VOLUME, NULL,
+ GLUSTER_CLI_STOP_VOLUME, NULL,
gf_xdr_from_cli_stop_vol_req,
this, gf_cli3_1_stop_volume_cbk);
@@ -1765,7 +1765,7 @@ gf_cli3_1_rename_volume (call_frame_t *frame, xlator_t *this,
goto out;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_RENAME_VOLUME, NULL,
+ GLUSTER_CLI_RENAME_VOLUME, NULL,
gf_xdr_from_cli_rename_vol_req,
this, gf_cli3_1_rename_volume_cbk);
@@ -1806,7 +1806,7 @@ gf_cli3_1_reset_volume (call_frame_t *frame, xlator_t *this,
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_RESET_VOLUME, NULL,
+ GLUSTER_CLI_RESET_VOLUME, NULL,
gf_xdr_from_cli_reset_vol_req,
this, gf_cli3_1_reset_volume_cbk);
@@ -1847,7 +1847,7 @@ gf_cli3_1_set_volume (call_frame_t *frame, xlator_t *this,
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_SET_VOLUME, NULL,
+ GLUSTER_CLI_SET_VOLUME, NULL,
gf_xdr_from_cli_set_vol_req,
this, gf_cli3_1_set_volume_cbk);
@@ -1892,7 +1892,7 @@ gf_cli3_1_add_brick (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_ADD_BRICK, NULL,
+ GLUSTER_CLI_ADD_BRICK, NULL,
gf_xdr_from_cli_add_brick_req,
this, gf_cli3_1_add_brick_cbk);
@@ -1941,7 +1941,7 @@ gf_cli3_1_remove_brick (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_REMOVE_BRICK, NULL,
+ GLUSTER_CLI_REMOVE_BRICK, NULL,
gf_xdr_from_cli_remove_brick_req,
this, gf_cli3_1_remove_brick_cbk);
@@ -2036,7 +2036,7 @@ gf_cli3_1_replace_brick (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_REPLACE_BRICK, NULL,
+ GLUSTER_CLI_REPLACE_BRICK, NULL,
gf_xdr_from_cli_replace_brick_req,
this, gf_cli3_1_replace_brick_cbk);
@@ -2078,7 +2078,7 @@ gf_cli3_1_log_filename (call_frame_t *frame, xlator_t *this,
goto out;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_LOG_FILENAME, NULL,
+ GLUSTER_CLI_LOG_FILENAME, NULL,
gf_xdr_from_cli_log_filename_req,
this, gf_cli3_1_log_filename_cbk);
@@ -2113,7 +2113,7 @@ gf_cli3_1_log_locate (call_frame_t *frame, xlator_t *this,
req.brick = "";
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_LOG_LOCATE, NULL,
+ GLUSTER_CLI_LOG_LOCATE, NULL,
gf_xdr_from_cli_log_locate_req,
this, gf_cli3_1_log_locate_cbk);
@@ -2147,7 +2147,7 @@ gf_cli3_1_log_rotate (call_frame_t *frame, xlator_t *this,
req.brick = "";
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_LOG_ROTATE, NULL,
+ GLUSTER_CLI_LOG_ROTATE, NULL,
gf_xdr_from_cli_log_rotate_req,
this, gf_cli3_1_log_rotate_cbk);
@@ -2170,7 +2170,7 @@ gf_cli3_1_sync_volume (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit ((gf1_cli_sync_volume_req*)data, frame,
- cli_rpc_prog, GD_MGMT_CLI_SYNC_VOLUME,
+ cli_rpc_prog, GLUSTER_CLI_SYNC_VOLUME,
NULL, gf_xdr_from_cli_sync_volume_req,
this, gf_cli3_1_sync_volume_cbk);
@@ -2345,7 +2345,7 @@ gf_cli3_1_fsm_log (call_frame_t *frame, xlator_t *this, void *data)
goto out;
req.name = data;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_FSM_LOG, NULL,
+ GLUSTER_CLI_FSM_LOG, NULL,
gf_xdr_from_cli_fsm_log_req,
this, gf_cli3_1_fsm_log_cbk);
@@ -2596,7 +2596,7 @@ gf_cli3_1_gsync_set (call_frame_t *frame, xlator_t *this,
}
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
- GD_MGMT_CLI_GSYNC_SET, NULL,
+ GLUSTER_CLI_GSYNC_SET, NULL,
gf_xdr_from_cli_gsync_set_req,
this, gf_cli3_1_gsync_set_cbk);
@@ -2605,39 +2605,38 @@ out:
}
-
-struct rpc_clnt_procedure gluster3_1_cli_actors[GF1_CLI_MAXVALUE] = {
- [GF1_CLI_NULL] = {"NULL", NULL },
- [GF1_CLI_PROBE] = { "PROBE_QUERY", gf_cli3_1_probe},
- [GF1_CLI_DEPROBE] = { "DEPROBE_QUERY", gf_cli3_1_deprobe},
- [GF1_CLI_LIST_FRIENDS] = { "LIST_FRIENDS", gf_cli3_1_list_friends},
- [GF1_CLI_CREATE_VOLUME] = {"CREATE_VOLUME", gf_cli3_1_create_volume},
- [GF1_CLI_DELETE_VOLUME] = {"DELETE_VOLUME", gf_cli3_1_delete_volume},
- [GF1_CLI_START_VOLUME] = {"START_VOLUME", gf_cli3_1_start_volume},
- [GF1_CLI_STOP_VOLUME] = {"STOP_VOLUME", gf_cli3_1_stop_volume},
- [GF1_CLI_RENAME_VOLUME] = {"RENAME_VOLUME", gf_cli3_1_rename_volume},
- [GF1_CLI_DEFRAG_VOLUME] = {"DEFRAG_VOLUME", gf_cli3_1_defrag_volume},
- [GF1_CLI_GET_VOLUME] = {"GET_VOLUME", gf_cli3_1_get_volume},
- [GF1_CLI_GET_NEXT_VOLUME] = {"GET_NEXT_VOLUME", gf_cli3_1_get_next_volume},
- [GF1_CLI_SET_VOLUME] = {"SET_VOLUME", gf_cli3_1_set_volume},
- [GF1_CLI_ADD_BRICK] = {"ADD_BRICK", gf_cli3_1_add_brick},
- [GF1_CLI_REMOVE_BRICK] = {"REMOVE_BRICK", gf_cli3_1_remove_brick},
- [GF1_CLI_REPLACE_BRICK] = {"REPLACE_BRICK", gf_cli3_1_replace_brick},
- [GF1_CLI_LOG_FILENAME] = {"LOG FILENAME", gf_cli3_1_log_filename},
- [GF1_CLI_LOG_LOCATE] = {"LOG LOCATE", gf_cli3_1_log_locate},
- [GF1_CLI_LOG_ROTATE] = {"LOG ROTATE", gf_cli3_1_log_rotate},
- [GF1_CLI_GETSPEC] = {"GETSPEC", gf_cli3_1_getspec},
- [GF1_CLI_PMAP_PORTBYBRICK] = {"PMAP PORTBYBRICK", gf_cli3_1_pmap_b2p},
- [GF1_CLI_SYNC_VOLUME] = {"SYNC_VOLUME", gf_cli3_1_sync_volume},
- [GF1_CLI_RESET_VOLUME] = {"RESET_VOLUME", gf_cli3_1_reset_volume},
- [GF1_CLI_GSYNC_SET] = {"GSYNC_SET", gf_cli3_1_gsync_set},
- [GF1_CLI_FSM_LOG] = {"FSM_LOG", gf_cli3_1_fsm_log}
+struct rpc_clnt_procedure gluster_cli_actors[GLUSTER_CLI_MAXVALUE] = {
+ [GLUSTER_CLI_NULL] = {"NULL", NULL },
+ [GLUSTER_CLI_PROBE] = {"PROBE_QUERY", gf_cli3_1_probe},
+ [GLUSTER_CLI_DEPROBE] = {"DEPROBE_QUERY", gf_cli3_1_deprobe},
+ [GLUSTER_CLI_LIST_FRIENDS] = {"LIST_FRIENDS", gf_cli3_1_list_friends},
+ [GLUSTER_CLI_CREATE_VOLUME] = {"CREATE_VOLUME", gf_cli3_1_create_volume},
+ [GLUSTER_CLI_DELETE_VOLUME] = {"DELETE_VOLUME", gf_cli3_1_delete_volume},
+ [GLUSTER_CLI_START_VOLUME] = {"START_VOLUME", gf_cli3_1_start_volume},
+ [GLUSTER_CLI_STOP_VOLUME] = {"STOP_VOLUME", gf_cli3_1_stop_volume},
+ [GLUSTER_CLI_RENAME_VOLUME] = {"RENAME_VOLUME", gf_cli3_1_rename_volume},
+ [GLUSTER_CLI_DEFRAG_VOLUME] = {"DEFRAG_VOLUME", gf_cli3_1_defrag_volume},
+ [GLUSTER_CLI_GET_VOLUME] = {"GET_VOLUME", gf_cli3_1_get_volume},
+ [GLUSTER_CLI_GET_NEXT_VOLUME] = {"GET_NEXT_VOLUME", gf_cli3_1_get_next_volume},
+ [GLUSTER_CLI_SET_VOLUME] = {"SET_VOLUME", gf_cli3_1_set_volume},
+ [GLUSTER_CLI_ADD_BRICK] = {"ADD_BRICK", gf_cli3_1_add_brick},
+ [GLUSTER_CLI_REMOVE_BRICK] = {"REMOVE_BRICK", gf_cli3_1_remove_brick},
+ [GLUSTER_CLI_REPLACE_BRICK] = {"REPLACE_BRICK", gf_cli3_1_replace_brick},
+ [GLUSTER_CLI_LOG_FILENAME] = {"LOG FILENAME", gf_cli3_1_log_filename},
+ [GLUSTER_CLI_LOG_LOCATE] = {"LOG LOCATE", gf_cli3_1_log_locate},
+ [GLUSTER_CLI_LOG_ROTATE] = {"LOG ROTATE", gf_cli3_1_log_rotate},
+ [GLUSTER_CLI_GETSPEC] = {"GETSPEC", gf_cli3_1_getspec},
+ [GLUSTER_CLI_PMAP_PORTBYBRICK] = {"PMAP PORTBYBRICK", gf_cli3_1_pmap_b2p},
+ [GLUSTER_CLI_SYNC_VOLUME] = {"SYNC_VOLUME", gf_cli3_1_sync_volume},
+ [GLUSTER_CLI_RESET_VOLUME] = {"RESET_VOLUME", gf_cli3_1_reset_volume},
+ [GLUSTER_CLI_FSM_LOG] = {"FSM_LOG", gf_cli3_1_fsm_log},
+ [GLUSTER_CLI_GSYNC_SET] = {"GSYNC_SET", gf_cli3_1_gsync_set},
};
-struct rpc_clnt_program cli3_1_prog = {
- .progname = "CLI 3.1",
- .prognum = GLUSTER3_1_CLI_PROGRAM,
- .progver = GLUSTER3_1_CLI_VERSION,
- .proctable = gluster3_1_cli_actors,
- .numproc = GLUSTER3_1_CLI_PROCCNT,
+struct rpc_clnt_program cli_prog = {
+ .progname = "Gluster CLI",
+ .prognum = GLUSTER_CLI_PROGRAM,
+ .progver = GLUSTER_CLI_VERSION,
+ .numproc = GLUSTER_CLI_PROCCNT,
+ .proctable = gluster_cli_actors,
};
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 7a0d1ab389e..7091101509a 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -101,7 +101,7 @@ struct rpc_clnt *global_rpc;
rpc_clnt_prog_t *cli_rpc_prog;
-extern struct rpc_clnt_program cli3_1_prog;
+extern struct rpc_clnt_program cli_prog;
static error_t
parse_opts (int key, char *arg, struct argp_state *argp_state)
@@ -499,7 +499,7 @@ cli_rpc_init (struct cli_state *state)
this = THIS;
- cli_rpc_prog = &cli3_1_prog;
+ cli_rpc_prog = &cli_prog;
options = dict_new ();
if (!options)
goto out;