Moti Asayag has posted comments on this change.

Change subject: core: lenient validation of mac pool ranges in engine-config
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/35390/1/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/MacAddressPoolRangesValueHelper.java
File 
backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/MacAddressPoolRangesValueHelper.java:

Line 41
Line 42
Line 43
Line 44
Line 45
> yes. I think it's not worth it enforcing this, if implementation does not c
to me it makes sense that a range should be specified from lower to upper 
boundaries.

Especially if the range field is consist of several ranges.
Lior ?

Will it affect to value that will be stored in the db ?


Line 76:         return new ValidationResult(true);
Line 77:     }
Line 78: 
Line 79:     private ValidationResult validateRangePart(String rangePart) {
Line 80:         rangePart.toLowerCase();
> crap, sorry about that assignment.
the lower case used to allow quick comparison between the start and end parts 
of the range. see like 45 on the left side.

the lower case in error message isn't important and actually i'd rather to 
print the original value rather a manipulated one.
Line 81:         boolean matches = 
MAC_ADDRESS_PATTERN.matcher(rangePart).matches();
Line 82:         if (!matches) {
Line 83:             return new ValidationResult(false, "The range start/end is 
an invalid MAC address. " + rangePart
Line 84:                     + " should be in a format of AA:AA:AA:AA:AA:AA");


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id7e47c1ab1c2ffd340e1ff2596ee567557324a28
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@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