Do not delete VMs in the HOLD state.
If a VM is in the HOLD state do not transition it to the DELETE state. This should allow you to set a VM to the HOLD state before tests have completed and the VM will not be deleted. Change-Id: I8cc0ca408b4ccf5951399e27c0bfc518fa8ebd1d
This commit is contained in:
@@ -33,7 +33,8 @@ def main():
|
||||
db = vmdatabase.VMDatabase()
|
||||
|
||||
machine = db.getMachineByJenkinsName(NODE_NAME)
|
||||
machine.state = vmdatabase.DELETE
|
||||
if machine.state != vmdatabase.HOLD:
|
||||
machine.state = vmdatabase.DELETE
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user