cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [16/33] git commit: updated refs/heads/master to 90262a8
Date Fri, 28 Feb 2014 23:37:36 GMT
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 <kelveny@gmail.com>
Authored: Tue Feb 4 16:34:40 2014 -0800
Committer: Kelven Yang <kelveny@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 {


Mime
View raw message