Revision d0834de3 scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
111 | 111 |
if not opts._ask_user(usertext): |
112 | 112 |
return 1 |
113 | 113 |
|
114 |
op = opcodes.OpReinstallInstance(instance_name=instance_name) |
|
114 |
op = opcodes.OpReinstallInstance(instance_name=instance_name, |
|
115 |
os_type=opts.os) |
|
115 | 116 |
SubmitOpCode(op) |
116 | 117 |
|
117 | 118 |
return 0 |
... | ... | |
421 | 422 |
node_opt = make_option("-n", "--node", dest="node", help="Target node", |
422 | 423 |
metavar="<node>") |
423 | 424 |
|
425 |
os_opt = cli_option("-o", "--os-type", dest="os", help="What OS to run", |
|
426 |
metavar="<os>"), |
|
427 |
|
|
424 | 428 |
# this is defined separately due to readability only |
425 | 429 |
add_opts = [ |
426 | 430 |
DEBUG_OPT, |
... | ... | |
429 | 433 |
default=20 * 1024, type="unit", metavar="<size>"), |
430 | 434 |
cli_option("--swap-size", dest="swap", help="Swap size", |
431 | 435 |
default=4 * 1024, type="unit", metavar="<size>"), |
432 |
cli_option("-o", "--os-type", dest="os", help="What OS to run", |
|
433 |
metavar="<os>"), |
|
436 |
os_opt, |
|
434 | 437 |
cli_option("-m", "--memory", dest="mem", help="Memory size", |
435 | 438 |
default=128, type="unit", metavar="<mem>"), |
436 | 439 |
make_option("-p", "--cpu", dest="vcpus", help="Number of virtual CPUs", |
... | ... | |
480 | 483 |
'list': (ListInstances, ARGS_NONE, |
481 | 484 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT], |
482 | 485 |
"", "Lists the instances and their status"), |
483 |
'reinstall': (ReinstallInstance, ARGS_ONE, [DEBUG_OPT, FORCE_OPT], |
|
486 |
'reinstall': (ReinstallInstance, ARGS_ONE, [DEBUG_OPT, FORCE_OPT, os_opt],
|
|
484 | 487 |
"[-f] <instance>", "Reinstall the instance"), |
485 | 488 |
'remove': (RemoveInstance, ARGS_ONE, [DEBUG_OPT, FORCE_OPT], |
486 | 489 |
"[-f] <instance>", "Shuts down the instance and removes it"), |
Also available in: Unified diff