You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2013/05/29 11:54:50 UTC

[49/50] git commit: updated refs/heads/vmware-storage-motion to 004e74d

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Searching for virtual disk during device tear down.


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

Branch: refs/heads/vmware-storage-motion
Commit: 1b66e96d9c6476b6ee18f293a282612bf73645f0
Parents: f3e3aaa
Author: Sateesh Chodapuneedi <sa...@apache.org>
Authored: Wed May 29 15:06:55 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Wed May 29 15:06:55 2013 +0530

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java |    4 +++-
 .../cloud/hypervisor/vmware/mo/DatastoreMO.java    |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b66e96d/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 1baec6c..12924d7 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
@@ -2557,7 +2557,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     Pair<ManagedObjectReference, DatastoreMO> volumeDsDetails = dataStoresDetails.get(vol.getPoolUuid());
                     assert (volumeDsDetails != null);
                     VirtualDevice device;
-                    datastoreDiskPath = String.format("[%s] %s.vmdk", volumeDsDetails.second().getName(), vol.getPath());
+
+                    datastoreDiskPath = volumeDsDetails.second().searchFileInSubFolders(vol.getPath() + ".vmdk", true);
+
                     String chainInfo = vol.getChainInfo();
 
                     if (chainInfo != null && !chainInfo.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b66e96d/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
index b7c8c1b..75553ae 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
@@ -324,7 +324,7 @@ public class DatastoreMO extends BaseMO {
 
     public String searchFileInSubFolders(String fileName, boolean caseInsensitive) throws Exception {
         String datastorePath = "[" + getName() + "]";
-        String rootDirectoryFilePath = String.format("[%s] %s", datastorePath, fileName);
+        String rootDirectoryFilePath = String.format("%s %s", datastorePath, fileName);
         if(fileExists(rootDirectoryFilePath)) {
             return rootDirectoryFilePath;
         }