Arik Hadas has posted comments on this change.

Change subject: engine: introduce RefreshHostCommand
......................................................................


Patch Set 4:

(3 comments)

https://gerrit.ovirt.org/#/c/39892/4//COMMIT_MSG
Commit Message:

Line 5: CommitDate: 2015-04-21 08:52:24 +0300
Line 6: 
Line 7: engine: introduce RefreshHostCommand
Line 8: 
Line 9: It combains a call to VDSCommandType.CollectVdsNetworkData and
s/CollectVdsNetworkData/RefreshHostCapabilities ?
Line 10: RefreshHostDevices.
Line 11: 
Line 12: Change-Id: Ieee263b7ee1773c777febd6be21a1a21d0d02ae2


https://gerrit.ovirt.org/#/c/39892/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/RefreshHostCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/RefreshHostCommand.java:

Line 16:     }
Line 17: 
Line 18:     @Override
Line 19:     protected void executeCommand() {
Line 20:         setVdsId(getParameters().getVdsId());
I don't think it is needed, see VdsCommand#61
Line 21: 
Line 22:         VdsActionParameters vdsActionParams = new 
VdsActionParameters(getVdsId());
Line 23:         boolean succeeded = 
runInternalAction(VdcActionType.RefreshHostCapabilities, 
vdsActionParams).getSucceeded();
Line 24:         if (succeeded) {


Line 25:             succeeded = 
runInternalAction(VdcActionType.RefreshHostDevices, 
vdsActionParams).getSucceeded();
Line 26:         }
Line 27: 
Line 28:         setSucceeded(succeeded);
Line 29:     }
don't you prefer the following structure:
if (!runInternalAction(...)) {
  return;
}

if (!runInternalAction(...)) {
  return;
}

setSucceeded(true)

?
Line 30: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieee263b7ee1773c777febd6be21a1a21d0d02ae2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to