コード例 #1
0
ファイル: handlers.py プロジェクト: freimer/aws-cli
def awscli_initialize(event_handlers):
    event_handlers.register('load-cli-arg', uri_param)
    param_shorthand = ParamShorthand()
    event_handlers.register('process-cli-arg', param_shorthand)
    # The s3 error mesage needs to registered before the
    # generic error handler.
    register_s3_error_msg(event_handlers)
    error_handler = ErrorHandler()
    event_handlers.register('after-call', error_handler,
                            unique_id='awscli-error-handler')
#    # The following will get fired for every option we are
#    # documenting.  It will attempt to add an example_fn on to
#    # the parameter object if the parameter supports shorthand
#    # syntax.  The documentation event handlers will then use
#    # the examplefn to generate the sample shorthand syntax
#    # in the docs.  Registering here should ensure that this
#    # handler gets called first but it still feels a bit brittle.
#    event_handlers.register('doc-option-example.*.*.*',
#                            param_shorthand.add_example_fn)
    event_handlers.register('doc-examples.*.*',
                            add_examples)
    register_cli_input_json(event_handlers)
    event_handlers.register('building-argument-table.*',
                            add_streaming_output_arg)
    event_handlers.register('building-argument-table.ec2.run-instances',
                            ec2_add_count)
    event_handlers.register('building-argument-table.ec2.get-password-data',
                            ec2_add_priv_launch_key)
    register_parse_global_args(event_handlers)
    register_pagination(event_handlers)
    register_secgroup(event_handlers)
    register_bundleinstance(event_handlers)
    s3_plugin_initialize(event_handlers)
    register_runinstances(event_handlers)
    register_removals(event_handlers)
    register_preview_commands(event_handlers)
    register_rds_modify_split(event_handlers)
    register_put_metric_data(event_handlers)
    register_ses_send_email(event_handlers)
    IAMVMFAWrapper(event_handlers)
    register_arg_renames(event_handlers)
    register_dryrun_docs(event_handlers)
    register_configure_cmd(event_handlers)
    cloudtrail_init(event_handlers)
    register_bool_params(event_handlers)
    register_protocol_args(event_handlers)
    datapipeline.register_customizations(event_handlers)
    cloudsearch_init(event_handlers)
    emr_initialize(event_handlers)
    register_cloudsearchdomain(event_handlers)
    register_s3_endpoint(event_handlers)
    register_generate_cli_skeleton(event_handlers)
    register_assume_role_provider(event_handlers)
    register_add_waiters(event_handlers)
    codedeploy_init(event_handlers)
    register_subscribe(event_handlers)
    register_get_status(event_handlers)
    register_rename_config(event_handlers)
    register_scalar_parser(event_handlers)
    opsworks_init(event_handlers)
コード例 #2
0
def awscli_initialize(event_handlers):
    param_shorthand = ParamShorthand()
    event_handlers.register('process-cli-arg', param_shorthand)
    error_handler = ErrorHandler()
    event_handlers.register('after-call.*.*', error_handler)
    # The following will get fired for every option we are
    # documenting.  It will attempt to add an example_fn on to
    # the parameter object if the parameter supports shorthand
    # syntax.  The documentation event handlers will then use
    # the examplefn to generate the sample shorthand syntax
    # in the docs.  Registering here should ensure that this
    # handler gets called first but it still feels a bit brittle.
    event_handlers.register('doc-option-example.*.*.*',
                            param_shorthand.add_example_fn)
    event_handlers.register('doc-examples.*.*', add_examples)
    event_handlers.register('building-argument-table.s3api.*',
                            add_streaming_output_arg)
    event_handlers.register('building-argument-table.ec2.run-instances',
                            ec2_add_count)
    event_handlers.register('building-argument-table', unify_paging_params)
    event_handlers.register('building-argument-table.ec2.get-password-data',
                            ec2_add_priv_launch_key)
    register_secgroup(event_handlers)
    register_bundleinstance(event_handlers)
    s3_plugin_initialize(event_handlers)
    register_runinstances(event_handlers)
    register_removals(event_handlers)
    register_preview_commands(event_handlers)
    register_rds_modify_split(event_handlers)
    register_put_metric_data(event_handlers)
    register_ses_send_email(event_handlers)
    IAMVMFAWrapper(event_handlers)
    register_arg_renames(event_handlers)
    register_dryrun_docs(event_handlers)
    register_resource_id(event_handlers)