Changeset ce81d09
- Timestamp:
- May 26, 2010 7:46:44 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- b3227fd
- Parents:
- 2fd8f8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_ftopo.py
r2fd8f8c rce81d09 45 45 sys.exit("Error processing RPC: %s" % e) 46 46 47 emap = { } 48 if 'embedding' in resp_dict: 49 for e in resp_dict['embedding']: 50 tn = e.get('toponame', None) 51 if tn: 52 emap[tn] = ":".join((tn, 53 ",".join(e.get('physname', [])),e.get('testbed',""))) 54 else: 55 sys.exit("No embedding") 56 47 57 if 'experimentdescription' in resp_dict and \ 48 58 'topdldescription' in resp_dict['experimentdescription']: 49 top = \ 50 topdl.Topology(\ 51 **resp_dict['experimentdescription']['topdldescription']) 52 53 for e in [ e for e in top.elements \ 54 if isinstance(e, topdl.Computer)]: 55 hn = e.get_attribute('hostname') or "-" 56 tb = e.get_attribute('testbed') or "-" 57 print ":".join((e.name, hn, tb)) 59 top = topdl.Topology( 60 **resp_dict['experimentdescription']['topdldescription']) 61 for e in top.elements: 62 if isinstance(e, topdl.Computer) and e.name in emap: 63 print emap[e.name] 58 64 else: 59 sys.exit("Badly formatted response !?")65 sys.exit("Badly formatted response (no experiment descrption)!?")
Note: See TracChangeset
for help on using the changeset viewer.