Revision e557bae9 lib/backend.py

b/lib/backend.py
673 673
  return output
674 674

  
675 675

  
676
def InstanceOsAdd(instance):
676
def InstanceOsAdd(instance, reinstall):
677 677
  """Add an OS to an instance.
678 678

  
679 679
  @type instance: L{objects.Instance}
680 680
  @param instance: Instance whose OS is to be installed
681
  @type reinstall: boolean
682
  @param reinstall: whether this is an instance reinstall
681 683
  @rtype: boolean
682 684
  @return: the success of the operation
683 685

  
......
693 695
              (os_name, os_dir, os_err))
694 696

  
695 697
  create_env = OSEnvironment(instance)
698
  if reinstall:
699
    create_env['INSTANCE_REINSTALL'] = "1"
696 700

  
697 701
  logfile = "%s/add-%s-%s-%d.log" % (constants.LOG_OS_DIR, instance.os,
698 702
                                     instance.name, int(time.time()))

Also available in: Unified diff