mirror of https://github.com/apache/cloudstack.git
return the correct NicProfile after job completion for VPC AddVmToNetwork command
This commit is contained in:
parent
18b5fb5a3c
commit
58c26ee128
|
|
@ -3276,8 +3276,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||
throw (RuntimeException)jobException;
|
||||
else if (jobException instanceof Throwable)
|
||||
throw new RuntimeException("Unexpected exception", (Throwable)jobException);
|
||||
else if (jobException instanceof Long)
|
||||
return requested;
|
||||
else if (jobException instanceof NicProfile)
|
||||
return (NicProfile)jobException;
|
||||
}
|
||||
|
||||
throw new RuntimeException("Unexpected job execution result");
|
||||
|
|
@ -5006,7 +5006,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||
NicProfile nic = orchestrateAddVmToNetwork(vm, network,
|
||||
work.getRequestedNicProfile());
|
||||
|
||||
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, _jobMgr.marshallResultObject(nic.getId()));
|
||||
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, _jobMgr.marshallResultObject(nic));
|
||||
}
|
||||
|
||||
private Pair<JobInfo.Status, String> orchestrateRemoveNicFromVm(VmWorkRemoveNicFromVm work) throws Exception {
|
||||
|
|
|
|||
Loading…
Reference in New Issue