aboutsummaryrefslogtreecommitdiff
path: root/src/lschvol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lschvol.c')
-rw-r--r--src/lschvol.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/lschvol.c b/src/lschvol.c
new file mode 100644
index 0000000..28e7dc2
--- /dev/null
+++ b/src/lschvol.c
@@ -0,0 +1,68 @@
1/* This file is part of Eclat.
2 Copyright (C) 2018 Sergey Poznyakoff.
3
4 Eclat is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 Eclat is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with Eclat. If not, see <http://www.gnu.org/licenses/>. */
16
17#include "eclat.h"
18
19static char *modification_state_enum[] = {
20 "modifying",
21 "optimizing",
22 "completed",
23 "failed",
24 NULL
25};
26
27static char *volume_type_enum[] = {
28 "standard",
29 "io1",
30 "gp2",
31 "sc1",
32 "st1",
33 NULL
34};
35
36static struct filter_descr filters[] = {
37 { "volume-id", FILTER_STRING },
38 { "modification-state", FILTER_ENUM, modification_state_enum },
39 { "target-size", FILTER_INT },
40 { "target-iops", FILTER_INT },
41 { "target-volume-type", FILTER_ENUM, volume_type_enum },
42 { "original-size", FILTER_INT },
43 { "original-iops", FILTER_INT },
44 { "original-volume-type", FILTER_ENUM, volume_type_enum },
45 { "start-time", FILTER_DATE },
46 { NULL }
47};
48
49int
50eclat_describe_volumes_modifications(eclat_command_env_t *env, int argc,
51 char **argv)
52{
53 int i;
54
55 available_filters = filters;
56 generic_proginfo->print_help_hook = list_filters;
57 generic_proginfo->args_doc = "[FILTER...] [ID...]";
58 generic_parse_options(env->cmd,
59 "describe current modifications status of EBS volumes",
60 argc, argv, &i);
61 argv += i;
62 argc -= i;
63 translate_ids(argc, argv, MAP_VOLUME);
64
65 describe_request_create(env, argc, argv, "VolumeId");
66 return 0;
67}
68

Return to:

Send suggestions and report system problems to the System administrator.