cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [2/2] git commit: updated refs/heads/object_store to 235825d
Date Tue, 21 May 2013 23:51:42 GMT
Properly updated destroyed column in template_store_ref and
volume_store_ref in deleting template or volume.

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

Branch: refs/heads/object_store
Commit: 235825dc337978cf97f59ea689feab44072adc32
Parents: f5732fe
Author: Min Chen <min.chen@citrix.com>
Authored: Tue May 21 16:51:12 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Tue May 21 16:51:12 2013 -0700

----------------------------------------------------------------------
 .../storage/image/db/TemplateDataStoreDaoImpl.java |    3 +++
 .../storage/image/db/VolumeDataStoreDaoImpl.java   |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/235825dc/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
index d41733d..a90a2f6 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
@@ -136,6 +136,9 @@ public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO
         UpdateBuilder builder = getUpdateBuilder(dataObj);
         builder.set(dataObj, "state", nextState);
         builder.set(dataObj, "updated", new Date());
+        if (nextState == State.Destroyed){
+            builder.set(dataObj, "destroyed", true);
+        }
 
         int rows = update(dataObj, sc);
         if (rows == 0 && s_logger.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/235825dc/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
index c144b36..96cfc91 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
@@ -93,6 +93,9 @@ public class VolumeDataStoreDaoImpl extends GenericDaoBase<VolumeDataStoreVO,
Lo
         UpdateBuilder builder = getUpdateBuilder(dataObj);
         builder.set(dataObj, "state", nextState);
         builder.set(dataObj, "updated", new Date());
+        if (nextState == State.Destroyed){
+            builder.set(dataObj, "destroyed", true);
+        }
 
         int rows = update(dataObj, sc);
         if (rows == 0 && s_logger.isDebugEnabled()) {


Mime
View raw message