Martin Mucha has posted comments on this change.

Change subject: engine: Add separate validation for multicast MAC address
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.ovirt.org/#/c/32196/3/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VmNic.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VmNic.java:

Line 18:     private static final long serialVersionUID = 7428150502868988886L;
Line 19: 
Line 20:     private static final String ODD_HEX_DIGIT_PATTERN = 
"[13579BbDdFf]";
Line 21: 
Line 22:     public static final String NON_MULTICAST_MAC_ADDRESS_FORMAT =
> the constant name is intended to say that it matches everything else than a
well i don't have *better*, but 'textNotContainingMulticastMacAddress' would be 
more accurate.
Line 23:             ".*(?<!^\\p{XDigit}" + ODD_HEX_DIGIT_PATTERN + 
"(:\\p{XDigit}{2}){5}$)";
Line 24:     public static final String VALID_MAC_ADDRESS_FORMAT =
Line 25:             "^(\\p{XDigit}{2}:){5}\\p{XDigit}{2}$";
Line 26: 


Line 19: 
Line 20:     private static final String ODD_HEX_DIGIT_PATTERN = 
"[13579BbDdFf]";
Line 21: 
Line 22:     public static final String NON_MULTICAST_MAC_ADDRESS_FORMAT =
Line 23:             ".*(?<!^\\p{XDigit}" + ODD_HEX_DIGIT_PATTERN + 
"(:\\p{XDigit}{2}){5}$)";
> the negative pattern is needed as all patterns are evaluated and all violat
sorry, I understand it now.
Line 24:     public static final String VALID_MAC_ADDRESS_FORMAT =
Line 25:             "^(\\p{XDigit}{2}:){5}\\p{XDigit}{2}$";
Line 26: 
Line 27:     public static final String NON_NULLABLE_MAC_ADDRESS_FORMAT = 
"^.*(?<!(00:){5}00)$";


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4077a14fb61c2e082db9f81f1ded3b25ca98fc3f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Martin Mucha <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[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