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/30 13:22:51 UTC

[20/50] [abbrv] git commit: updated refs/heads/vmware-storage-motion to 406785b

    Don't use volume name as snapshot name because volume name may incude space, \ and other special character, which cannot be part of path name in vmware
         after this commit, snapshot name is volumeUuid_timestring.


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

Branch: refs/heads/vmware-storage-motion
Commit: a4d428434daa64221771597985cefa5f70741b96
Parents: 3ae00f4
Author: Anthony Xu <an...@citrix.com>
Authored: Wed May 29 15:10:49 2013 -0700
Committer: Anthony Xu <an...@citrix.com>
Committed: Wed May 29 15:10:49 2013 -0700

----------------------------------------------------------------------
 .../storage/snapshot/SnapshotManagerImpl.java      |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4d42843/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index 26aae48..92d80ee 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -1033,12 +1033,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
         // Snapshot Name: VMInstancename + volumeName + timeString
         String timeString = DateUtil.getDateDisplayString(DateUtil.GMT_TIMEZONE, new Date(), DateUtil.YYYYMMDD_FORMAT);
 
-        VMInstanceVO vmInstance = _vmDao.findById(volume.getInstanceId());
-        String vmDisplayName = "detached";
-        if (vmInstance != null) {
-            vmDisplayName = vmInstance.getHostName();
-        }
-        String snapshotName = vmDisplayName + "_" + volume.getName() + "_" + timeString;
+        String snapshotName = volume.getUuid() + "_" + timeString;
 
         // Create the Snapshot object and save it so we can return it to the
         // user