diff --git a/IM/InfrastructureInfo.py b/IM/InfrastructureInfo.py index 1ec91fe6b..472126f88 100644 --- a/IM/InfrastructureInfo.py +++ b/IM/InfrastructureInfo.py @@ -312,7 +312,7 @@ def get_vm_list(self): res = [vm for vm in self.vm_list if not vm.destroy] return res - def get_vm(self, str_vm_id, get_destroyed=False): + def get_vm(self, str_vm_id): """ Get the VM with the specified ID (if it is not destroyed) """ @@ -324,7 +324,7 @@ def get_vm(self, str_vm_id, get_destroyed=False): with self._lock: for vm in self.vm_list: if vm.im_id == vm_id: - if not vm.destroy or get_destroyed: + if not vm.destroy: return vm else: raise DeletedVMException() diff --git a/IM/InfrastructureManager.py b/IM/InfrastructureManager.py index 508643e1b..e5c7765c6 100644 --- a/IM/InfrastructureManager.py +++ b/IM/InfrastructureManager.py @@ -1543,7 +1543,7 @@ def CreateInfrastructure(radl_data, auth, async_call=False): all_failed = False error_msg = "" for vmid in vms: - vm = inf.get_vm(vmid, True) + vm = inf.get_vm(vmid) if vm.state == VirtualMachine.FAILED: all_failed = True if vm.error_msg: diff --git a/IM/connectors/OSCAR.py b/IM/connectors/OSCAR.py index 2cbe2347b..7e2ed2bb4 100644 --- a/IM/connectors/OSCAR.py +++ b/IM/connectors/OSCAR.py @@ -188,8 +188,6 @@ def launch(self, inf, radl, requested_radl, num_vm, auth_data): self.log_exception("Error creating OSCAR function: %s." % ex) res.append((False, "%s" % ex)) - res.append((True, vm)) - return res def finalize(self, vm, last, auth_data):