utils.text: Function to verify MAC address prefix
authorMichael Hanselmann <hansmi@google.com>
Mon, 3 Dec 2012 16:08:42 +0000 (17:08 +0100)
committerMichael Hanselmann <hansmi@google.com>
Tue, 4 Dec 2012 09:22:08 +0000 (10:22 +0100)
commitd242923cc6a90b5d597394f2cae4035a0d267526
tree3bce00d735e189fd218cec0a1fd46d8ace9cc685
parentcbcd9144e7b81f179ab1f009924f4001e6733dbd
utils.text: Function to verify MAC address prefix

The network management code needs to verify a MAC address prefix.
Instead of (ab)using NormalizeAndValidateMac, clean code should be used.
Unit tests for NormalizeAndValidateMac are updated and new ones for
NormalizeAndValidateThreeOctetMacPrefix are added.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
lib/utils/text.py
test/ganeti.utils.text_unittest.py