Revision f86426f5 lib/client/gnt_instance.py

b/lib/client/gnt_instance.py
443 443
      return 1
444 444

  
445 445
    os_name = selected
446
    os_msg = "change the OS to '%s'" % selected
446 447
  else:
447 448
    os_name = opts.os
449
    if opts.os is not None:
450
      os_msg = "change the OS to '%s'" % os_name
451
    else:
452
      os_msg = "keep the same OS"
448 453

  
449 454
  # third, get confirmation: multi-reinstall requires --force-multi,
450 455
  # single-reinstall either --force or --force-multi (--force-multi is
451 456
  # a stronger --force)
452 457
  multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1
453 458
  if multi_on:
454
    warn_msg = "Note: this will remove *all* data for the below instances!\n"
459
    warn_msg = ("Note: this will remove *all* data for the"
460
                " below instances! It will %s.\n" % os_msg)
455 461
    if not (opts.force_multi or
456 462
            ConfirmOperation(inames, "instances", "reinstall", extra=warn_msg)):
457 463
      return 1
458 464
  else:
459 465
    if not (opts.force or opts.force_multi):
460
      usertext = ("This will reinstall the instance %s and remove"
461
                  " all data. Continue?") % inames[0]
466
      usertext = ("This will reinstall the instance '%s' (and %s) which"
467
                  " removes all data. Continue?") % (inames[0], os_msg)
462 468
      if not AskUser(usertext):
463 469
        return 1
464 470

  

Also available in: Unified diff