Commit 8ce304c8 authored by Vangelis Koukis's avatar Vangelis Koukis
Browse files

Allow destroying machines being built

parent 084f5cde
......@@ -52,8 +52,9 @@ def start_action(vm, action):
# No actions to deleted and no actions beside destroy to suspended VMs
if vm.deleted:
raise VirtualMachine.DeletedError
if vm.operstate == 'BUILD':
# No actions to machines being built. They may be destroyed, however.
if vm.operstate == 'BUILD' and action != 'DESTROY':
raise VirtualMachine.BuildingError
vm.action = action
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment