Revision 274c7cab lib/client/gnt_instance.py
b/lib/client/gnt_instance.py | ||
---|---|---|
1320 | 1320 |
allowed_values=[constants.VALUE_DEFAULT]) |
1321 | 1321 |
|
1322 | 1322 |
nics = _ConvertNicDiskModifications(opts.nics) |
1323 |
for action, _, __ in nics: |
|
1324 |
if action == constants.DDM_MODIFY and opts.hotplug: |
|
1325 |
usertext = ("You are about to hot-modify a NIC. This will be done" |
|
1326 |
" by removing the exisiting and then adding a new one." |
|
1327 |
" Network connection might be lost. Continue?") |
|
1328 |
if not AskUser(usertext): |
|
1329 |
return 1 |
|
1330 |
|
|
1323 | 1331 |
disks = _ParseDiskSizes(_ConvertNicDiskModifications(opts.disks)) |
1324 | 1332 |
|
1325 | 1333 |
if (opts.disk_template and |
... | ... | |
1339 | 1347 |
op = opcodes.OpInstanceSetParams(instance_name=args[0], |
1340 | 1348 |
nics=nics, |
1341 | 1349 |
disks=disks, |
1350 |
hotplug=opts.hotplug, |
|
1342 | 1351 |
disk_template=opts.disk_template, |
1343 | 1352 |
remote_node=opts.node, |
1344 | 1353 |
pnode=opts.new_primary_node, |
... | ... | |
1361 | 1370 |
ToStdout("Modified instance %s", args[0]) |
1362 | 1371 |
for param, data in result: |
1363 | 1372 |
ToStdout(" - %-5s -> %s", param, data) |
1364 |
ToStdout("Please don't forget that most parameters take effect" |
|
1365 |
" only at the next (re)start of the instance initiated by" |
|
1366 |
" ganeti; restarting from within the instance will" |
|
1367 |
" not be enough.") |
|
1373 |
if not opts.hotplug: |
|
1374 |
ToStdout("Please don't forget that most parameters take effect" |
|
1375 |
" only at the next (re)start of the instance initiated by" |
|
1376 |
" ganeti; restarting from within the instance will" |
|
1377 |
" not be enough.") |
|
1368 | 1378 |
return 0 |
1369 | 1379 |
|
1370 | 1380 |
|
... | ... | |
1546 | 1556 |
[DISK_TEMPLATE_OPT, SINGLE_NODE_OPT, OS_OPT, FORCE_VARIANT_OPT, |
1547 | 1557 |
OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT, NWSYNC_OPT, OFFLINE_INST_OPT, |
1548 | 1558 |
ONLINE_INST_OPT, IGNORE_IPOLICY_OPT, RUNTIME_MEM_OPT, |
1549 |
NOCONFLICTSCHECK_OPT, NEW_PRIMARY_OPT], |
|
1559 |
NOCONFLICTSCHECK_OPT, NEW_PRIMARY_OPT, HOTPLUG_OPT],
|
|
1550 | 1560 |
"<instance>", "Alters the parameters of an instance"), |
1551 | 1561 |
"shutdown": ( |
1552 | 1562 |
GenericManyOps("shutdown", _ShutdownInstance), [ArgInstance()], |
Also available in: Unified diff