From e0f30bb460c00497147edd6f63160237559fc8e6 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 5 Sep 2012 09:50:16 -0700 Subject: [PATCH] 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 --- devstack-vm-delete.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devstack-vm-delete.py b/devstack-vm-delete.py index 443ab93f..4e1080bb 100755 --- a/devstack-vm-delete.py +++ b/devstack-vm-delete.py @@ -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__':