def deleteVM(self,vm):
		with MutexStore.getObjectLock(self.getLockIdentifier()):	
			if self.vms.all() not in vm:
				raise Exception("Cannot delete a VM from pool if it is not already in") 
			self.vms.remove(vm)
			# Delete related db entry
			Action.objects.all().filter(objectUUID=vm.uuid).delete()
			# Keep actions table up-to-date after each deletion
			#vm_uuids = [ x.uuid for x in VirtualMachine.objects.all() ]
			#Action.objects.all().exclude(objectUUID__in = vm_uuids).delete()
			vm.destroy()	
			self.autoSave()
dataset/ETHPy150Open fp7-ofelia/ocf/vt_manager/src/python/vt_manager/models/XenServer.py/XenServer.deleteVM/swapped operands of `not in`