Yair Zaslavsky has posted comments on this change.
Change subject: gluster: BLL Cmd for stop remove brick async task
......................................................................
Patch Set 5:
(1 comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StopRemoveGlusterVolumeBricksCommand.java
Line 37: if (!super.canDoAction()) {
Line 38: return false;
Line 39: }
Line 40:
Line 41: if (volume.getAsyncTask() == null ||
volume.getAsyncTask().getType() != GlusterTaskType.REMOVE_BRICK
Out of curiosity - since I assume you guys are going to use gluster tasks in
some commands, can't we have a GlusterTaskUtils helper class with a method that
will check if a gluster task is of a given type by checking it's not null and
that it equals to a given type , and then you would simply negate here the
result of this method?
Line 42: || volume.getAsyncTask().getStatus() !=
JobExecutionStatus.STARTED) {
Line 43: return
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_NOT_STARTED);
Line 44: }
Line 45:
--
To view, visit http://gerrit.ovirt.org/19051
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If05f54aa86bcc8ceb10fd2925a6e1fce8e905b6a
Gerrit-PatchSet: 5
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: Ramesh N <[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