- Timestamp:
- Mar 4, 2012 3:49:46 PM (13 years ago)
- Branches:
- compt_changes, master
- Children:
- 8cab4c2
- Parents:
- a11eda5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
ra11eda5 r2bb8b35 1652 1652 to instantiate them and start it all up. 1653 1653 """ 1654 self.log.info("New experiment call started for %s" % fid) 1654 1655 req = req.get('NewRequestBody', None) 1655 1656 if not req: … … 1664 1665 1665 1666 if not access_ok: 1667 self.log.info("New experiment call for %s: Access denied" % fid) 1666 1668 raise service_error(service_error.access, "New access denied", 1667 1669 proof=[proof]) … … 1713 1715 } 1714 1716 1717 self.log.info("New experiment call succeeded for %s" % fid) 1715 1718 return rv 1716 1719 … … 1976 1979 rv = None 1977 1980 state = None 1981 self.log.info("vtopo call started for %s" % fid) 1978 1982 1979 1983 req = req.get('VtopoRequestBody', None) … … 2009 2013 self.state_lock.release() 2010 2014 2011 if rv: return rv 2015 if rv: 2016 self.log.info("vtopo call completed for %s %s " % \ 2017 (key, fid)) 2018 return rv 2012 2019 else: 2013 2020 if state: 2021 self.log.info("vtopo call completed for %s %s (Not ready)" % \ 2022 (key, fid)) 2014 2023 raise service_error(service_error.partial, 2015 2024 "Not ready: %s" % state) 2016 2025 else: 2026 self.log.info("vtopo call completed for %s %s (No experiment)"\ 2027 % (key, fid)) 2017 2028 raise service_error(service_error.req, "No such experiment") 2018 2029 … … 2024 2035 state = None 2025 2036 2037 self.log.info("vis call started for %s" % fid) 2026 2038 req = req.get('VisRequestBody', None) 2027 2039 if not req: … … 2061 2073 self.state_lock.release() 2062 2074 2063 if rv: return rv 2075 if rv: 2076 self.log.info("vis call completed for %s %s " % \ 2077 (key, fid)) 2078 return rv 2064 2079 else: 2065 2080 if state: 2081 self.log.info("vis call completed for %s %s (not ready)" % \ 2082 (key, fid)) 2066 2083 raise service_error(service_error.partial, 2067 2084 "Not ready: %s" % state) 2068 2085 else: 2086 self.log.info("vis call completed for %s %s (no experiment)" % \ 2087 (key, fid)) 2069 2088 raise service_error(service_error.req, "No such experiment") 2070 2089 … … 2124 2143 """ 2125 2144 2145 self.log.info("Create experiment call started for %s" % fid) 2126 2146 req = req.get('CreateRequestBody', None) 2127 2147 if req: … … 2228 2248 # exceptions. Failing at this point returns a fault to the remote 2229 2249 # caller. 2250 2251 self.log.info("Create experiment call failed for %s %s: %s" % 2252 (eid, fid, e)) 2230 2253 self.clear_placeholder(eid, expid, tmpdir) 2231 2254 raise e … … 2260 2283 'proof': [ proof.to_dict() ] + proofs, 2261 2284 } 2285 self.log.info("Create experiment call succeeded for %s %s" % \ 2286 (eid, fid)) 2262 2287 2263 2288 return rv … … 2353 2378 rv = None 2354 2379 2380 self.log.info("Info call started for %s" % fid) 2355 2381 req = req.get('InfoRequestBody', None) 2356 2382 if not req: … … 2384 2410 if top is not None: top = top.clone() 2385 2411 self.state_lock.release() 2412 self.log.info("Gathered Info for %s %s" % (key, fid)) 2386 2413 2387 2414 # If the legacy visualization and topology representations are 2388 2415 # requested, calculate them and add them to the return. 2389 2416 if legacy and rv is not None: 2417 self.log.info("Generating legacy Info for %s %s" % (key, fid)) 2390 2418 if top is not None: 2391 2419 vtopo = topdl.topology_to_vtopo(top) … … 2401 2429 rv['vis'] = vis 2402 2430 if rv: 2431 self.log.info("Info succeded for %s %s" % (key, fid)) 2403 2432 rv['proof'] = proof.to_dict() 2404 2433 return rv 2405 else: 2434 else: 2435 self.log.info("Info failed for %s %s: no experiment" % (key, fid)) 2406 2436 raise service_error(service_error.req, "No such experiment") 2407 2437 … … 2541 2571 rv = { 'info': [ ], 'proof': [ ] } 2542 2572 2573 self.log.info("Multi Info call started for %s" % fid) 2543 2574 self.state_lock.acquire() 2544 2575 for key in [ k for k in self.state.keys() if isinstance(k, fedid)]: … … 2549 2580 continue 2550 2581 else: 2582 self.log.info("Multi Info call failed for %s: %s" % \ 2583 (e,fid)) 2551 2584 self.state_lock.release() 2552 2585 raise e … … 2558 2591 rv['proof'].append(proof.to_dict()) 2559 2592 self.state_lock.release() 2593 self.log.info("Multi Info call succeeded for %s" % fid) 2560 2594 return rv 2561 2595 … … 2678 2712 information 2679 2713 """ 2714 self.log.info("Terminate experiment call started for %s" % fid) 2680 2715 tbparams = { } 2681 2716 req = req.get('TerminateRequestBody', None) … … 2740 2775 self.remove_dirs("%s/%s" % (self.repodir, repo)) 2741 2776 2777 self.log.info("Terminate experiment succeeded for %s %s" % \ 2778 (key, fid)) 2742 2779 return { 2743 2780 'experiment': exp , … … 2746 2783 } 2747 2784 else: 2785 self.log.info("Terminate experiment failed for %s %s: no state" % \ 2786 (key, fid)) 2748 2787 raise service_error(service_error.req, "No saved state") 2749 2788
Note: See TracChangeset
for help on using the changeset viewer.