~allenap/maas/ipmi-power-confusion--bug-1560830

« back to all changes in this revision

Viewing changes to src/maasserver/macaddress.py

  • Committer: Gavin Panella
  • Date: 2012-01-19 10:37:57 UTC
  • mfrom: (16.3.22 test-bling)
  • Revision ID: gavin.panella@canonical.com-20120119103757-surtgos6dn4krulo
[r=rvba] Adds testtools and testresources, templates for new source files, import formatting utility from Launchpad, and fixes some lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
mac_re = re.compile(r'^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$')
9
9
 
10
10
validate_mac = RegexValidator(
11
 
    regex = mac_re,
12
 
    message = u"Enter a valid MAC address (e.g. AA:BB:CC:DD:EE:FF).")
 
11
    regex=mac_re,
 
12
    message=u"Enter a valid MAC address (e.g. AA:BB:CC:DD:EE:FF).")
13
13
 
14
14
 
15
15
class MACAddressField(Field):