Changeset 023e79b
- Timestamp:
- May 17, 2010 1:23:22 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 139e2e2
- Parents:
- 4b6909e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/compose.py
r4b6909e r023e79b 49 49 self.add_option('--format', dest='format', default="xml", 50 50 help='Output file format') 51 self.add_option('--add_testbeds', dest='add_testbeds', default=False, 52 action='store_true', 53 help='add testbed attributes to each component') 51 54 self.add_option('--lax', dest='lax', default=False, 52 55 action='store_true', … … 567 570 provides, accepts) 568 571 572 # Add testbed attributes if requested 573 if opts.add_testbeds: 574 for i, t in enumerate(topos): 575 for e in [ e for e in t.elements if isinstance(e, topdl.Computer)]: 576 e.set_attribute('testbed', 'testbed%03d' % i) 577 569 578 # Make a topology containing all elements and substrates from components 570 579 # that had matches. … … 582 591 elif topos == 1: 583 592 comp = topos[0] 593 if opts.add_testbeds: 594 for e in [ e for e in comp.elements if isinstance(e, topdl.Computer)]: 595 e.set_attribute('testbed', 'testbed001') 596 584 597 else: 585 598 sys.exit("Did not read any components.")
Note: See TracChangeset
for help on using the changeset viewer.