}
List<String> snapshots = findAllSnapshotForVolume(volumeId);
if (snapshots == null) {
continue;
}
CleanupSnapshotBackupCommand cmd = new CleanupSnapshotBackupCommand(secondaryStorageHost.getStorageUrl(), secondaryStorageHost.getDataCenterId(), volume.getAccountId(),
volumeId, snapshots);
Answer answer = _agentMgr.sendToSecStorage(secondaryStorageHost, cmd);
if ((answer == null) || !answer.getResult()) {
String details = "Failed to cleanup snapshots for volume " + volumeId + " due to " + (answer == null ? "null" : answer.getDetails());