cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [1/6] git commit: updated refs/heads/object_store to 8a514ea
Date Wed, 08 May 2013 00:45:23 GMT
Updated Branches:
  refs/heads/object_store 66337e8e9 -> 8a514ea4b


Update template size in VMTemplate table.


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

Branch: refs/heads/object_store
Commit: 8a514ea4b885907502a3c98557343df06b3a982c
Parents: d79b890
Author: Min Chen <min.chen@citrix.com>
Authored: Tue May 7 17:44:46 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Tue May 7 17:45:06 2013 -0700

----------------------------------------------------------------------
 .../driver/CloudStackImageStoreDriverImpl.java     |    4 ++++
 .../datastore/driver/S3ImageStoreDriverImpl.java   |    4 ++++
 .../driver/SwiftImageStoreDriverImpl.java          |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a514ea4/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
index 45c6b8b..8e9572c 100644
--- a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
+++ b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
@@ -188,6 +188,10 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver
{
             updateBuilder.setSize(answer.getTemplateSize());
             updateBuilder.setPhysicalSize(answer.getTemplatePhySicalSize());
             _templateStoreDao.update(tmpltStoreVO.getId(), updateBuilder);
+            // update size in vm_template table
+            VMTemplateVO tmlptUpdater = templateDao.createForUpdate();
+            tmlptUpdater.setSize(answer.getTemplateSize());
+            templateDao.update(obj.getId(), tmlptUpdater);
         }
 
     	AsyncCompletionCallback<CreateCmdResult> caller = context.getParentCallback();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a514ea4/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
index acff2be..b1d2f95 100644
--- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
+++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
@@ -238,6 +238,10 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
             updateBuilder.setSize(answer.getTemplateSize());
             updateBuilder.setPhysicalSize(answer.getTemplatePhySicalSize());
             _templateStoreDao.update(tmpltStoreVO.getId(), updateBuilder);
+            // update size in vm_template table
+            VMTemplateVO tmlptUpdater = templateDao.createForUpdate();
+            tmlptUpdater.setSize(answer.getTemplateSize());
+            templateDao.update(obj.getId(), tmlptUpdater);
         }
 
         AsyncCompletionCallback<CreateCmdResult> caller = context.getParentCallback();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a514ea4/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
index a8fb3b2..bbda45c 100644
--- a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
+++ b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
@@ -191,6 +191,10 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
             updateBuilder.setSize(answer.getTemplateSize());
             updateBuilder.setPhysicalSize(answer.getTemplatePhySicalSize());
             _templateStoreDao.update(tmpltStoreVO.getId(), updateBuilder);
+            // update size in vm_template table
+            VMTemplateVO tmlptUpdater = templateDao.createForUpdate();
+            tmlptUpdater.setSize(answer.getTemplateSize());
+            templateDao.update(obj.getId(), tmlptUpdater);
         }
 
         AsyncCompletionCallback<CreateCmdResult> caller = context.getParentCallback();


Mime
View raw message