- Timestamp:
- May 26, 2010 6:42:48 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- ce81d09
- Parents:
- f432e51
- Location:
- fedd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_info.py
rf432e51 r2fd8f8c 17 17 action="append", type="choice", 18 18 choices=("id", "experimentdescription", "federant", "vtopo", 19 "vis", "log", "status" ),19 "vis", "log", "status", "embedding"), 20 20 help="data to extract") 21 21 … … 48 48 formatter = info_format() 49 49 for d in opts.data: 50 formatter(resp_dict, d) 50 try: 51 formatter(resp_dict, d) 52 except RuntimeError, e: 53 print >>sys.stderr, "Warning: %s" % e -
fedd/federation/client_lib.py
rf432e51 r2fd8f8c 204 204 'status': 'experimentStatus', 205 205 'log': 'allocationLog', 206 'embedding': 'embedding', 206 207 } 207 208 self.formatter = { … … 213 214 'status': self.print_string, 214 215 'log': self.print_string, 216 'embedding': self.print_xml, 215 217 } 216 218 -
fedd/federation/experiment_control.py
rf432e51 r2fd8f8c 1016 1016 self.response = None 1017 1017 self.node = { } 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] = hn1030 1018 1031 1019 def make_map(self, resp): … … 1228 1216 # Walk through the successes and gather the virtual to physical 1229 1217 # mapping. 1230 node = { }1218 embedding = [ ] 1231 1219 for s in starters: 1232 node.update(s.node) 1233 # Assign the mapping as a hostname attribute 1234 for e in [ e for e in top.elements \ 1235 if isinstance(e, topdl.Computer)]: 1236 for n in e.name: 1237 if n in node: 1238 e.set_attribute('hostname', node[n]) 1220 for k, v in s.node.items(): 1221 embedding.append({ 1222 'toponame': k, 1223 'physname': [ v], 1224 'testbed': s.testbed 1225 }) 1239 1226 log.info("[start_segment]: Experiment %s active" % eid) 1240 1227 … … 1258 1245 self.state[eid]['experimentdescription']['topdldescription'] = \ 1259 1246 top.to_dict() 1247 self.state[eid]['embedding'] = embedding 1260 1248 if self.state_filename: self.write_state() 1261 1249 self.state_lock.release()
Note: See TracChangeset
for help on using the changeset viewer.