Changeset f0b96ba


Ignore:
Timestamp:
Sep 27, 2013 4:39:15 PM (11 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
75605c7
Parents:
19d2b72
Message:

Portal nodes in suffixed testbeds were confused

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_partition.py

    r19d2b72 rf0b96ba  
    500500        tsubstrate, segment_element = \
    501501                self.new_portal_substrate(st, dt, eid, tbparams, expid)
    502         myname = "%s%stunnel" % (st, dt)
    503         desthost = "%s%stunnel" % (dt, st)
     502        if testbed_suffix(dt): dname = "-".join(split_testbed(dt))
     503        else: dname = dt
     504
     505        if testbed_suffix(st): sname = "-".join(split_testbed(st))
     506        else: sname = st
     507
     508        myname = "%s%stunnel" % (sname, dname)
     509        desthost = "%s%stunnel" % (dname, sname)
    504510
    505511        portal, info = self.new_portal_node(st, dt, tbparams, masters,
     
    517523    def new_direct_portal(self, st, dt, masters, eid, myip, dip, idx,
    518524            substrate, tbparams, expid, tb_name):
     525
     526        if testbed_suffix(dt): dname = "-".join(split_testbed(dt))
     527        else: dname = dt
     528
     529        if testbed_suffix(st): sname = "-".join(split_testbed(st))
     530        else: sname = st
     531
    519532        # Add to the master testbed
    520         if testbed_suffix(dt): myname = "%s%stunnel" % \
    521                 ("-".join(split_testbed(dt)), st)
    522         else: myname = "%s%stunnel" % (dt, st)
     533        myname = "%s%stunnel" % (dname, sname)
    523534
    524535        desthost = "%s" % ip_addr(dip)
     
    559570            # connection direct transits yet.
    560571            if len(tbs) == 2 :
    561                 # NB: the else if on the for loop - if none of the direct
     572                # NB: the else is on the for loop - if none of the direct
    562573                # transits is applicable, use the internet.
    563574                for d in self.direct_transit:
Note: See TracChangeset for help on using the changeset viewer.