Ignore:
Timestamp:
Jul 12, 2012 5:48:44 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
87b1a06
Parents:
4708875
Message:

Add support for nat_portal parameter. Remove old half-assed active
endpoints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r4708875 r4ffa6f8  
    327327
    328328        self.tbmap = { }
    329         self.tbactive = set()
    330329        lineno =0
    331330        try:
     
    338337                try:
    339338                    label, url = line.split(':', 1)
    340                     if ',' in label:
    341                         label, act = label.split(',', 1)
    342                         active = (act.strip() == 'active')
    343                     else:
    344                         active = False
    345339                    self.tbmap[label] = url
    346                     if active: self.tbactive.add(label)
    347340                except ValueError, e:
    348341                    self.log.warn("[read_mapdb] Ignored bad line (%d) in " +\
     
    21692162        # of the testbed map.
    21702163        tbmap = dict(self.tbmap)
    2171         tbactive = set(self.tbactive)
    21722164        for m in req.get('testbedmap', []):
    21732165            if 'testbed' in m and 'uri' in m:
    21742166                tbmap[m['testbed']] = m['uri']
    2175                 if 'active' in m and m['active']: tbactive.add(m['testbed'])
    21762167
    21772168        # a place to work
     
    22132204            connInfo = { }          # Connection information
    22142205
    2215             self.split_topology(top, topo, testbeds)
    2216 
    22172206            self.get_access_to_testbeds(testbeds, fid, allocated,
    22182207                    tbparams, masters, tbmap, expid, expcert_file)
     2208
     2209            # tbactive is the set of testbeds that have NATs in front of their
     2210            # portals. They need to initiate connections.
     2211            tbactive = set([k for k, v in tbparams.items() \
     2212                    if v.get_attribute('nat_portals')])
     2213
     2214            self.split_topology(top, topo, testbeds)
    22192215
    22202216            attrs = self.generate_keys_and_hosts(tmpdir, expid, hosts, tbparams)
Note: See TracChangeset for help on using the changeset viewer.