Skip to content

Commit 58c26ee

Browse files
committed
return the correct NicProfile after job completion for VPC AddVmToNetwork command
1 parent 18b5fb5 commit 58c26ee

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3276,8 +3276,8 @@ else if (jobException instanceof RuntimeException)
32763276
throw (RuntimeException)jobException;
32773277
else if (jobException instanceof Throwable)
32783278
throw new RuntimeException("Unexpected exception", (Throwable)jobException);
3279-
else if (jobException instanceof Long)
3280-
return requested;
3279+
else if (jobException instanceof NicProfile)
3280+
return (NicProfile)jobException;
32813281
}
32823282

32833283
throw new RuntimeException("Unexpected job execution result");
@@ -5006,7 +5006,7 @@ private Pair<JobInfo.Status, String> orchestrateAddVmToNetwork(VmWorkAddVmToNetw
50065006
NicProfile nic = orchestrateAddVmToNetwork(vm, network,
50075007
work.getRequestedNicProfile());
50085008

5009-
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, _jobMgr.marshallResultObject(nic.getId()));
5009+
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, _jobMgr.marshallResultObject(nic));
50105010
}
50115011

50125012
private Pair<JobInfo.Status, String> orchestrateRemoveNicFromVm(VmWorkRemoveNicFromVm work) throws Exception {

0 commit comments

Comments
 (0)