Revision e221ade2 snf-cyclades-app/synnefo/logic/backend.py

b/snf-cyclades-app/synnefo/logic/backend.py
236 236
    if not action in [x[0] for x in VirtualMachine.ACTIONS]:
237 237
        raise VirtualMachine.InvalidActionError(action)
238 238

  
239
    # No actions to deleted and no actions beside destroy to suspended VMs
239
    # No actions to deleted VMs
240 240
    if vm.deleted:
241 241
        raise VirtualMachine.DeletedError
242 242

  
......
250 250
    vm.backendjobstatus = None
251 251
    vm.backendlogmsg = None
252 252

  
253
    # Update the relevant flags if the VM is being suspended or destroyed.
254
    # Do not set the deleted flag here, see ticket #721.
255
    #
256
    # The deleted flag is set asynchronously, when an OP_INSTANCE_REMOVE
257
    # completes successfully. Hence, a server may be visible for some time
258
    # after a DELETE /servers/id returns HTTP 204.
259
    #
260
    if action == "DESTROY":
261
        # vm.deleted = True
262
        pass
263
    elif action == "SUSPEND":
264
        vm.suspended = True
265
    elif action == "START":
266
        vm.suspended = False
267

  
268 253
    vm.save()
269 254

  
270 255

  

Also available in: Unified diff