cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [15/35] git commit: refs/heads/ui-multiple-nics - CLOUDSTACK-1634 VMSnapshot: CreateVMSnapshotCmd fails due to due to java.util.ArrayList cannot be cast to [Lcom.vmware.vim25.ManagedObjectReference
Date Wed, 13 Mar 2013 17:13:56 GMT
CLOUDSTACK-1634 VMSnapshot: CreateVMSnapshotCmd fails due to due to java.util.ArrayList cannot
be cast to [Lcom.vmware.vim25.ManagedObjectReference


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

Branch: refs/heads/ui-multiple-nics
Commit: c98244f75d05263a6c305bdd901d81a9306f1f15
Parents: 9af338c
Author: Mice Xia <mice_xia@tcloudcomputing.com>
Authored: Tue Mar 12 20:34:30 2013 +0800
Committer: Mice Xia <mice_xia@tcloudcomputing.com>
Committed: Tue Mar 12 20:37:02 2013 +0800

----------------------------------------------------------------------
 .../vmware/manager/VmwareStorageManagerImpl.java   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c98244f7/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
index 8be76e8..e11dd53 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
@@ -21,6 +21,7 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.OutputStreamWriter;
 import java.rmi.RemoteException;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -915,7 +916,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager
{
 
             // wait if there are already VM snapshot task running
             ManagedObjectReference taskmgr = context.getServiceContent().getTaskManager();
-            ManagedObjectReference[] tasks =  (ManagedObjectReference[]) context.getVimClient().getDynamicProperty(taskmgr,
"recentTask");
+            List<ManagedObjectReference> tasks = (ArrayList<ManagedObjectReference>)context.getVimClient().getDynamicProperty(taskmgr,
"recentTask");
             for (ManagedObjectReference taskMor : tasks) {
                 TaskInfo info = (TaskInfo) (context.getVimClient().getDynamicProperty(taskMor,
"info"));
                 if(info.getEntityName().equals(cmd.getVmName()) && info.getName().equalsIgnoreCase("CreateSnapshot_Task")){
@@ -1048,7 +1049,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager
{
 
             // wait if there are already VM revert task running
             ManagedObjectReference taskmgr = context.getServiceContent().getTaskManager();
-            ManagedObjectReference[] tasks =  (ManagedObjectReference[]) context.getVimClient().getDynamicProperty(taskmgr,
"recentTask");
+            List<ManagedObjectReference> tasks = (ArrayList<ManagedObjectReference>)context.getVimClient().getDynamicProperty(taskmgr,
"recentTask");
             for (ManagedObjectReference taskMor : tasks) {
                 TaskInfo info = (TaskInfo) (context.getVimClient().getDynamicProperty(taskMor,
"info"));
                 if(info.getEntityName().equals(cmd.getVmName()) && info.getName().equalsIgnoreCase("RevertToSnapshot_Task")){


Mime
View raw message