mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
cf0a11e45a
commit
b084cc469a
@ -465,11 +465,12 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (snapshotInfo == null) {
|
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
|
// set tag information
|
||||||
List<? extends ResourceTag> tags = ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.Snapshot, snapshot.getId());
|
List<? extends ResourceTag> tags = ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.Snapshot, snapshot.getId());
|
||||||
List<ResourceTagResponse> tagResponses = new ArrayList<ResourceTagResponse>();
|
List<ResourceTagResponse> tagResponses = new ArrayList<ResourceTagResponse>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user