diff --git a/tools/burnin b/tools/burnin index fec9a04019b66ad021e066799d2ff141cef7f60f..bf93c72e82c370920115f0b61f3c3966dfb2cfb2 100755 --- a/tools/burnin +++ b/tools/burnin @@ -1,7 +1,7 @@ #!/usr/bin/python # -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc. +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -905,17 +905,21 @@ class Burner(object): @_DoBatch(False) def BurnAddRemoveNICs(self): - """Add and remove an extra NIC for the instances.""" + """Add, change and remove an extra NIC for the instances.""" Log("Adding and removing NICs") for instance in self.instances: Log("instance %s", instance, indent=1) op_add = opcodes.OpInstanceSetParams(\ instance_name=instance, nics=[(constants.DDM_ADD, {})]) + op_chg = opcodes.OpInstanceSetParams(\ + instance_name=instance, nics=[(constants.DDM_MODIFY, + -1, {"mac": constants.VALUE_GENERATE})]) op_rem = opcodes.OpInstanceSetParams(\ instance_name=instance, nics=[(constants.DDM_REMOVE, {})]) Log("adding a NIC", indent=2) + Log("changing a NIC", indent=2) Log("removing last NIC", indent=2) - self.ExecOrQueue(instance, [op_add, op_rem]) + self.ExecOrQueue(instance, [op_add, op_chg, op_rem]) def ConfdCallback(self, reply): """Callback for confd queries"""