Revision 9fdc92fa

b/tools/burnin
171 171
  cli.cli_option("--no-reboot", dest="do_reboot",
172 172
                 help="Skip instance reboot", action="store_false",
173 173
                 default=True),
174
  cli.cli_option("--no-renamesame", dest="do_renamesame",
175
                 help="Skip instance rename to same name", action="store_false",
176
                 default=True),
174 177
  cli.cli_option("--reboot-types", dest="reboot_types",
175 178
                 help="Specify the reboot types", default=None),
176 179
  cli.cli_option("--no-activate-disks", dest="do_activate_disks",
......
872 875

  
873 876
  @_DoCheckInstances
874 877
  @_DoBatch(True)
878
  def BurnRenameSame(self):
879
    """Rename the instances to their own name."""
880
    Log("Renaming the instances to their own name")
881
    for instance in self.instances:
882
      Log("instance %s", instance, indent=1)
883
      op1 = self.StopInstanceOp(instance)
884
      op2 = self.RenameInstanceOp(instance, instance)
885
      Log("rename to the same name", indent=2)
886
      op4 = self.StartInstanceOp(instance)
887
      self.ExecOrQueue(instance, [op1, op2, op4])
888

  
889
  @_DoCheckInstances
890
  @_DoBatch(True)
875 891
  def BurnActivateDisks(self):
876 892
    """Activate and deactivate disks of the instances."""
877 893
    Log("Activating/deactivating disks")
......
1074 1090
      if opts.do_reboot:
1075 1091
        self.BurnReboot()
1076 1092

  
1093
      if opts.do_renamesame:
1094
        self.BurnRenameSame()
1095

  
1077 1096
      if opts.do_addremove_disks:
1078 1097
        self.BurnAddRemoveDisks()
1079 1098

  

Also available in: Unified diff