~rvb/maas/testin-br

« back to all changes in this revision

Viewing changes to src/provisioningserver/tftp.py

  • Committer: Raphael Badin
  • Date: 2014-02-04 09:29:37 UTC
  • mfrom: (1606.1.280 maas)
  • Revision ID: raphael.badin@canonical.com-20140204092937-4v73lfr3duol6gcw
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    unicode_literals,
10
10
    )
11
11
 
 
12
str = None
 
13
 
12
14
__metaclass__ = type
13
15
__all__ = [
14
16
    "TFTPBackend",
88
90
 
89
91
    # We assume that the ARP HTYPE (hardware type) that PXELINUX sends is
90
92
    # always Ethernet.
91
 
    re_config_file = re.compile(
92
 
        r'''
 
93
    re_config_file = r'''
93
94
        # Optional leading slash(es).
94
95
        ^/*
95
96
        pxelinux[.]cfg    # PXELINUX expects this.
107
108
              )?
108
109
        )
109
110
        $
110
 
        '''.format(
111
 
            htype=ARP_HTYPE.ETHERNET,
112
 
            re_mac_address=re_mac_address),
113
 
        re.VERBOSE)
 
111
    '''
 
112
    re_config_file = re_config_file.format(
 
113
        htype=ARP_HTYPE.ETHERNET, re_mac_address=re_mac_address)
 
114
    re_config_file = re.compile(re_config_file, re.VERBOSE)
114
115
 
115
116
    def __init__(self, base_path, generator_url):
116
117
        """