Revision dcbeccd9
b/lib/client/gnt_group.py | ||
---|---|---|
70 | 70 |
diskparams=diskparams, ipolicy=ipolicy, |
71 | 71 |
hv_state=hv_state, |
72 | 72 |
disk_state=disk_state) |
73 |
SubmitOpCode(op, opts=opts)
|
|
73 |
SubmitOrSend(op, opts)
|
|
74 | 74 |
|
75 | 75 |
|
76 | 76 |
def AssignNodes(opts, args): |
... | ... | |
88 | 88 |
|
89 | 89 |
op = opcodes.OpGroupAssignNodes(group_name=group_name, nodes=node_names, |
90 | 90 |
force=opts.force) |
91 |
SubmitOpCode(op, opts=opts)
|
|
91 |
SubmitOrSend(op, opts)
|
|
92 | 92 |
|
93 | 93 |
|
94 | 94 |
def _FmtDict(data): |
... | ... | |
224 | 224 |
""" |
225 | 225 |
(group_name,) = args |
226 | 226 |
op = opcodes.OpGroupRemove(group_name=group_name) |
227 |
SubmitOpCode(op, opts=opts)
|
|
227 |
SubmitOrSend(op, opts)
|
|
228 | 228 |
|
229 | 229 |
|
230 | 230 |
def RenameGroup(opts, args): |
... | ... | |
239 | 239 |
""" |
240 | 240 |
group_name, new_name = args |
241 | 241 |
op = opcodes.OpGroupRename(group_name=group_name, new_name=new_name) |
242 |
SubmitOpCode(op, opts=opts)
|
|
242 |
SubmitOrSend(op, opts)
|
|
243 | 243 |
|
244 | 244 |
|
245 | 245 |
def EvacuateGroup(opts, args): |
... | ... | |
254 | 254 |
iallocator=opts.iallocator, |
255 | 255 |
target_groups=opts.to, |
256 | 256 |
early_release=opts.early_release) |
257 |
result = SubmitOpCode(op, cl=cl, opts=opts)
|
|
257 |
result = SubmitOrSend(op, opts, cl=cl)
|
|
258 | 258 |
|
259 | 259 |
# Keep track of submitted jobs |
260 | 260 |
jex = JobExecutor(cl=cl, opts=opts) |
... | ... | |
277 | 277 |
"add": ( |
278 | 278 |
AddGroup, ARGS_ONE_GROUP, |
279 | 279 |
[DRY_RUN_OPT, ALLOC_POLICY_OPT, NODE_PARAMS_OPT, DISK_PARAMS_OPT, |
280 |
HV_STATE_OPT, DISK_STATE_OPT] + INSTANCE_POLICY_OPTS, |
|
280 |
HV_STATE_OPT, DISK_STATE_OPT, PRIORITY_OPT, |
|
281 |
SUBMIT_OPT] + INSTANCE_POLICY_OPTS, |
|
281 | 282 |
"<group_name>", "Add a new node group to the cluster"), |
282 | 283 |
"assign-nodes": ( |
283 |
AssignNodes, ARGS_ONE_GROUP + ARGS_MANY_NODES, [DRY_RUN_OPT, FORCE_OPT], |
|
284 |
AssignNodes, ARGS_ONE_GROUP + ARGS_MANY_NODES, |
|
285 |
[DRY_RUN_OPT, FORCE_OPT, PRIORITY_OPT, SUBMIT_OPT], |
|
284 | 286 |
"<group_name> <node>...", "Assign nodes to a group"), |
285 | 287 |
"list": ( |
286 | 288 |
ListGroups, ARGS_MANY_GROUPS, |
... | ... | |
295 | 297 |
"modify": ( |
296 | 298 |
SetGroupParams, ARGS_ONE_GROUP, |
297 | 299 |
[DRY_RUN_OPT, SUBMIT_OPT, ALLOC_POLICY_OPT, NODE_PARAMS_OPT, HV_STATE_OPT, |
298 |
DISK_STATE_OPT, DISK_PARAMS_OPT] + INSTANCE_POLICY_OPTS, |
|
300 |
DISK_STATE_OPT, DISK_PARAMS_OPT, PRIORITY_OPT] + INSTANCE_POLICY_OPTS,
|
|
299 | 301 |
"<group_name>", "Alters the parameters of a node group"), |
300 | 302 |
"remove": ( |
301 |
RemoveGroup, ARGS_ONE_GROUP, [DRY_RUN_OPT], |
|
303 |
RemoveGroup, ARGS_ONE_GROUP, [DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT],
|
|
302 | 304 |
"[--dry-run] <group-name>", |
303 | 305 |
"Remove an (empty) node group from the cluster"), |
304 | 306 |
"rename": ( |
305 |
RenameGroup, [ArgGroup(min=2, max=2)], [DRY_RUN_OPT], |
|
307 |
RenameGroup, [ArgGroup(min=2, max=2)], |
|
308 |
[DRY_RUN_OPT, SUBMIT_OPT, PRIORITY_OPT], |
|
306 | 309 |
"[--dry-run] <group-name> <new-name>", "Rename a node group"), |
307 | 310 |
"evacuate": ( |
308 | 311 |
EvacuateGroup, [ArgGroup(min=1, max=1)], |
309 |
[TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT], |
|
312 |
[TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT, SUBMIT_OPT, PRIORITY_OPT],
|
|
310 | 313 |
"[-I <iallocator>] [--to <group>]", |
311 | 314 |
"Evacuate all instances within a group"), |
312 | 315 |
"list-tags": ( |
b/man/gnt-group.rst | ||
---|---|---|
23 | 23 |
ADD |
24 | 24 |
~~~ |
25 | 25 |
|
26 |
| **add** |
|
26 |
| **add** [\--submit]
|
|
27 | 27 |
| [\--node-parameters=*NDPARAMS*] |
28 | 28 |
| [\--alloc-policy=*POLICY*] |
29 | 29 |
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]] |
... | ... | |
71 | 71 |
instance policies on the node group, and are documented in the |
72 | 72 |
**gnt-cluster**(8) man page. |
73 | 73 |
|
74 |
See **ganeti(7)** for a description of ``--submit`` and other common |
|
75 |
options. |
|
76 |
|
|
74 | 77 |
ASSIGN-NODES |
75 | 78 |
~~~~~~~~~~~~ |
76 | 79 |
|
77 | 80 |
| **assign-nodes** |
78 |
| [\--force] |
|
81 |
| [\--force] [\--submit]
|
|
79 | 82 |
| {*group*} {*node*...} |
80 | 83 |
|
81 | 84 |
Assigns one or more nodes to the specified group, moving them from their |
... | ... | |
87 | 90 |
has the primary and secondary nodes in different node groups). You can |
88 | 91 |
force the operation with ``--force``. |
89 | 92 |
|
93 |
See **ganeti(7)** for a description of ``--submit`` and other common |
|
94 |
options. |
|
95 |
|
|
90 | 96 |
MODIFY |
91 | 97 |
~~~~~~ |
92 | 98 |
|
93 |
| **modify** |
|
99 |
| **modify** [\--submit]
|
|
94 | 100 |
| [\--node-parameters=*NDPARAMS*] |
95 | 101 |
| [\--alloc-policy=*POLICY*] |
96 | 102 |
| [\--hypervisor-state *hvstate*] |
... | ... | |
118 | 124 |
instance policies on the node group, and are documented in the |
119 | 125 |
**gnt-cluster**(8) man page. |
120 | 126 |
|
127 |
See **ganeti(7)** for a description of ``--submit`` and other common |
|
128 |
options. |
|
129 |
|
|
121 | 130 |
REMOVE |
122 | 131 |
~~~~~~ |
123 | 132 |
|
124 |
| **remove** {*group*} |
|
133 |
| **remove** [\--submit] {*group*}
|
|
125 | 134 |
|
126 | 135 |
Deletes the indicated node group, which must be empty. There must always be at |
127 | 136 |
least one group, so the last group cannot be removed. |
128 | 137 |
|
138 |
See **ganeti(7)** for a description of ``--submit`` and other common |
|
139 |
options. |
|
140 |
|
|
129 | 141 |
LIST |
130 | 142 |
~~~~ |
131 | 143 |
|
... | ... | |
170 | 182 |
RENAME |
171 | 183 |
~~~~~~ |
172 | 184 |
|
173 |
| **rename** {*oldname*} {*newname*} |
|
185 |
| **rename** [\--submit] {*oldname*} {*newname*}
|
|
174 | 186 |
|
175 | 187 |
Renames a given group from *oldname* to *newname*. |
176 | 188 |
|
189 |
See **ganeti(7)** for a description of ``--submit`` and other common |
|
190 |
options. |
|
191 |
|
|
177 | 192 |
|
178 | 193 |
EVACUATE |
179 | 194 |
~~~~~~~~ |
180 | 195 |
|
181 |
**evacuate** [\--iallocator *NAME*] [\--to *GROUP*...] {*group*} |
|
196 |
**evacuate** [\--submit] [\--iallocator *NAME*] [\--to *GROUP*...] {*group*}
|
|
182 | 197 |
|
183 | 198 |
This command will move all instances out of the given node group. |
184 | 199 |
Instances are placed in a new group by an iallocator, either given on |
... | ... | |
187 | 202 |
If no specific destination groups are specified using ``--to``, all |
188 | 203 |
groups except the evacuated group are considered. |
189 | 204 |
|
205 |
See **ganeti(7)** for a description of ``--submit`` and other common |
|
206 |
options. |
|
207 |
|
|
190 | 208 |
Example:: |
191 | 209 |
|
192 | 210 |
# gnt-group evacuate -I hail --to rack4 rack1 |
Also available in: Unified diff