cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From likit...@apache.org
Subject git commit: updated refs/heads/4.2 to 4c924bb
Date Tue, 16 Jul 2013 08:43:44 GMT
Updated Branches:
  refs/heads/4.2 d0955663c -> 4c924bb83


Revert "CLOUDSTACK-3293. DeleteAccount fails with ConstraintViolation on snapshot_store_ref."

This reverts commit d0955663cf0324afda52765801033f92b94bf52f.


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

Branch: refs/heads/4.2
Commit: 4c924bb83ddfe01512351b202cfa021319148b1e
Parents: d095566
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Tue Jul 16 14:09:43 2013 +0530
Committer: Likitha Shetty <likitha.shetty@citrix.com>
Committed: Tue Jul 16 14:09:43 2013 +0530

----------------------------------------------------------------------
 .../com/cloud/storage/snapshot/SnapshotManagerImpl.java   | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4c924bb8/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 2c9ef82..a67316f 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -676,15 +676,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
             // Either way delete the snapshots for this volume.
             List<SnapshotVO> snapshots = listSnapsforVolume(volumeId);
             for (SnapshotVO snapshot : snapshots) {
-                SnapshotVO snap = _snapshotDao.findById(snapshot.getId());
-                SnapshotStrategy snapshotStrategy = null;
-                for (SnapshotStrategy strategy : snapshotStrategies) {
-                    if (strategy.canHandle(snap)) {
-                        snapshotStrategy = strategy;
-                        break;
-                    }
-                }
-                if (snapshotStrategy.deleteSnapshot(snapshot.getId())) {
+                if (_snapshotDao.expunge(snapshot.getId())) {
                     if (snapshot.getRecurringType() == Type.MANUAL) {
                         _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.snapshot);
                         _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.secondary_storage,


Mime
View raw message