Change in ovirt-engine[master]: backend: refactor SyncLunsInfoForBlockStorageDomainCommand

Code Review gerrit at ovirt.org
Sun May 21 13:24:51 UTC 2017


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

Allon Mureinik has submitted this change and it was merged.

Change subject: backend: refactor SyncLunsInfoForBlockStorageDomainCommand
......................................................................


backend: refactor SyncLunsInfoForBlockStorageDomainCommand

The objects updateExistingLuns, saveNewLuns and noOp are consumers that
update/save/do-nothing given a list of luns, and are a part of the
syncing process of storage domains' luns.

This patch changes the way we work with these objects. Instead of
checking their existence in the map that we get from
getLunsToUpdateInDb, each object now contains the relevant info about
itself - requiresDbUpdate and affectsDiscardFunctionality.

This way the process is more general since the interface is decoupled
from the implementation.

Change-Id: I264543c2a9500c51c0263f4fc199b117b2103430
Related-to: https://bugzilla.redhat.com/1439692
Signed-off-by: Idan Shaby <ishaby at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommandTest.java
2 files changed, 74 insertions(+), 31 deletions(-)

Approvals:
  Daniel Erez: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Idan Shaby: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I264543c2a9500c51c0263f4fc199b117b2103430
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list