Revision df58ca1c lib/client/gnt_instance.py
b/lib/client/gnt_instance.py | ||
---|---|---|
1314 | 1314 |
allowed_values=[constants.VALUE_DEFAULT]) |
1315 | 1315 |
|
1316 | 1316 |
nics = _ConvertNicDiskModifications(opts.nics) |
1317 |
for action, _, __ in nics: |
|
1318 |
if action == constants.DDM_MODIFY and opts.hotplug: |
|
1319 |
usertext = ("You are about to hot-modify a NIC. This will be done" |
|
1320 |
" by removing the exisiting and then adding a new one." |
|
1321 |
" Network connection might be lost. Continue?") |
|
1322 |
if not AskUser(usertext): |
|
1323 |
return 1 |
|
1324 |
|
|
1317 | 1325 |
disks = _ParseDiskSizes(_ConvertNicDiskModifications(opts.disks)) |
1318 | 1326 |
|
1319 | 1327 |
if (opts.disk_template and |
... | ... | |
1333 | 1341 |
op = opcodes.OpInstanceSetParams(instance_name=args[0], |
1334 | 1342 |
nics=nics, |
1335 | 1343 |
disks=disks, |
1344 |
hotplug=opts.hotplug, |
|
1336 | 1345 |
disk_template=opts.disk_template, |
1337 | 1346 |
remote_node=opts.node, |
1338 | 1347 |
pnode=opts.new_primary_node, |
... | ... | |
1355 | 1364 |
ToStdout("Modified instance %s", args[0]) |
1356 | 1365 |
for param, data in result: |
1357 | 1366 |
ToStdout(" - %-5s -> %s", param, data) |
1358 |
ToStdout("Please don't forget that most parameters take effect" |
|
1359 |
" only at the next (re)start of the instance initiated by" |
|
1360 |
" ganeti; restarting from within the instance will" |
|
1361 |
" not be enough.") |
|
1367 |
if not opts.hotplug: |
|
1368 |
ToStdout("Please don't forget that most parameters take effect" |
|
1369 |
" only at the next (re)start of the instance initiated by" |
|
1370 |
" ganeti; restarting from within the instance will" |
|
1371 |
" not be enough.") |
|
1362 | 1372 |
return 0 |
1363 | 1373 |
|
1364 | 1374 |
|
... | ... | |
1540 | 1550 |
[DISK_TEMPLATE_OPT, SINGLE_NODE_OPT, OS_OPT, FORCE_VARIANT_OPT, |
1541 | 1551 |
OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT, NWSYNC_OPT, OFFLINE_INST_OPT, |
1542 | 1552 |
ONLINE_INST_OPT, IGNORE_IPOLICY_OPT, RUNTIME_MEM_OPT, |
1543 |
NOCONFLICTSCHECK_OPT, NEW_PRIMARY_OPT], |
|
1553 |
NOCONFLICTSCHECK_OPT, NEW_PRIMARY_OPT, HOTPLUG_OPT],
|
|
1544 | 1554 |
"<instance>", "Alters the parameters of an instance"), |
1545 | 1555 |
"shutdown": ( |
1546 | 1556 |
GenericManyOps("shutdown", _ShutdownInstance), [ArgInstance()], |
Also available in: Unified diff