mirror of https://github.com/apache/cloudstack.git
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:
parent
6a63fb4461
commit
67785c2ad6
|
|
@ -462,11 +462,12 @@ 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());
|
||||
}
|
||||
|
||||
snapshotResponse.setRevertable(snapshotInfo.isRevertable());
|
||||
|
||||
// set tag information
|
||||
List<? extends ResourceTag> tags = ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.Snapshot, snapshot.getId());
|
||||
List<ResourceTagResponse> tagResponses = new ArrayList<ResourceTagResponse>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue