Skip to content

Commit

Permalink
fix error in oscar
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Sep 8, 2022
1 parent 7049b3b commit a1be759
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions IM/InfrastructureInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
"""
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion IM/InfrastructureManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions IM/connectors/OSCAR.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a1be759

Please sign in to comment.