Changeset e83f2f2 for fedd/fedd_image.py


Ignore:
Timestamp:
Dec 14, 2010 6:58:28 PM (9 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_image.py

    r52b6ebc re83f2f2  
    88
    99from federation import topdl
     10from federation.proof import proof
    1011from federation.remote_service import service_caller
    1112from federation.client_lib import client_opts, exit_with_fault, RPCException, \
    12         wrangle_standard_options, do_rpc, get_experiment_names, save_certfile
     13        wrangle_standard_options, do_rpc, get_experiment_names, save_certfile,\
     14        log_authentication
    1315
    1416
     
    296298            caller=service_caller('Info'), responseBody="InfoResponseBody")
    297299
     300    proof = proof.from_dict(resp_dict.get('proof', {}))
     301    if proof and opts.auth_log:
     302        log_authentication(opts.auth_log, 'Image', 'succeeded', proof)
    298303    return extract_topo_from_message(resp_dict, opts.serialize_only)
    299304
     
    374379        top = get_experiment_topo(opts, cert, url)
    375380    except RPCException, e:
    376         exit_with_fault(e)
     381        exit_with_fault(e, 'image', opts)
    377382    except RuntimeError, e:
    378383        sys.exit("%s" % e)
     
    386391    except RPCException, e:
    387392        print >>sys.stderr, "Cannot extract a topology from %s" % opts.file
    388         exit_with_fault(e)
     393        exit_with_fault(e, 'image', opts)
    389394    except RuntimeError, e:
    390395        sys.exit("Cannot extract a topology from %s: %s" % (opts.file, e))
Note: See TracChangeset for help on using the changeset viewer.