Yaniv Bronhaim has posted comments on this change.
Change subject: core: Introducing VdsValidator class
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
Line 50: setVds(null);
Line 51: if (getVds() == null) {
Line 52: setCommandShouldBeLogged(false);
Line 53: log.infoFormat("Host {0}({1}) not fenced since it doesn't
exist anymore.", getVdsName(), getVdsId());
Line 54: return;
you sould call- setSucceeded(false);
Line 55: }
Line 56:
Line 57: validator = new VdsValidator(getVds());
Line 58: if (validator.shouldVdsBeFenced()) {
Line 60: } else {
Line 61: setCommandShouldBeLogged(false);
Line 62: log.infoFormat("Host {0}({1}) not fenced since it's status
is ok, or it doesn't exist anymore.",
Line 63: getVdsName(), getVdsId());
Line 64: }
also here - setSucceeded(false);
Line 65: }
Line 66:
Line 67: @Override
Line 68: protected void setStatus() {
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsValidator.java
Line 4:
Line 5: /**
Line 6: * Contains methods used to validate VDS status to execute some
operation on it
Line 7: */
Line 8: public class VdsValidator {
if you need vdsValidator only for shouldVdsBeFenced i prefer to leave the
function as it was, making separate validator just for that function for
specific use is redundant IMO.
Line 9: /**
Line 10: * Vds instance
Line 11: */
Line 12: private VDS vds;
--
To view, visit http://gerrit.ovirt.org/16319
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6f8d22a148513bdbfa46b195e92bc90d66a962ba
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches