Yaniv Bronhaim has posted comments on this change.

Change subject: engine: Introduce UpdateHostValidator
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.ovirt.org/#/c/37469/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/UpdateHostValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/UpdateHostValidator.java:

Line 44:         if (StringUtils.equalsIgnoreCase(oldHost.getName(), 
getHost().getName())) {
Line 45:             return ValidationResult.VALID;
Line 46:         }
Line 47: 
Line 48:         return super.nameNotUsed();
how does that method check that the name is not being used? you must call 
getVdsDAO().getByName to iterate all hosts in db
Line 49:     }
Line 50: 
Line 51:     public ValidationResult hostNameNotUsed() {
Line 52:         if (StringUtils.equalsIgnoreCase(oldHost.getHostName(), 
getHost().getHostName())) {


Line 52:         if (StringUtils.equalsIgnoreCase(oldHost.getHostName(), 
getHost().getHostName())) {
Line 53:             return ValidationResult.VALID;
Line 54:         }
Line 55: 
Line 56:         return super.hostNameNotUsed();
same, getVdsDAO().getAllForHostnams must be called from here
Line 57:     }
Line 58: 
Line 59:     public ValidationResult statusSupportedForHostInstallation() {
Line 60:         return 
ValidationResult.failWith(VdcBllMessages.VDS_CANNOT_INSTALL_STATUS_ILLEGAL)


-- 
To view, visit http://gerrit.ovirt.org/37469
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia015aad730686df7954db919c4bac9bf7bd3aa21
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [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

Reply via email to