You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2012/12/21 07:34:08 UTC

git commit: Populate uuid for uploadVO in create case.

Updated Branches:
  refs/heads/api_refactoring e4dbc2033 -> 290dc7936


Populate uuid for uploadVO in create case.

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

Branch: refs/heads/api_refactoring
Commit: 290dc79366701852fd64127429f6954fea609f7a
Parents: e4dbc20
Author: Min Chen <mi...@citrix.com>
Authored: Thu Dec 20 22:33:43 2012 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Thu Dec 20 22:33:43 2012 -0800

----------------------------------------------------------------------
 core/src/com/cloud/storage/UploadVO.java |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/290dc793/core/src/com/cloud/storage/UploadVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/UploadVO.java b/core/src/com/cloud/storage/UploadVO.java
index 95f66e7..6555517 100755
--- a/core/src/com/cloud/storage/UploadVO.java
+++ b/core/src/com/cloud/storage/UploadVO.java
@@ -17,6 +17,7 @@
 package com.cloud.storage;
 
 import java.util.Date;
+import java.util.UUID;
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -119,6 +120,7 @@ public class UploadVO implements Upload {
 		super();
 		this.hostId = hostId;
 		this.typeId = templateId;
+		this.uuid = UUID.randomUUID().toString();
 	}
 
 	public UploadVO(long hostId, long typeId, Date lastUpdated,
@@ -132,6 +134,7 @@ public class UploadVO implements Upload {
 		this.mode = mode;
 		this.type = type;
 		this.uploadUrl = uploadUrl;
+        this.uuid = UUID.randomUUID().toString();
 	}
 
 	public UploadVO(long hostId, long typeId, Date lastUpdated,
@@ -145,6 +148,8 @@ public class UploadVO implements Upload {
         this.uploadPercent = uploadPercent;
         this.type = type;
         this.mode = mode;
+        this.uuid = UUID.randomUUID().toString();
+
     }
 
 	protected UploadVO() {