Changeset 0a49bd7 for fedd/fedd_new.py
- Timestamp:
- Jan 15, 2011 5:52:15 PM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- aaf7f41
- Parents:
- ac15159 (diff), 944b746 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Ted Faber <faber@…> (01/15/11 17:51:40)
- git-committer:
- Ted Faber <faber@…> (01/15/11 17:52:15)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_new.py
rac15159 r0a49bd7 2 2 3 3 import sys 4 from datetime import datetime 4 5 5 6 from federation.fedid import fedid, generate_fedid 6 7 from federation.remote_service import service_caller 8 from federation.proof import proof 7 9 from federation.client_lib import client_opts, exit_with_fault, RPCException, \ 8 10 wrangle_standard_options, do_rpc, get_experiment_names, \ 9 save_certfile, get_abac_certs 10 11 save_certfile, get_abac_certs, log_authentication 11 12 12 13 class new_opts(client_opts): … … 14 15 client_opts.__init__(self) 15 16 self.add_option("--experiment_cert", dest="out_certfile", 16 type="string", help="output certificate file") 17 action='callback', callback=self.expand_file, type='str', 18 help="output certificate file") 17 19 self.add_option("--experiment_name", dest="exp_name", 18 20 type="string", help="Suggested experiment name") … … 24 26 (opts, args) = parser.parse_args() 25 27 26 cert, fid, url = wrangle_standard_options(opts)27 28 try: 29 cert, fid, url = wrangle_standard_options(opts) 28 30 acerts = get_abac_certs(opts.abac_dir) 29 31 except EnvironmentError, e: 30 32 sys.exit('%s: %s' % (e.filename, e.strerror)) 33 except RuntimeError, e: 34 sys.exit("%s" %e) 31 35 32 36 out_certfile = opts.out_certfile … … 55 59 caller=service_caller("New"), responseBody='NewResponseBody') 56 60 except RPCException, e: 57 exit_with_fault(e )61 exit_with_fault(e, 'New', opts) 58 62 except RuntimeError, e: 59 63 sys.exit("Error processing RPC: %s" % e) … … 72 76 e_fedid, e_local = get_experiment_names(resp_dict.get('experimentID', None)) 73 77 st = resp_dict.get('experimentStatus', None) 78 proof = proof.from_dict(resp_dict.get('proof', {})) 74 79 75 80 if e_local: print "localname: %s" % e_local 76 81 if e_fedid: print "fedid: %s" % e_fedid 77 82 if st: print "status: %s" % st 83 if proof and opts.auth_log: 84 log_authentication(opts.auth_log, 'New', 'succeeded', proof)
Note: See TracChangeset
for help on using the changeset viewer.