Changeset c5869ef for fedd/federation/experiment_control.py
- Timestamp:
- May 26, 2010 3:18:49 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- cf00ddd
- Parents:
- fefa026
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
rfefa026 rc5869ef 1017 1017 self.node = { } 1018 1018 1019 #def make_map(self, resp): 1020 #if 'segmentdescription' in resp and \ 1021 #'topdldescription' in resp['segmentdescription']: 1022 #top = topdl.Topology(\ 1023 #**resp['segmentdescription']['topdldescription']) 1024 #for e in [e for e in top.elements \ 1025 #if isinstance(e, topdl.Computer)]: 1026 #hn = e.get_attribute('hostname') 1027 #if hn: 1028 #for n in e.name: 1029 #self.node[n] = hn 1030 1019 1031 def make_map(self, resp): 1020 if 'segmentdescription' in resp and \ 1021 'topdldescription' in resp['segmentdescription']: 1022 top = topdl.Topology(\ 1023 **resp['segmentdescription']['topdldescription']) 1024 for e in [e for e in top.elements \ 1025 if isinstance(e, topdl.Computer)]: 1026 hn = e.get_attribute('hostname') 1027 if hn: 1028 for n in e.name: 1029 self.node[n] = hn 1032 for e in resp.get('embedding', []): 1033 if 'toponame' in e and 'physname' in e: 1034 self.node[e['toponame']] = e['physname'][0] 1030 1035 1031 1036 def __call__(self, uri, aid, topo, masters, attrs=None, connInfo=None): … … 1226 1231 for s in starters: 1227 1232 node.update(s.node) 1228 # Assign gthe mapping as a hostname attribute1233 # Assign the mapping as a hostname attribute 1229 1234 for e in [ e for e in top.elements \ 1230 1235 if isinstance(e, topdl.Computer)]:
Note: See TracChangeset
for help on using the changeset viewer.