Specify vm snapshot uuid in response over db id in the async job response (#6449)

This commit is contained in:
Pearl Dsilva 2022-06-10 16:15:11 +05:30 committed by GitHub
parent b1c8b5ab37
commit 15a2cc6c68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,7 @@ public class CreateVMSnapshotCmd extends BaseAsyncCreateCmd {
VMSnapshot vmsnapshot = _vmSnapshotService.allocVMSnapshot(getVmId(), getDisplayName(), getDescription(), snapshotMemory());
if (vmsnapshot != null) {
setEntityId(vmsnapshot.getId());
setEntityUuid(vmsnapshot.getUuid());
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm snapshot");
}