cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [3/3] git commit: updated refs/heads/object_store to 9777e56
Date Mon, 13 May 2013 22:52:10 GMT
Update built-in template size in vm_template table.


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

Branch: refs/heads/object_store
Commit: 9777e56e8ea4518d8853e49bc08d8c482490a45d
Parents: dafe265
Author: Min Chen <min.chen@citrix.com>
Authored: Mon May 13 15:45:47 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon May 13 15:46:01 2013 -0700

----------------------------------------------------------------------
 .../storage/image/TemplateServiceImpl.java         |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9777e56e/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index a34d2ac..7419e9f 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -305,6 +305,10 @@ public class TemplateServiceImpl implements TemplateService {
                         tmpltStore.setSize(tmpltInfo.getSize());
                         tmpltStore.setPhysicalSize(tmpltInfo.getPhysicalSize());
                         tmpltStore.setLastUpdated(new Date());
+                        // update size in vm_template table
+                        VMTemplateVO tmlpt = _templateDao.findById(tmplt.getId());
+                        tmlpt.setSize(tmpltInfo.getSize());
+                        _templateDao.update(tmplt.getId(), tmlpt);
 
                         if (tmpltInfo.getSize() > 0) {
                             long accountId = tmplt.getAccountId();


Mime
View raw message