diff options
Diffstat (limited to 'rpc/xdr/src/cli1-xdr.x')
| -rw-r--r-- | rpc/xdr/src/cli1-xdr.x | 385 |
1 files changed, 54 insertions, 331 deletions
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x index 9e5dd80af..f9d29b7e1 100644 --- a/rpc/xdr/src/cli1-xdr.x +++ b/rpc/xdr/src/cli1-xdr.x @@ -3,21 +3,19 @@ GF_DEFRAG_CMD_STOP, GF_DEFRAG_CMD_STATUS, GF_DEFRAG_CMD_START_LAYOUT_FIX, - GF_DEFRAG_CMD_START_MIGRATE_DATA, - GF_DEFRAG_CMD_START_MIGRATE_DATA_FORCE, GF_DEFRAG_CMD_START_FORCE /* used by remove-brick data migration */ } ; enum gf_defrag_status_t { GF_DEFRAG_STATUS_NOT_STARTED, - GF_DEFRAG_STATUS_LAYOUT_FIX_STARTED, - GF_DEFRAG_STATUS_MIGRATE_DATA_STARTED, + GF_DEFRAG_STATUS_STARTED, GF_DEFRAG_STATUS_STOPPED, GF_DEFRAG_STATUS_COMPLETE, GF_DEFRAG_STATUS_FAILED, + GF_DEFRAG_STATUS_LAYOUT_FIX_STARTED, + GF_DEFRAG_STATUS_LAYOUT_FIX_STOPPED, GF_DEFRAG_STATUS_LAYOUT_FIX_COMPLETE, - GF_DEFRAG_STATUS_MIGRATE_DATA_COMPLETE, - GF_DEFRAG_STATUS_PAUSED + GF_DEFRAG_STATUS_LAYOUT_FIX_FAILED } ; enum gf1_cluster_type { @@ -41,8 +39,7 @@ GF_OP_CMD_NONE = 0, GF_OP_CMD_START, GF_OP_CMD_COMMIT, - GF_OP_CMD_PAUSE, - GF_OP_CMD_ABORT, + GF_OP_CMD_STOP, GF_OP_CMD_STATUS, GF_OP_CMD_COMMIT_FORCE } ; @@ -58,7 +55,8 @@ enum gf_quota_type { }; enum gf1_cli_friends_list { - GF_CLI_LIST_ALL = 1 + GF_CLI_LIST_PEERS = 1, + GF_CLI_LIST_POOL_NODES = 2 } ; enum gf1_cli_get_volume { @@ -81,7 +79,9 @@ enum gf1_cli_gsync_set { GF_GSYNC_OPTION_TYPE_STOP, GF_GSYNC_OPTION_TYPE_CONFIG, GF_GSYNC_OPTION_TYPE_STATUS, - GF_GSYNC_OPTION_TYPE_ROTATE + GF_GSYNC_OPTION_TYPE_ROTATE, + GF_GSYNC_OPTION_TYPE_CREATE, + GF_GSYNC_OPTION_TYPE_DELETE }; enum gf1_cli_stats_op { @@ -103,28 +103,54 @@ enum gf1_cli_top_op { GF_CLI_TOP_WRITE_PERF }; - struct gf1_cli_probe_req { - string hostname<>; - int port; -} ; - - struct gf1_cli_probe_rsp { - int op_ret; - int op_errno; - int port; - string hostname<>; -} ; - - struct gf1_cli_deprobe_req { - string hostname<>; - int port; - int flags; +/* The unconventional hex numbers help us perform + bit-wise operations which reduces complexity */ +enum gf_cli_status_type { + GF_CLI_STATUS_NONE = 0x0000, + GF_CLI_STATUS_MEM = 0x0001, /*0000000000001*/ + GF_CLI_STATUS_CLIENTS = 0x0002, /*0000000000010*/ + GF_CLI_STATUS_INODE = 0x0004, /*0000000000100*/ + GF_CLI_STATUS_FD = 0x0008, /*0000000001000*/ + GF_CLI_STATUS_CALLPOOL = 0x0010, /*0000000010000*/ + GF_CLI_STATUS_DETAIL = 0x0020, /*0000000100000*/ + GF_CLI_STATUS_TASKS = 0x0040, /*0000001000000*/ + GF_CLI_STATUS_MASK = 0x00FF, /*0000011111111 Used to get the op*/ + GF_CLI_STATUS_VOL = 0x0100, /*0000100000000*/ + GF_CLI_STATUS_ALL = 0x0200, /*0001000000000*/ + GF_CLI_STATUS_BRICK = 0x0400, /*0010000000000*/ + GF_CLI_STATUS_NFS = 0x0800, /*0100000000000*/ + GF_CLI_STATUS_SHD = 0x1000 /*1000000000000*/ +}; + +/* Identifiers for snapshot clis */ +enum gf1_cli_snapshot { + GF_SNAP_OPTION_TYPE_NONE = 0, + GF_SNAP_OPTION_TYPE_CREATE, + GF_SNAP_OPTION_TYPE_DELETE, + GF_SNAP_OPTION_TYPE_RESTORE, + GF_SNAP_OPTION_TYPE_START, + GF_SNAP_OPTION_TYPE_STOP, + GF_SNAP_OPTION_TYPE_LIST, + GF_SNAP_OPTION_TYPE_STATUS, + GF_SNAP_OPTION_TYPE_CONFIG +}; + +enum gf1_cli_snapshot_config { + GF_SNAP_CONFIG_TYPE_NONE = 0, + GF_SNAP_CONFIG_TYPE_SET, + GF_SNAP_CONFIG_DISPLAY, + +}; + + struct gf_cli_req { + opaque dict<>; } ; - struct gf1_cli_deprobe_rsp { + struct gf_cli_rsp { int op_ret; int op_errno; - string hostname<>; + string op_errstr<>; + opaque dict<>; } ; struct gf1_cli_peer_list_req { @@ -138,221 +164,6 @@ struct gf1_cli_peer_list_rsp { opaque friends<>; } ; -struct gf1_cli_get_vol_req { - int flags; - opaque dict<>; -} ; - -struct gf1_cli_get_vol_rsp { - int op_ret; - int op_errno; - opaque volumes<>; -} ; - - struct gf1_cli_create_vol_req { - string volname<>; - gf1_cluster_type type; - int count; - opaque bricks<>; -} ; - - struct gf1_cli_create_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; -} ; - - struct gf1_cli_delete_vol_req { - string volname<>; -} ; - - struct gf1_cli_delete_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; -} ; - - struct gf1_cli_start_vol_req { - string volname<>; - int flags; -} ; - - - struct gf1_cli_start_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; -} ; - - struct gf1_cli_stop_vol_req { - string volname<>; - int flags; -} ; - - - struct gf1_cli_stop_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; -} ; - - - struct gf1_cli_rename_vol_req { - string old_volname<>; - string new_volname<>; -} ; - - struct gf1_cli_rename_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_defrag_vol_req { - int cmd; - string volname<>; -} ; - - struct gf1_cli_defrag_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - unsigned hyper files; - unsigned hyper size; - unsigned hyper lookedup_files; -} ; - - - struct gf2_cli_defrag_vol_rsp { - int op_ret; - int op_errno; - string op_errstr<>; - string volname<>; - unsigned hyper files; - unsigned hyper size; - unsigned hyper lookedup_files; -} ; - - struct gf1_cli_add_brick_req { - string volname<>; - int count; - opaque bricks<>; -} ; - - struct gf1_cli_add_brick_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; -} ; - - struct gf1_cli_remove_brick_req { - string volname<>; - int count; - opaque bricks<>; -} ; - - - struct gf1_cli_remove_brick_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; -} ; - - struct gf1_cli_replace_brick_req { - string volname<>; - gf1_cli_replace_op op; - opaque bricks<>; -} ; - - struct gf1_cli_replace_brick_rsp { - int op_ret; - int op_errno; - string op_errstr<>; - string volname<>; - string status<>; -} ; - -struct gf1_cli_reset_vol_req { - string volname<>; - opaque dict<>; -} ; - - - struct gf1_cli_reset_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; -} ; - - - -struct gf1_cli_set_vol_req { - string volname<>; - opaque dict<>; -} ; - - - struct gf1_cli_set_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; - opaque dict<>; -} ; - -struct gf1_cli_log_filename_req { - string volname<>; - string brick<>; - string path<>; -}; - -struct gf1_cli_log_filename_rsp { - int op_ret; - int op_errno; - string errstr<>; -}; - -struct gf1_cli_log_locate_req { - string volname<>; - string brick<>; -}; - -struct gf1_cli_sync_volume_req { - int flags; - string volname<>; - string hostname<>; -}; - -struct gf1_cli_log_locate_rsp { - int op_ret; - int op_errno; - string path<>; -}; - -struct gf1_cli_log_rotate_req { - string volname<>; - string brick<>; -}; - -struct gf1_cli_log_rotate_rsp { - int op_ret; - int op_errno; - string errstr<>; -}; - -struct gf1_cli_sync_volume_rsp { - int op_ret; - int op_errno; - string op_errstr<>; -}; - struct gf1_cli_fsm_log_req { string name<>; }; @@ -364,45 +175,6 @@ struct gf1_cli_fsm_log_rsp { opaque fsm_log<>; }; -struct gf1_cli_gsync_set_req { - opaque dict<>; -}; - -struct gf1_cli_gsync_set_rsp { - int op_ret; - int op_errno; - string op_errstr<>; - int type; - opaque dict<>; -}; - -struct gf1_cli_stats_volume_req { - string volname<>; - gf1_cli_stats_op op; - opaque dict_req<>; -}; - -struct gf1_cli_stats_volume_rsp { - int op_ret; - int op_errno; - string op_errstr<>; - opaque stats_info<>; -}; - -struct gf1_cli_quota_req { - string volname<>; - opaque dict<>; -} ; - -struct gf1_cli_quota_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; - string limit_list<>; - gf_quota_type type; -}; - struct gf1_cli_getwd_req { int unused; } ; @@ -413,30 +185,6 @@ struct gf1_cli_getwd_rsp { string wd<>; }; -struct gf1_cli_log_level_req { - string volname<>; - string xlator<>; - string loglevel<>; -}; - -struct gf1_cli_log_level_rsp { - int op_ret; - int op_errno; - string op_errstr<>; -}; - -struct gf1_cli_status_volume_req { - string volname<>; - opaque dict<>; -}; - -struct gf1_cli_status_volume_rsp { - int op_ret; - int op_errno; - string op_errstr<>; - opaque dict<>; -}; - struct gf1_cli_mount_req { string label<>; opaque dict<>; @@ -457,28 +205,3 @@ struct gf1_cli_umount_rsp { int op_ret; int op_errno; }; - -struct gf1_cli_heal_vol_req { - string volname<>; -} ; - -struct gf1_cli_heal_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; - opaque dict<>; -}; -struct gf1_cli_statedump_vol_req { - string volname<>; - string options<>; - int option_cnt; -}; - -struct gf1_cli_statedump_vol_rsp { - int op_ret; - int op_errno; - string volname<>; - string op_errstr<>; - opaque dict<>; -}; |
