source: fedd/fedd_multiinfo.py @ a0c2866

axis_examplecompt_changesinfo-ops
Last change on this file since a0c2866 was a0c2866, checked in by Ted Faber <faber@…>, 14 years ago

Make sure there is an abac directory.

  • Property mode set to 100755
File size: 1.3 KB
Line 
1#!/usr/local/bin/python
2
3import sys
4import os
5import pwd
6import tempfile
7import subprocess
8import re
9import xml.parsers.expat
10import time
11
12from federation.remote_service import service_caller
13from federation.client_lib import client_opts, exit_with_fault, RPCException,\
14        wrangle_standard_options, do_rpc, info_format
15
16class exp_data_opts(client_opts):
17    def __init__(self):
18        client_opts.__init__(self)
19        self.add_option("--data", dest="data", default=[],
20                action="append", type="choice",
21                choices=("id", "experimentdescription", "federant", "vtopo", 
22                    "vis", "log", "status"),
23                help="data to extract")
24       
25parser = exp_data_opts()
26(opts, args) = parser.parse_args()
27try:
28    cert, fid, url = wrangle_standard_options(opts)
29except RuntimeError, e:
30    sys.exit("%s" %e)
31
32try:
33    resp_dict = do_rpc({ },
34            url, opts.transport, cert, opts.trusted, 
35            serialize_only=opts.serialize_only,
36            tracefile=opts.tracefile,
37            caller=service_caller('MultiInfo'), 
38            responseBody='MultiInfoResponseBody')
39except RPCException, e:
40    exit_with_fault(e)
41except RuntimeError, e:
42    sys.exit("Error processing RPC: %s" % e)
43
44formatter = info_format()
45for i in resp_dict.get('info', []):
46    for d in opts.data:
47        formatter(i, d)
48    print "---"
Note: See TracBrowser for help on using the repository browser.