Exemplo n.º 1
0
               'force': {'options': {'action': 'store_true'}},
               'no-guess-mime-type': {'options': {'action': 'store_false',
                                                  'dest': 'guess_mime_type',
                                                  'default': True}},
               'recursive': {'options': {'action': 'store_true',
                                         'dest': 'dir_op'}},
               'exclude': {'options': {'action': AppendFilter, 'nargs': 1,
                           'dest': 'filters'}},
               'include': {'options': {'action': AppendFilter, 'nargs': 1,
                           'dest': 'filters'}},
               'acl': {'options': {'nargs': 1,
                                   'choices': ['private', 'public-read',
                                               'public-read-write']}}
               }

add_param_descriptions(params_dict)


def awscli_initialize(cli):
    """
    This function is require to use the plugin.  It calls the functions
    required to add all neccessary commands and parameters to the CLI.
    This function is necessary to install the plugin using a configuration
    file
    """
    cli.register("building-command-table.main", add_s3)
    cli.register("building-operation-table.s3", add_commands)
    cli.register("doc-examples.S3.*", add_s3_examples)
    for cmd in cmd_dict.keys():
        cli.register("building-parameter-table.s3.%s" % cmd, add_cmd_params)
Exemplo n.º 2
0
                                             'choices': [
                                                 'STANDARD',
                                                 'REDUCED_REDUNDANCY']}},
               'website-redirect': {'options': {'nargs': 1}},
               'cache-control': {'options': {'nargs': 1}},
               'content-disposition': {'options': {'nargs': 1}},
               'content-encoding': {'options': {'nargs': 1}},
               'content-language': {'options': {'nargs': 1}},
               'expires': {'options': {'nargs': 1}},
               'size-only': {'options': {'action': 'store_true'}, 'documents':
                   ('Makes the size of each key the only criteria used to '
                    'decide whether to sync from source to destination.')},
               'exact-timestamps': {'options': {'action': 'store_true'}, 'documents':
                   ('When syncing from S3 to local, same-sized items will be '
                    'ignored only when the timestamps match exactly. The '
                    'default behavior is to ignore same-sized items unless '
                    'the local version is newer than the S3 version.')},
               'index-document': {'options': {}, 'documents':
                   ('A suffix that is appended to a request that is for a '
                    'directory on the website endpoint (e.g. if the suffix '
                    'is index.html and you make a request to '
                    'samplebucket/images/ the data that is returned will '
                    'be for the object with the key name images/index.html) '
                    'The suffix must not be empty and must not include a '
                    'slash character.')},
               'error-document': {'options': {}, 'documents':
                   'The object key name to use when a 4XX class error occurs.'}

               }
add_param_descriptions(PARAMS_DICT)
Exemplo n.º 3
0
                                               'public-read-write', 
                                               'authenticated-read',
                                               'bucket-owner-read',
                                               'bucket-owner-full-control',
                                               'log-delivery-write']}},
               'grants': {'options': {'nargs': '+'}},
               'sse': {'options': {'action': 'store_true'}},
               'storage-class': {'options': {'nargs': 1,
                                             'choices': [
                                                 'STANDARD',
                                                 'REDUCED_REDUNDANCY']}},
               'website-redirect': {'options': {'nargs': 1}},
               'cache-control': {'options': {'nargs': 1}},
               'content-disposition': {'options': {'nargs': 1}},
               'content-encoding': {'options': {'nargs': 1}},
               'content-language': {'options': {'nargs': 1}},
               'expires': {'options': {'nargs': 1}},
               'index-document': {'options': {}, 'documents':
                   ('A suffix that is appended to a request that is for a '
                    'directory on the website endpoint (e.g. if the suffix '
                    'is index.html and you make a request to '
                    'samplebucket/images/ the data that is returned will '
                    'be for the object with the key name images/index.html) '
                    'The suffix must not be empty and must not include a '
                    'slash character.')},
               'error-document': {'options': {}, 'documents':
                   'The object key name to use when a 4XX class error occurs.'}

               }
add_param_descriptions(PARAMS_DICT)