You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2014/03/01 00:37:36 UTC

[16/33] git commit: updated refs/heads/master to 90262a8

return the correct NicProfile after job completion for VPC AddVmToNetwork command


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/58c26ee1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/58c26ee1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/58c26ee1

Branch: refs/heads/master
Commit: 58c26ee128ed0c243e47db884ee4359c19c4abf5
Parents: 18b5fb5
Author: Kelven Yang <ke...@gmail.com>
Authored: Tue Feb 4 16:34:40 2014 -0800
Committer: Kelven Yang <ke...@gmail.com>
Committed: Fri Feb 28 15:35:58 2014 -0800

----------------------------------------------------------------------
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java            | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/58c26ee1/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index e7e49b8..69f92c9 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -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 {