Change in ovirt-engine[master]: core: CreateAllSnapshotsFromVmParameters#disks

Code Review gerrit at ovirt.org
Wed May 17 19:21:45 UTC 2017


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: core: CreateAllSnapshotsFromVmParameters#disks
......................................................................


core: CreateAllSnapshotsFromVmParameters#disks

Changed disks to a Set<Guid> instead of List<DiskImage>.

While creating a snapshot, the only use for the 'disks' parameter is
for taking the disk IDs. Therefore, constructing a set of disk guids
is more reasonable.

Also, by using guids instead of disk images, checking if a disk
parameter for snapshot is a direct lun would be easier.

In addition, as a part of the patch, the method 'diskImagesNotExist()'
was moved to:
org.ovirt.engine.core.bll.validator.storage.DiskExistenceValidator
and a new test scenario was created for it.

Change-Id: I4b6b6cb38cb28bd42a2a0d81f0ab2d5a2750bddc
Signed-off-by: Shani Leviim <sleviim at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/CreateAllSnapshotsFromVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/dr/GlusterStorageSyncCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/lsm/LiveMigrateVmDisksCommand.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/DiskExistenceValidator.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/DiskImagesValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/snapshots/CreateAllSnapshotsFromVmCommandTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/DiskExistenceValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/DiskImagesValidatorTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/CreateAllSnapshotsFromVmParameters.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotsResource.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/SnapshotModel.java
11 files changed, 178 insertions(+), 85 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Allon Mureinik: Looks good to me, approved
  Shani Leviim: Verified



-- 
To view, visit https://gerrit.ovirt.org/76382
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b6b6cb38cb28bd42a2a0d81f0ab2d5a2750bddc
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shani Leviim <sleviim at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Shani Leviim <sleviim at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list