Changeset 935e46f


Ignore:
Timestamp:
Apr 22, 2010 10:21:17 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
76bcab2
Parents:
4c931af
Message:

Regular expression that accommodates appliances and virtual nodes better than the earlier one. Also for do not add project and experiment to pc\d+ nodenames.

Location:
fedd/federation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_access.py

    r4c931af r935e46f  
    15581558                for n in e.name:
    15591559                    if n in starter.node:
    1560                         e.set_attribute('hostname', "%s.%s.%s%s" % \
    1561                                 (starter.node[n], ename, proj, self.domain))
     1560                        e.set_attribute('hostname', "%s%s" % \
     1561                                (starter.node[n], self.domain))
    15621562        except service_error, e:
    15631563            err = e
  • fedd/federation/local_emulab_segment.py

    r4c931af r935e46f  
    157157            self.log.debug("Getting mapping for %s %s" % (pid, eid))
    158158            phys_start = re.compile('^Physical\s+Node\s+Mapping')
    159             phys_line = re.compile('(\S+)\s+\S+\s+\S+\s+(.*)')
     159            phys_line = re.compile('(\S+)(\s+\S+)*\s+(\S+)')
    160160            phys_end = re.compile('^$')
    161161            status = subprocess.Popen(cmd, stdout=subprocess.PIPE,
     
    184184                else:
    185185                    m = phys_line.match(line.strip())
    186                     if m: self.node[m.group(1)] = m.group(2)
     186                    if m: self.node[m.group(1)] = m.group(3)
    187187                    else: self.log.warn(
    188                             "Matching failed while parsing node mapping")
     188                            "Matching failed while parsing node mapping: " +\
     189                                    "line %s" % line)
    189190            rv = status.wait()
    190191
  • fedd/federation/proxy_emulab_segment.py

    r4c931af r935e46f  
    100100            self.log.debug("Getting mapping for %s %s" % (pid, eid))
    101101            phys_start = re.compile('^Physical\s+Node\s+Mapping')
    102             phys_line = re.compile('(\S+)\s+\S+\s+\S+\s+(.*)')
     102            phys_line = re.compile('(\S+)(\s+\S+)*\s+(\S+)')
    103103            phys_end = re.compile('^$')
    104104            status = subprocess.Popen(cmd, stdout=subprocess.PIPE,
     
    127127                else:
    128128                    m = phys_line.match(line.strip())
    129                     if m: self.node[m.group(1)] = m.group(2)
     129                    if m: self.node[m.group(1)] = m.group(3)
    130130                    else: self.log.warn(
    131                             "Matching failed while parsing node mapping")
     131                            "Matching failed while parsing node mapping: " +\
     132                                    "line %s" % line)
    132133            rv = status.wait()
    133134
Note: See TracChangeset for help on using the changeset viewer.