Changeset eb117fe for fedd/federation


Ignore:
Timestamp:
Aug 23, 2012 6:36:01 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
9d40cc9
Parents:
be1742d
Message:

Avoid portal name collision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_partition.py

    rbe1742d reb117fe  
    453453                        new_portal = True
    454454                        portal_type = "experiment"
    455                         myname = "%stunnel%d" % (dname.lower(),
     455                        myname = "%s%stunnel%d" % (sname.lower(), dname.lower(),
    456456                                len(portals[st][dt]))
    457                         desthost = "%stunnel%d" % (sname.lower(),
    458                                 len(portals[st][dt]))
     457                        desthost = "%s%stunnel%d" % (dname.lower(),
     458                                sname.lower(), len(portals[st][dt]))
    459459                    else:
    460460                        new_i = topdl.Interface(
     
    472472                    new_portal = True
    473473                    portals[st][dt] = [ ]
    474                     myname = "%stunnel%d" % (dname.lower(),
     474                    myname = "%s%stunnel%d" % (sname.lower(), dname.lower(),
    475475                            len(portals[st][dt]))
    476                     desthost = "%stunnel%d" % (sname.lower(),
     476                    desthost = "%s%stunnel%d" % (dname.lower(), sname.lower(),
    477477                            len(portals[st][dt]))
    478478
     
    500500        tsubstrate, segment_element = \
    501501                self.new_portal_substrate(st, dt, eid, tbparams, expid)
    502         myname = "%stunnel" % dt
    503         desthost = "%stunnel" % st
     502        myname = "%s%stunnel" % (st, dt)
     503        desthost = "%s%stunnel" % (dt, st)
    504504
    505505        portal, info = self.new_portal_node(st, dt, tbparams, masters,
     
    518518            substrate, tbparams, expid, tb_name):
    519519        # Add to the master testbed
    520         if testbed_suffix(dt): myname = "%stunnel" % "-".join(split_testbed(dt))
    521         else: myname = "%stunnel" % dt
     520        if testbed_suffix(dt): myname = "%s%stunnel" % \
     521                ("-".join(split_testbed(dt)), st)
     522        else: myname = "%s%stunnel" % (dt, st)
    522523
    523524        desthost = "%s" % ip_addr(dip)
Note: See TracChangeset for help on using the changeset viewer.