Changeset 63c6664 for fedd/federation
- Timestamp:
- Dec 3, 2010 6:02:51 PM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- ac05658
- Parents:
- 1d73342
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r1d73342 r63c6664 1181 1181 "More than one project export is not supported") 1182 1182 1183 def add_services(svcs, type, slist): 1184 """ 1185 Add the given services to slist. type is import or export. 1186 """ 1187 for i, s in enumerate(svcs): 1188 idx = '%s%d' % (type, i) 1189 sr = {'id': idx, 'name': s.name, 'visibility': type } 1190 if s.params: 1191 sr['fedAttr'] = [ { 'attribute': k, 'value': v } \ 1192 for k, v in s.params.items()] 1193 slist.append(sr) 1194 1183 1195 uri = tbmap.get(testbed_base(tb), None) 1184 1196 if not uri: … … 1215 1227 e_keys = { } 1216 1228 if import_svcs or export_svcs: 1217 req['service'] = [ ] 1218 1219 for i, s in enumerate(import_svcs): 1220 idx = 'import%d' % i 1221 sr = {'id': idx, 'name': s.name, 'visibility': 'import' } 1222 if s.params: 1223 sr['fedAttr'] = [ { 'attribute': k, 'value': v } \ 1224 for k, v in s.params.items()] 1225 req['service'].append(sr) 1226 1227 for i, s in enumerate(export_svcs): 1228 idx = 'export%d' % i 1229 e_keys[idx] = s 1230 sr = {'id': idx, 'name': s.name, 'visibility': 'export' } 1231 if s.params: 1232 sr['fedAttr'] = [ { 'attribute': k, 'value': v } 1233 for k, v in s.params.items()] 1234 req['service'].append(sr) 1235 1229 slist = [] 1230 add_services(import_svcs, 'import', slist) 1231 add_services(import_svcs, 'export', slist) 1232 req['service'] = slist 1236 1233 1237 1234 if self.local_access.has_key(uri):
Note: See TracChangeset
for help on using the changeset viewer.