Sahina Bose has posted comments on this change.
Change subject: gluster: Added additional can do action check
......................................................................
Patch Set 9:
(2 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/gluster/GlusterBrickValidator.java
Line 113: List<GlusterBrickEntity> bricksForTask =
Line 114:
getGlusterBrickDao().getGlusterVolumeBricksByTaskId(asyncTask.getTaskId());
Line 115:
Line 116: if (paramBricks.size() != bricksForTask.size() ||
!areBricksInTheList(volumeEntity, paramBricks, bricksForTask)) {
Line 117: return new
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_PARAMS_INVALID);
I think it would be useful to return the list of valid bricks to end user.
Line 118: }
Line 119:
Line 120: return ValidationResult.VALID;
Line 121: }
Line 126: for (GlusterBrickEntity paramBrick : bricks) {
Line 127: GlusterBrickEntity paramBrickFromVolume =
volumeEntity.getBrickWithId(paramBrick.getId());
Line 128: if (paramBrickFromVolume == null) {
Line 129: paramBrickFromVolume =
volumeEntity.getBrickWithQualifiedName(paramBrick.getQualifiedName());
Line 130: }
if paramBrickFromVolume == null or paramBrickFromVolume.getId() == null again,
you could return false
Line 131:
Line 132: // reset the flag for next round
Line 133: found = false;
Line 134: for (GlusterBrickEntity brick : searchBricks) {
--
To view, visit http://gerrit.ovirt.org/22353
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id7f5d3b48985552aa5f74178008beb39ee7a06f9
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches