@Override public String getUri() { return snapshot.getUuid(); }
@Override public String getUuid() { return snapshot.getUuid(); }
@Override public boolean start() { //destroy snapshots in destroying state List<SnapshotVO> snapshots = _snapshotDao.listAllByStatus(Snapshot.State.Destroying); for (SnapshotVO snapshotVO : snapshots) { try { if (!deleteSnapshot(snapshotVO.getId())) { s_logger.debug("Failed to delete snapshot in destroying state with id " + snapshotVO.getUuid()); } } catch (Exception e) { s_logger.debug("Failed to delete snapshot in destroying state with id " + snapshotVO.getUuid()); } } return true; }
if (snapshotCheck.getState() == Snapshot.State.BackedUp) { UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_DELETE, snapshotCheck.getAccountId(), snapshotCheck.getDataCenterId(), snapshotId, snapshotCheck.getName(), null, null, 0L, snapshotCheck.getClass().getName(), snapshotCheck.getUuid());
snapshot.getName(), null, null, volume.getSize(), snapshot.getClass().getName(), snapshot.getUuid());
s_logger.warn("Unable to destroy snapshot " + snapshotVO.getUuid(), e);
resourceType = ResourceObjectType.Snapshot; if (snap != null) { usageRecResponse.setUsageId(snap.getUuid()); resourceId = snap.getId();
throw new InvalidParameterValueException("Creating snapshot failed due to snapshot : " + parentSnap.getUuid() + " is created from the same vm snapshot");