Changeset ab847bc for fedd/federation/experiment_control.py
- Timestamp:
- Apr 28, 2010 4:09:53 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 12658df
- Parents:
- 05fceef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r05fceef rab847bc 816 816 "More than one project export is not supported") 817 817 818 uri = self.tbmap.get(t b, None)818 uri = self.tbmap.get(testbed_base(tb), None) 819 819 if not uri: 820 820 raise service_error(service_error.server_config, … … 1120 1120 # Create and start a thread to start the segment, and save it 1121 1121 # to get the return value later 1122 tb_attrs = copy.copy(attrs) 1122 1123 thread_pool.wait_for_slot() 1123 uri = tbparams[tb].get('uri', self.tbmap.get(tb, None)) 1124 uri = tbparams[tb].get('uri', \ 1125 self.tbmap.get(testbed_base(tb), None)) 1126 base, suffix = split_testbed(tb) 1127 if suffix: 1128 tb_attrs.append({'attribute': 'experiment_name', 1129 'value': "%s_%s" % (eid, suffix)}) 1130 else: 1131 tb_attrs.append({'attribute': 'experiment_name', 'value': eid}) 1124 1132 if not uri: 1125 1133 raise service_error(service_error.internal, … … 1141 1149 t = self.pooled_thread(\ 1142 1150 target=s, name=tb, 1143 args=(uri, aid, topo[tb], masters, attrs, connInfo[tb]),1151 args=(uri, aid, topo[tb], masters, tb_attrs, connInfo[tb]), 1144 1152 pdata=thread_pool, trace_file=self.trace_file) 1145 1153 threads.append(t) … … 1723 1731 try: 1724 1732 os.makedirs(configdir) 1725 except IOError, e:1726 raise service_error( 1733 except EnvironmentError, e: 1734 raise service_error(service_error.internal, 1727 1735 "Cannot create config directory: %s" % e) 1728 1736 try: … … 1752 1760 part.add_portals(top, topo, eid, masters, tbparams, ip_allocator, 1753 1761 connInfo, expid) 1754 # Now get access to the dynamic testbeds 1755 for k, t in topo.items(): 1756 if not t.get_attribute('dynamic'): 1757 continue 1758 tb = t.get_attribute('testbed') 1759 if tb: 1760 self.get_access(tb, None, tbparams, export_project, 1761 access_user, masters) 1762 tbparams[k] = tbparams[tb] 1763 del tbparams[tb] 1764 allocated[k] = 1 1765 store_keys = t.get_attribute('store_keys') 1766 # Give the testbed access to keys it exports or imports 1767 if store_keys: 1768 for sk in store_keys.split(" "): 1769 self.auth.set_attribute(\ 1770 tbparams[k]['allocID']['fedid'], sk) 1771 else: 1772 raise service_error(service_error.internal, 1773 "Dynamic allocation from no testbed!?") 1762 # Now get access to the dynamic testbeds (those added above) 1763 for tb in [ t for t in topo if t not in allocated]: 1764 self.get_access(tb, None, tbparams, access_user, masters) 1765 allocated[tb] = 1 1766 store_keys = topo[tb].get_attribute('store_keys') 1767 # Give the testbed access to keys it exports or imports 1768 if store_keys: 1769 for sk in store_keys.split(" "): 1770 self.auth.set_attribute(\ 1771 tbparams[tb]['allocID']['fedid'], sk) 1774 1772 1775 1773 self.wrangle_software(expid, top, topo, tbparams) … … 1848 1846 (self.repo_url, expid) 1849 1847 }, 1850 {1851 'attribute': 'experiment_name',1852 'value': eid,1853 },1854 1848 ] 1855 1849
Note: See TracChangeset
for help on using the changeset viewer.