OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 # Copyright 2011 Google Inc. All Rights Reserved. | 2 # Copyright 2011 Google Inc. All Rights Reserved. |
3 # | 3 # |
4 # Licensed under the Apache License, Version 2.0 (the "License"); | 4 # Licensed under the Apache License, Version 2.0 (the "License"); |
5 # you may not use this file except in compliance with the License. | 5 # you may not use this file except in compliance with the License. |
6 # You may obtain a copy of the License at | 6 # You may obtain a copy of the License at |
7 # | 7 # |
8 # http://www.apache.org/licenses/LICENSE-2.0 | 8 # http://www.apache.org/licenses/LICENSE-2.0 |
9 # | 9 # |
10 # Unless required by applicable law or agreed to in writing, software | 10 # Unless required by applicable law or agreed to in writing, software |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 num_retries | 187 num_retries |
188 | 188 |
189 [GSUtil] | 189 [GSUtil] |
190 check_hashes | 190 check_hashes |
191 content_language | 191 content_language |
192 default_api_version | 192 default_api_version |
193 default_project_id | 193 default_project_id |
194 json_api_version | 194 json_api_version |
195 parallel_composite_upload_component_size | 195 parallel_composite_upload_component_size |
196 parallel_composite_upload_threshold | 196 parallel_composite_upload_threshold |
| 197 sliced_object_download_component_size |
| 198 sliced_object_download_max_components |
| 199 sliced_object_download_threshold |
197 parallel_process_count | 200 parallel_process_count |
198 parallel_thread_count | 201 parallel_thread_count |
199 prefer_api | 202 prefer_api |
200 resumable_threshold | 203 resumable_threshold |
201 resumable_tracker_dir (deprecated in 4.6, use state_dir) | 204 resumable_tracker_dir (deprecated in 4.6, use state_dir) |
202 rsync_buffer_lines | 205 rsync_buffer_lines |
203 software_update_check_period | 206 software_update_check_period |
204 state_dir | 207 state_dir |
205 tab_completion_time_logs | 208 tab_completion_time_logs |
206 tab_completion_timeout | 209 tab_completion_timeout |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 DEFAULT_PARALLEL_PROCESS_COUNT = multiprocessing.cpu_count() | 294 DEFAULT_PARALLEL_PROCESS_COUNT = multiprocessing.cpu_count() |
292 DEFAULT_PARALLEL_THREAD_COUNT = 10 | 295 DEFAULT_PARALLEL_THREAD_COUNT = 10 |
293 else: | 296 else: |
294 DEFAULT_PARALLEL_PROCESS_COUNT = 1 | 297 DEFAULT_PARALLEL_PROCESS_COUNT = 1 |
295 DEFAULT_PARALLEL_THREAD_COUNT = 24 | 298 DEFAULT_PARALLEL_THREAD_COUNT = 24 |
296 | 299 |
297 # TODO: Once compiled crcmod is being distributed by major Linux distributions | 300 # TODO: Once compiled crcmod is being distributed by major Linux distributions |
298 # revert DEFAULT_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD value to '150M'. | 301 # revert DEFAULT_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD value to '150M'. |
299 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD = '0' | 302 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD = '0' |
300 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_COMPONENT_SIZE = '50M' | 303 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_COMPONENT_SIZE = '50M' |
| 304 DEFAULT_SLICED_OBJECT_DOWNLOAD_THRESHOLD = '150M' |
| 305 DEFAULT_SLICED_OBJECT_DOWNLOAD_COMPONENT_SIZE = '200M' |
| 306 DEFAULT_SLICED_OBJECT_DOWNLOAD_MAX_COMPONENTS = 4 |
301 | 307 |
302 CONFIG_BOTO_SECTION_CONTENT = """ | 308 CONFIG_BOTO_SECTION_CONTENT = """ |
303 [Boto] | 309 [Boto] |
304 | 310 |
305 # http_socket_timeout specifies the timeout (in seconds) used to tell httplib | 311 # http_socket_timeout specifies the timeout (in seconds) used to tell httplib |
306 # how long to wait for socket timeouts. The default is 70 seconds. Note that | 312 # how long to wait for socket timeouts. The default is 70 seconds. Note that |
307 # this timeout only applies to httplib, not to httplib2 (which is used for | 313 # this timeout only applies to httplib, not to httplib2 (which is used for |
308 # OAuth2 refresh/access token exchanges). | 314 # OAuth2 refresh/access token exchanges). |
309 #http_socket_timeout = 70 | 315 #http_socket_timeout = 70 |
310 | 316 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 # Values can be provided either in bytes or as human-readable values | 432 # Values can be provided either in bytes or as human-readable values |
427 # (e.g., "150M" to represent 150 mebibytes) | 433 # (e.g., "150M" to represent 150 mebibytes) |
428 # | 434 # |
429 # Note: At present parallel composite uploads are disabled by default, because | 435 # Note: At present parallel composite uploads are disabled by default, because |
430 # using composite objects requires a compiled crcmod (see "gsutil help crcmod"), | 436 # using composite objects requires a compiled crcmod (see "gsutil help crcmod"), |
431 # and for operating systems that don't already have this package installed this | 437 # and for operating systems that don't already have this package installed this |
432 # makes gsutil harder to use. Google is actively working with a number of the | 438 # makes gsutil harder to use. Google is actively working with a number of the |
433 # Linux distributions to get crcmod included with the stock distribution. Once | 439 # Linux distributions to get crcmod included with the stock distribution. Once |
434 # that is done we will re-enable parallel composite uploads by default in | 440 # that is done we will re-enable parallel composite uploads by default in |
435 # gsutil. | 441 # gsutil. |
| 442 # |
| 443 # Note: Parallel composite uploads should not be used with NEARLINE storage |
| 444 # class buckets, as doing this would incur an early deletion charge for each |
| 445 # component object. |
436 #parallel_composite_upload_threshold = %(parallel_composite_upload_threshold)s | 446 #parallel_composite_upload_threshold = %(parallel_composite_upload_threshold)s |
437 #parallel_composite_upload_component_size = %(parallel_composite_upload_componen
t_size)s | 447 #parallel_composite_upload_component_size = %(parallel_composite_upload_componen
t_size)s |
438 | 448 |
| 449 # 'sliced_object_download_threshold' and |
| 450 # 'sliced_object_download_component_size' have analogous functionality to |
| 451 # their respective parallel_composite_upload config values. |
| 452 # 'sliced_object_download_max_components' specifies the maximum number of |
| 453 # slices to be used when performing a sliced object download. It is not |
| 454 # restricted by MAX_COMPONENT_COUNT. |
| 455 #sliced_object_download_threshold = %(sliced_object_download_threshold)s |
| 456 #sliced_object_download_component_size = %(sliced_object_download_component_size
)s |
| 457 #sliced_object_download_max_components = %(sliced_object_download_max_components
)s |
| 458 |
439 # 'use_magicfile' specifies if the 'file --mime-type <filename>' command should | 459 # 'use_magicfile' specifies if the 'file --mime-type <filename>' command should |
440 # be used to guess content types instead of the default filename extension-based | 460 # be used to guess content types instead of the default filename extension-based |
441 # mechanism. Available on UNIX and MacOS (and possibly on Windows, if you're | 461 # mechanism. Available on UNIX and MacOS (and possibly on Windows, if you're |
442 # running Cygwin or some other package that provides implementations of | 462 # running Cygwin or some other package that provides implementations of |
443 # UNIX-like commands). When available and enabled use_magicfile should be more | 463 # UNIX-like commands). When available and enabled use_magicfile should be more |
444 # robust because it analyzes file contents in addition to extensions. | 464 # robust because it analyzes file contents in addition to extensions. |
445 #use_magicfile = False | 465 #use_magicfile = False |
446 | 466 |
447 # 'content_language' specifies the ISO 639-1 language code of the content, to be | 467 # 'content_language' specifies the ISO 639-1 language code of the content, to be |
448 # passed in the Content-Language header. By default no Content-Language is sent. | 468 # passed in the Content-Language header. By default no Content-Language is sent. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 'hash_fast_else_skip': CHECK_HASH_IF_FAST_ELSE_SKIP, | 506 'hash_fast_else_skip': CHECK_HASH_IF_FAST_ELSE_SKIP, |
487 'hash_always': CHECK_HASH_ALWAYS, | 507 'hash_always': CHECK_HASH_ALWAYS, |
488 'hash_never': CHECK_HASH_NEVER, | 508 'hash_never': CHECK_HASH_NEVER, |
489 'resumable_threshold': EIGHT_MIB, | 509 'resumable_threshold': EIGHT_MIB, |
490 'parallel_process_count': DEFAULT_PARALLEL_PROCESS_COUNT, | 510 'parallel_process_count': DEFAULT_PARALLEL_PROCESS_COUNT, |
491 'parallel_thread_count': DEFAULT_PARALLEL_THREAD_COUNT, | 511 'parallel_thread_count': DEFAULT_PARALLEL_THREAD_COUNT, |
492 'parallel_composite_upload_threshold': ( | 512 'parallel_composite_upload_threshold': ( |
493 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD), | 513 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD), |
494 'parallel_composite_upload_component_size': ( | 514 'parallel_composite_upload_component_size': ( |
495 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_COMPONENT_SIZE), | 515 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_COMPONENT_SIZE), |
| 516 'sliced_object_download_threshold': ( |
| 517 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD), |
| 518 'sliced_object_download_component_size': ( |
| 519 DEFAULT_PARALLEL_COMPOSITE_UPLOAD_COMPONENT_SIZE), |
| 520 'sliced_object_download_max_components': ( |
| 521 DEFAULT_SLICED_OBJECT_DOWNLOAD_MAX_COMPONENTS), |
496 'max_component_count': MAX_COMPONENT_COUNT} | 522 'max_component_count': MAX_COMPONENT_COUNT} |
497 | 523 |
498 CONFIG_OAUTH2_CONFIG_CONTENT = """ | 524 CONFIG_OAUTH2_CONFIG_CONTENT = """ |
499 [OAuth2] | 525 [OAuth2] |
500 # This section specifies options used with OAuth2 authentication. | 526 # This section specifies options used with OAuth2 authentication. |
501 | 527 |
502 # 'token_cache' specifies how the OAuth2 client should cache access tokens. | 528 # 'token_cache' specifies how the OAuth2 client should cache access tokens. |
503 # Valid values are: | 529 # Valid values are: |
504 # 'in_memory': an in-memory cache is used. This is only useful if the boto | 530 # 'in_memory': an in-memory cache is used. This is only useful if the boto |
505 # client instance (and with it the OAuth2 plugin instance) persists | 531 # client instance (and with it the OAuth2 plugin instance) persists |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 sys.stderr.write('\n' + '\n'.join(textwrap.wrap( | 1104 sys.stderr.write('\n' + '\n'.join(textwrap.wrap( |
1079 'Boto config file "%s" created.\nIf you need to use a proxy to ' | 1105 'Boto config file "%s" created.\nIf you need to use a proxy to ' |
1080 'access the Internet please see the instructions in that file.' | 1106 'access the Internet please see the instructions in that file.' |
1081 % output_file_name)) + '\n') | 1107 % output_file_name)) + '\n') |
1082 | 1108 |
1083 return 0 | 1109 return 0 |
1084 | 1110 |
1085 | 1111 |
1086 def _CleanupHandler(unused_signalnum, unused_handler): | 1112 def _CleanupHandler(unused_signalnum, unused_handler): |
1087 raise AbortException('User interrupted config command') | 1113 raise AbortException('User interrupted config command') |
OLD | NEW |