CLOUDSTACK-5283:

Not able to list snapshots when few snapshots are in "CreatedOnPrimary" state. Dont throw an exception when snapshot doesnt have an entry in the snapshot store ref for the snapshot in Image store because that fails to list all snapshots and also it can a perfect use case when the backup flag is not turned on.
This commit is contained in:
Nitin Mehta 2013-12-12 13:13:16 -08:00
parent cf0a11e45a
commit b084cc469a

View File

@ -465,10 +465,11 @@ public class ApiResponseHelper implements ResponseGenerator {
}
if (snapshotInfo == null) {
throw new CloudRuntimeException("Unable to find info for image store snapshot with uuid '" + snapshot.getUuid() + "'");
}
s_logger.debug("Unable to find info for image store snapshot with uuid "+snapshot.getUuid());
snapshotResponse.setRevertable(false);
}else{
snapshotResponse.setRevertable(snapshotInfo.isRevertable());
}
// set tag information
List<? extends ResourceTag> tags = ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.Snapshot, snapshot.getId());