mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 7965: Added delete event for recurring snapshot delete
status 7965: resolved fixed
This commit is contained in:
parent
86398a8546
commit
d901d42670
@ -697,7 +697,10 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
||||
s_logger.debug("Calling deleteSnapshot for snapshotId: " + snapshotId + " and policyId " + policyId);
|
||||
}
|
||||
SnapshotVO lastSnapshot = null;
|
||||
SnapshotVO snapshot = _snapshotDao.findById(snapshotId);
|
||||
_snapshotDao.remove(snapshotId);
|
||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE, snapshot.getAccountId(), 0L, snapshotId, snapshot.getName(), null, null, 0L);
|
||||
_usageEventDao.persist(usageEvent);
|
||||
long lastId = snapshotId;
|
||||
boolean destroy = false;
|
||||
while( true ) {
|
||||
@ -789,11 +792,6 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
||||
s_logger.error(details);
|
||||
}
|
||||
|
||||
if(success){
|
||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE, snapshot.getAccountId(), volume.getDataCenterId(), snapshotId, snapshot.getName(), null, null, volume.getSize());
|
||||
_usageEventDao.persist(usageEvent);
|
||||
}
|
||||
|
||||
return success;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user