#!/usr/local/bin/python import sys from federation.remote_service import service_caller from federation.client_lib import client_opts, exit_with_fault, RPCException, \ wrangle_standard_options, do_rpc, get_experiment_names parser = client_opts() (opts, args) = parser.parse_args() cert, fid = wrangle_standard_options(opts) try: resp_dict = do_rpc({ }, opts.url, opts.transport, cert, opts.trusted, serialize_only=opts.serialize_only, tracefile=opts.tracefile, caller=service_caller('MultiInfo'), responseBody='MultiInfoResponseBody') except RPCException, e: exit_with_fault(e) except RuntimeError, e: sys.exit("Error processing RPC: %s" % e) # This is a terse way to print a line with the localname, fedid, and status of # each experiment, one line per experiment, separated by colons. for exp in resp_dict.get('info', []): f , l = get_experiment_names(exp.get('experimentID', None)) print ":".join([ l or "" , "%s" % (f or "") , exp.get('experimentStatus', "") ])