cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/master to e60037c
Date Mon, 04 Nov 2013 22:38:09 GMT
Updated Branches:
  refs/heads/master eb9cfffd2 -> e60037cb8


Remove primarydatastoreTo in vmwareresource


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

Branch: refs/heads/master
Commit: e60037cb80a3f3e65ac44e0e1029e399e7df1fce
Parents: eb9cfff
Author: Edison Su <sudison@gmail.com>
Authored: Mon Nov 4 14:36:49 2013 -0800
Committer: Edison Su <sudison@gmail.com>
Committed: Mon Nov 4 14:37:24 2013 -0800

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e60037cb/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index a205fb6..f6f84f6 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -113,7 +113,6 @@ import org.apache.cloudstack.engine.orchestration.VolumeOrchestrator;
 import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
 import org.apache.cloudstack.storage.command.DeleteCommand;
 import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
-import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.TemplateObjectTO;
 import org.apache.cloudstack.storage.to.VolumeObjectTO;
 
@@ -2513,7 +2512,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
         for (DiskTO vol : disks) {
             if (vol.getType() != Volume.Type.ISO) {
                 VolumeObjectTO volumeTO = (VolumeObjectTO)vol.getData();
-                PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)volumeTO.getDataStore();
+                DataStoreTO primaryStore = volumeTO.getDataStore();
                 if (primaryStore.getUuid() != null && !primaryStore.getUuid().isEmpty())
{
                     validatedDisks.add(vol);
                 }
@@ -2673,7 +2672,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
                     Pair<ManagedObjectReference, DatastoreMO> rootDiskDataStoreDetails
= null;
                     for (DiskTO vol : disks) {
                         if (vol.getType() == Volume.Type.ROOT) {
-                            PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)vol.getData().getDataStore();
+                            DataStoreTO primaryStore = vol.getData().getDataStore();
                             rootDiskDataStoreDetails = dataStoresDetails.get(primaryStore.getUuid());
                         }
                     }
@@ -2832,7 +2831,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
                     deviceConfigSpecArray[i] = new VirtualDeviceConfigSpec();
                     
 	                VolumeObjectTO volumeTO = (VolumeObjectTO)vol.getData();
-	                PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)volumeTO.getDataStore();
+	                DataStoreTO primaryStore = volumeTO.getDataStore();
 	                Pair<ManagedObjectReference, DatastoreMO> volumeDsDetails = dataStoresDetails.get(primaryStore.getUuid());
 	                assert (volumeDsDetails != null);
 	                
@@ -2984,7 +2983,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
     	) throws Exception {
     	
         VolumeObjectTO volumeTO = (VolumeObjectTO)vol.getData();
-        PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)volumeTO.getDataStore();
+        DataStoreTO primaryStore = volumeTO.getDataStore();
         Map<String, String> details = vol.getDetails();
         boolean isManaged = details != null && Boolean.parseBoolean(details.get(DiskTO.MANAGED));
 
@@ -3431,7 +3430,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
         for (DiskTO vol : disks) {
             if (vol.getType() != Volume.Type.ISO) {
                 VolumeObjectTO volumeTO = (VolumeObjectTO)vol.getData();
-                PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)volumeTO.getDataStore();
+                DataStoreTO primaryStore = volumeTO.getDataStore();
                 String poolUuid = primaryStore.getUuid();
                 if(poolMors.get(poolUuid) == null) {
                     boolean isManaged = false;
@@ -3462,7 +3461,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
     	Pair<ManagedObjectReference, DatastoreMO> rootDiskDataStoreDetails = null;
         for (DiskTO vol : disks) {
             if (vol.getType() == Volume.Type.ROOT) {
-                PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)vol.getData().getDataStore();
+                DataStoreTO primaryStore = vol.getData().getDataStore();
                 rootDiskDataStoreDetails = dataStoresDetails.get(primaryStore.getUuid());
             }
         }
@@ -5456,11 +5455,11 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
             VmwareContext context = getServiceContext();
             VmwareHypervisorHost hyperHost = getHyperHost(context);
             VolumeObjectTO vol = (VolumeObjectTO)cmd.getData();
-            PrimaryDataStoreTO store = (PrimaryDataStoreTO)vol.getDataStore();
+            DataStoreTO store = vol.getDataStore();
 
             ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(hyperHost,
store.getUuid());
             if (morDs == null) {
-                String msg = "Unable to find datastore based on volume mount point " + store.getPath();
+                String msg = "Unable to find datastore based on volume mount point " + store.getUrl();
                 s_logger.error(msg);
                 throw new Exception(msg);
             }


Mime
View raw message