Ignore:
Timestamp:
Dec 14, 2010 6:58:28 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
c092b7f
Parents:
2627eb3
Message:

Move proofs around. Lots of changes, including fault handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/fedd_create.py

    r2627eb3 re83f2f2  
    99from string import join
    1010
     11from federation.proof import proof
    1112from federation.fedid import fedid, generate_fedid
    1213from federation.remote_service import service_caller
    1314from federation.client_lib import client_opts, exit_with_fault, RPCException, \
    1415        wrangle_standard_options, do_rpc, get_experiment_names, save_certfile,\
    15         get_abac_certs
     16        get_abac_certs, log_authentication
    1617from federation.util import abac_split_cert, abac_context_to_creds
    1718from federation import topdl
     
    247248            caller=service_caller('New'), responseBody="NewResponseBody")
    248249except RPCException, e:
    249     exit_with_fault(e)
     250    exit_with_fault(e, 'New (create)', opts)
    250251except RuntimeError, e:
    251252    sys.exit("Error processing RPC: %s" % e)
     
    253254if opts.debug > 1: print >>sys.stderr, resp_dict
    254255
     256proof = proof.from_dict(resp_dict.get('proof', {}))
     257if proof and opts.auth_log:
     258    log_authentication(opts.auth_log, 'New (create)', 'succeeded', proof)
    255259# Save the experiment ID certificate if we need it
    256260try:
     
    303307            serialize_only=opts.serialize_only,
    304308            tracefile=opts.tracefile,
    305             caller=service_caller('Create'), responseBody="CreateResponseBody")
     309            caller=service_caller('Create', max_retries=1), responseBody="CreateResponseBody")
    306310except RPCException, e:
    307     exit_with_fault(e)
     311    exit_with_fault(e, 'Create', opts)
    308312except RuntimeError, e:
    309313    sys.exit("Error processing RPC: %s" % e)
     
    318322if e_fedid: print "fedid: %s" % e_fedid
    319323if st: print "status: %s" % st
    320 
     324proof = proof.from_dict(resp_dict.get('proof', {}))
     325if proof and opts.auth_log:
     326    log_authentication(opts.auth_log, 'Create', 'succeeded', proof)
Note: See TracChangeset for help on using the changeset viewer.