Changeset 7fe81be


Ignore:
Timestamp:
Apr 7, 2010 2:37:59 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
73e7f5c
Parents:
5f6929a
Message:

tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r5f6929a r7fe81be  
    13071307            allocated[tb] = 1
    13081308
    1309     def split_topology(self, top, topo, testbeds, eid, master, tbparams):
     1309    def split_topology(self, top, topo, testbeds):
    13101310        """
    13111311        Create the sub-topologies that are needed for experiment instantiation.
     
    13131313        for tb in testbeds:
    13141314            topo[tb] = top.clone()
    1315             to_delete = [ ]
    1316             # XXX: copy in for loop to simplify
    1317             for e in topo[tb].elements:
     1315            # copy in for loop allows deletions from the original
     1316            for e in [ e for e in topo[tb].elements]:
    13181317                etb = e.get_attribute('testbed')
    1319                 if etb and etb != tb:
     1318                # NB: elements without a testbed attribute won't appear in any
     1319                # sub topologies. 
     1320                if not etb or etb != tb:
    13201321                    for i in e.interface:
    13211322                        for s in i.subs:
     
    13251326                                raise service_error(service_error.internal,
    13261327                                        "Can't remove interface??")
    1327                     to_delete.append(e)
    1328             for e in to_delete:
    1329                 topo[tb].elements.remove(e)
     1328                    topo[tb].elements.remove(e)
    13301329            topo[tb].make_indices()
    13311330
     
    16911690                            master, eid, myname, desthost, portal_type,
    16921691                            infs, conn_type="ssh", conn_attrs=[], expid=expid)
    1693                     #if self.fedkit:
    1694                         #self.add_kit(portal, self.fedkit)
    1695                     #if self.gatewaykit:
    1696                         #self.add_kit(portal, self.gatewaykit)
    16971692
    16981693                    topo[st].elements.append(portal)
     
    21582153            self.get_access_to_testbeds(testbeds, access_user,
    21592154                    export_project, master, allocated, tbparams, services)
    2160             self.split_topology(top, topo, testbeds, eid, master, tbparams)
     2155            self.split_topology(top, topo, testbeds)
    21612156
    21622157            # Copy configuration files into the remote file store
Note: See TracChangeset for help on using the changeset viewer.