diff --git a/tools/burnin b/tools/burnin index d2dd0def646ddaea2844030e7d3ea885f37efeeb..30f34bf722f606679171bc7624902c0a1c7aa488 100755 --- a/tools/burnin +++ b/tools/burnin @@ -171,6 +171,9 @@ OPTIONS = [ cli.cli_option("--no-reboot", dest="do_reboot", help="Skip instance reboot", action="store_false", default=True), + cli.cli_option("--no-renamesame", dest="do_renamesame", + help="Skip instance rename to same name", action="store_false", + default=True), cli.cli_option("--reboot-types", dest="reboot_types", help="Specify the reboot types", default=None), cli.cli_option("--no-activate-disks", dest="do_activate_disks", @@ -870,6 +873,19 @@ class Burner(object): ops.append(op) self.ExecOrQueue(instance, ops) + @_DoCheckInstances + @_DoBatch(True) + def BurnRenameSame(self): + """Rename the instances to their own name.""" + Log("Renaming the instances to their own name") + for instance in self.instances: + Log("instance %s", instance, indent=1) + op1 = self.StopInstanceOp(instance) + op2 = self.RenameInstanceOp(instance, instance) + Log("rename to the same name", indent=2) + op4 = self.StartInstanceOp(instance) + self.ExecOrQueue(instance, [op1, op2, op4]) + @_DoCheckInstances @_DoBatch(True) def BurnActivateDisks(self): @@ -1074,6 +1090,9 @@ class Burner(object): if opts.do_reboot: self.BurnReboot() + if opts.do_renamesame: + self.BurnRenameSame() + if opts.do_addremove_disks: self.BurnAddRemoveDisks()