Revision d22dfef7 scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
524 | 524 |
|
525 | 525 |
# second, if requested, ask for an OS |
526 | 526 |
if opts.select_os is True: |
527 |
op = opcodes.OpDiagnoseOS(output_fields=["name", "valid", "variants"], |
|
528 |
names=[]) |
|
527 |
op = opcodes.OpDiagnoseOS(output_fields=["name", "variants"], names=[]) |
|
529 | 528 |
result = SubmitOpCode(op, opts=opts) |
530 | 529 |
|
531 | 530 |
if not result: |
... | ... | |
535 | 534 |
ToStdout("Available OS templates:") |
536 | 535 |
number = 0 |
537 | 536 |
choices = [] |
538 |
for (name, valid, variants) in result: |
|
539 |
if valid: |
|
540 |
for entry in CalculateOSNames(name, variants): |
|
541 |
ToStdout("%3s: %s", number, entry) |
|
542 |
choices.append(("%s" % number, entry, entry)) |
|
543 |
number += 1 |
|
537 |
for (name, variants) in result: |
|
538 |
for entry in CalculateOSNames(name, variants): |
|
539 |
ToStdout("%3s: %s", number, entry) |
|
540 |
choices.append(("%s" % number, entry, entry)) |
|
541 |
number += 1 |
|
544 | 542 |
|
545 | 543 |
choices.append(('x', 'exit', 'Exit gnt-instance reinstall')) |
546 | 544 |
selected = AskUser("Enter OS template number (or x to abort):", |
Also available in: Unified diff