Changeset 4d68ba6
- Timestamp:
- Apr 13, 2012 3:10:58 PM (13 years ago)
- Branches:
- compt_changes, master
- Children:
- 66795cf0
- Parents:
- c0f409a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/emulab_access.py
rc0f409a r4d68ba6 408 408 return e.name not in self.nodes 409 409 410 def have_portals(top): 411 ''' 412 Return true if the topology has a portal node 413 ''' 414 # The else is on the for 415 for e in top.elements: 416 if isinstance(e, topdl.Computer) and e.get_attribute('portal'): 417 return True 418 else: 419 return False 420 421 410 422 # Main line of generate_ns2 411 423 t = topo.clone() … … 443 455 # testbed to local testbed paths and put the federation commands into 444 456 # the start commands 457 local = len(dragon_map) == 0 and not have_portals(t) 458 if local: routing = 'Static' 459 else: routing = 'Manual' 460 461 self.log.debug("Local: %s", local) 445 462 for e in [e for e in t.elements]: 446 463 if isinstance(e, topdl.Segment): … … 453 470 # Portals never have a user-specified start command 454 471 e.set_attribute('startup', self.portal_startcommand) 455 elif self.node_startcommand:472 elif not local and self.node_startcommand: 456 473 if e.get_attribute('startup'): 457 474 e.set_attribute('startup', "%s \\$USER '%s'" % \ … … 494 511 495 512 # Convert to ns and write it out 496 expfile = topdl.topology_to_ns2(t, filters )513 expfile = topdl.topology_to_ns2(t, filters, routing=routing) 497 514 try: 498 515 f = open(expfn, "w")
Note: See TracChangeset
for help on using the changeset viewer.