Eliraz Levi has posted comments on this change. Change subject: engine: integrate CidrValidation to backend ......................................................................
Patch Set 13: (5 comments) http://gerrit.ovirt.org/#/c/32540/13/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/CidrAnnotationTest.java File backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/CidrAnnotationTest.java: Line 39: @Test Line 40: public void checkCidrFormatAnnotation() { Line 41: CidrContainer container = new CidrContainer(cidr); Line 42: Set<ConstraintViolation<CidrContainer>> result = validator.validate(container); Line 43: if ((!validNetworkAddressExpectedResult) && (validCidrFormatExpectedResult)) { > please remove the surrounding brackets, they don't contribute to readabilit Done Line 44: assertEquals("Failed to validate CIDR's error format: " + container.getCidr(), "CIDR_NOT_NETWORK_ADDRESS", result.iterator().next().getMessage());//$NON-NLS-1$ Line 45: } Line 46: Line 47: else if (!validCidrFormatExpectedResult) { Line 40: public void checkCidrFormatAnnotation() { Line 41: CidrContainer container = new CidrContainer(cidr); Line 42: Set<ConstraintViolation<CidrContainer>> result = validator.validate(container); Line 43: if ((!validNetworkAddressExpectedResult) && (validCidrFormatExpectedResult)) { Line 44: assertEquals("Failed to validate CIDR's error format: " + container.getCidr(), "CIDR_NOT_NETWORK_ADDRESS", result.iterator().next().getMessage());//$NON-NLS-1$ > wouldn't we rather having "CIDR_NOT_NETWORK_ADDRESS" and "CIDR_NOT_NETWORK_ added to VdcMessage Line 45: } Line 46: Line 47: else if (!validCidrFormatExpectedResult) { Line 48: assertEquals("Failed to validate CIDR's error format: " + container.getCidr(), "BAD_CIDR_FORMAT", result.iterator().next().getMessage());//$NON-NLS-1$ Line 43: if ((!validNetworkAddressExpectedResult) && (validCidrFormatExpectedResult)) { Line 44: assertEquals("Failed to validate CIDR's error format: " + container.getCidr(), "CIDR_NOT_NETWORK_ADDRESS", result.iterator().next().getMessage());//$NON-NLS-1$ Line 45: } Line 46: Line 47: else if (!validCidrFormatExpectedResult) { > the format should be: Done Line 48: assertEquals("Failed to validate CIDR's error format: " + container.getCidr(), "BAD_CIDR_FORMAT", result.iterator().next().getMessage());//$NON-NLS-1$ Line 49: } Line 50: else { Line 51: assertEquals("Failed to validate CIDR's format: " + container.getCidr(), validCidrFormatExpectedResult, result.isEmpty());//$NON-NLS-1$ http://gerrit.ovirt.org/#/c/32540/13/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/validation/CidrConstraintTest.java File backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/validation/CidrConstraintTest.java: > please clear //$NON-NLS-1$ Done Line 1: package org.ovirt.engine.core.common.validation; Line 2: Line 3: import javax.validation.ConstraintValidatorContext; Line 4: import javax.validation.ConstraintValidatorContext.ConstraintViolationBuilder; http://gerrit.ovirt.org/#/c/32540/13/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties: Line 1265: KDUMP_DETECTION_NOT_ENABLED_FOR_VDS=Cannot ${action} ${type}. Kdump integration is not enabled for host '${VdsName}'. Line 1266: KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS=Cannot ${action} ${type}. Kdump is not properly configured on host '${VdsName}'. Line 1267: Line 1268: BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH=Cannot ${action} ${type}. Balloon is not supported on '${clusterArch}' architecture. Line 1269: CIDR_NOT_NETWORK_ADDRESS=CIDR not represnting a network address.\nplease ensure ip and mask are matching to network ip address. \nexample: valid network address: 2.2.0.0/16 \ninvalid: 2.2.0.1/16 > s/ip/IP Done -- To view, visit http://gerrit.ovirt.org/32540 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4dc94cc350dc03195c3f24ba783036592e3c03e Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eliraz Levi <el...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Eliraz Levi <el...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@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