Ignore:
Timestamp:
Feb 29, 2012 5:06:03 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
2bb8b35
Parents:
fe6e0be
Message:

Add support for testbeds to indicate preference for outgoing portal
connections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_partition.py

    rfe6e0be ra11eda5  
    4444class experiment_partition:
    4545    def __init__(self, auth=None, store_url=None, tbmap=None, muxmax=2,
    46             direct_transit=None):
     46            direct_transit=None, tbactive=None):
    4747        """
    4848        Intialize the various attributes
     
    5656        self.direct_transit = direct_transit or [ ]
    5757        self.muxmax = muxmax
     58        self.tbactive = tbactive
    5859
    5960
     
    8990        ddomain = tbparams[dt].get_attribute('domain', '.example.com')
    9091
    91         if (st in masters and dt not in masters) or \
     92        if (st in self.tbactive and dt not in self.tbactive) or \
     93                ( st not in self.tbactive and dt in self.tbactive ):
     94            active = ("%s" % (st in self.tbactive))
     95        elif (st in masters and dt not in masters) or \
    9296                ( st not in masters and dt in masters ):
    9397            active = ("%s" % (st in masters))
Note: See TracChangeset for help on using the changeset viewer.