Group operations: CLI code for add/remove/rename a group
[ganeti-local] / man / gnt-group.rst
1 gnt-group(8) Ganeti | Version @GANETI_VERSION@
2 ==============================================
3
4 Name
5 ----
6
7 gnt-group - Ganeti node-group administration
8
9 Synopsis
10 --------
11
12 **gnt-group** {command} [arguments...]
13
14 DESCRIPTION
15 -----------
16
17 The **gnt-group** command is used for node group administration in
18 the Ganeti system.
19
20 COMMANDS
21 --------
22
23 ADD
24 ~~~
25
26 | **add** {*group*}
27
28 Creates a new group with the given name. The node group will be
29 initially empty.
30
31 REMOVE
32 ~~~~~~
33
34 | **remove** {*group*}
35
36 Deletes the indicated node group, which must be empty.
37
38 LIST
39 ~~~~
40
41 | **list** [--no-headers] [--separator=*SEPARATOR*]
42 | [-o *[+]FIELD,...*] [group...]
43
44 Lists all existing node groups in the cluster.
45
46 The ``--no-headers`` option will skip the initial header line. The
47 ``--separator`` option takes an argument which denotes what will be
48 used between the output fields. Both these options are to help
49 scripting.
50
51 The ``-o`` option takes a comma-separated list of output fields.
52 If the value of the option starts with the character ``+``, the new
53 fields will be added to the default list. This allows to quickly
54 see the default list plus a few other fields, instead of retyping
55 the entire list of fields.
56
57 The available fields and their meaning are:
58
59 name
60     the group name
61
62 uuid
63     the group's UUID
64
65 node_cnt
66     the number of nodes in the node group
67
68 node_list
69     the list of nodes that belong to this group
70
71 pinst_cnt
72     the number of primary instances in the group (i.e., the number of
73     primary instances nodes in this group have)
74
75 pinst_list
76     the list of primary instances in the group
77
78 ctime
79     the creation time of the group; note that this field contains spaces
80     and as such it's harder to parse
81
82     if this attribute is not present (e.g. when upgrading from older
83     versions), then "N/A" will be shown instead
84
85 mtime
86     the last modification time of the group; note that this field
87     contains spaces and as such it's harder to parse
88
89 serial_no
90     the so called 'serial number' of the group; this is a numeric field
91     that is incremented each time the node is modified, and it can be
92     used to detect modifications
93
94 If no group names are given, then all groups are included. Otherwise,
95 only the named groups will be listed.
96
97 RENAME
98 ~~~~~~
99
100 | **rename** {*oldname*} {*newname*}
101
102 Renames a given group from *oldname* to *newname*.