Merge "Fix swiftclient help"

This commit is contained in:
Jenkins 2014-02-10 21:51:58 +00:00 committed by Gerrit Code Review
commit f13288ae32

@ -86,9 +86,11 @@ Optional arguments:
--all Delete all containers and objects --all Delete all containers and objects
--leave-segments Do not delete segments of manifest objects --leave-segments Do not delete segments of manifest objects
--object-threads <threads> --object-threads <threads>
Number of threads to use for deleting objects Number of threads to use for deleting objects.
Default is 10
--container-threads <threads> --container-threads <threads>
Number of threads to use for deleting containers Number of threads to use for deleting containers.
Default is 10
'''.strip("\n") '''.strip("\n")
@ -238,7 +240,7 @@ def st_delete(parser, args, thread_manager):
st_download_options = '''[--all] [--marker] [--prefix <prefix>] st_download_options = '''[--all] [--marker] [--prefix <prefix>]
[--output <out_file>] [--object-threads <threads>] [--output <out_file>] [--object-threads <threads>]
[--container-threads <threads>] [--no-download] [--container-threads <threads>] [--no-download]
<container> <object> <container> [object]
''' '''
st_download_help = ''' st_download_help = '''
@ -247,7 +249,7 @@ Download objects from containers
Positional arguments: Positional arguments:
<container> Name of container to download from. To download a <container> Name of container to download from. To download a
whole account, omit this and specify --all. whole account, omit this and specify --all.
<object> Name of object to download. Specify multiple times [object] Name of object to download. Specify multiple times
for multiple objects. Omit this to download all for multiple objects. Omit this to download all
objects from the container. objects from the container.
@ -261,9 +263,11 @@ Optional arguments:
<out_file>. Specifying "-" as <out_file> will <out_file>. Specifying "-" as <out_file> will
redirect to stdout redirect to stdout
--object-threads <threads> --object-threads <threads>
Number of threads to use for downloading objects Number of threads to use for downloading objects.
Default is 10
--container-threads <threads> --container-threads <threads>
Number of threads to use for deleting containers Number of threads to use for downloading containers.
Default is 10
--no-download Perform download(s), but don't actually write anything --no-download Perform download(s), but don't actually write anything
to disk to disk
--header <header_name:header_value> --header <header_name:header_value>
@ -294,7 +298,7 @@ def st_download(parser, args, thread_manager):
default=10, help='Number of threads to use for downloading objects') default=10, help='Number of threads to use for downloading objects')
parser.add_option( parser.add_option(
'', '--container-threads', type=int, default=10, '', '--container-threads', type=int, default=10,
help='Number of threads to use for listing containers') help='Number of threads to use for downloading containers')
parser.add_option( parser.add_option(
'', '--no-download', action='store_true', '', '--no-download', action='store_true',
default=False, default=False,
@ -478,8 +482,8 @@ def st_download(parser, args, thread_manager):
for obj in args[1:]: for obj in args[1:]:
object_queue.put((args[0], obj)) object_queue.put((args[0], obj))
st_list_options = '''[--long] [--lh] [--totals] st_list_options = '''[--long] [--lh] [--totals] [--prefix <prefix>]
[--container-threads <threads>] [--delimiter <delimiter>]
''' '''
st_list_help = ''' st_list_help = '''
Lists the containers for the account or the objects for a container Lists the containers for the account or the objects for a container
@ -490,7 +494,7 @@ Positional arguments:
Optional arguments: Optional arguments:
--long Long listing format, similar to ls -l --long Long listing format, similar to ls -l
--lh Report sizes in human readable format similar to ls -lh --lh Report sizes in human readable format similar to ls -lh
--totals Used with -l or --ls, only report totals --totals Used with -l or --lh, only report totals
--prefix Only list items beginning with the prefix --prefix Only list items beginning with the prefix
--delimiter Roll up items with the given delimiter. For containers --delimiter Roll up items with the given delimiter. For containers
only. See OpenStack Swift API documentation for what only. See OpenStack Swift API documentation for what
@ -507,7 +511,7 @@ def st_list(parser, args, thread_manager):
"similar to ls -lh switch, but -h taken", action='store_true', "similar to ls -lh switch, but -h taken", action='store_true',
default=False) default=False)
parser.add_option( parser.add_option(
'-t', '--totals', dest='totals', help='used with -l or --ls, ' '-t', '--totals', dest='totals', help='used with -l or --lh, '
'only report totals', 'only report totals',
action='store_true', default=False) action='store_true', default=False)
parser.add_option( parser.add_option(
@ -598,15 +602,15 @@ def st_list(parser, args, thread_manager):
thread_manager.error('Container %r not found', args[0]) thread_manager.error('Container %r not found', args[0])
st_stat_options = '''[--lh] st_stat_options = '''[--lh]
<container> <object> [container] [object]
''' '''
st_stat_help = ''' st_stat_help = '''
Displays information for the account, container, or object Displays information for the account, container, or object
Positional arguments: Positional arguments:
<container> Name of container to stat from [container] Name of container to stat from
<object> Name of object to stat. Specify multiple times [object] Name of object to stat. Specify multiple times
for multiple objects for multiple objects
Optional arguments: Optional arguments:
@ -655,7 +659,7 @@ def st_stat(parser, args, thread_manager):
st_post_options = '''[--read-acl <acl>] [--write-acl <acl>] [--sync-to] st_post_options = '''[--read-acl <acl>] [--write-acl <acl>] [--sync-to]
[--sync-key <sync-key>] [--meta <name:value>] [--sync-key <sync-key>] [--meta <name:value>]
[--header <header>] [--header <header>]
<container> <object> [container] [object]
''' '''
st_post_help = ''' st_post_help = '''
@ -663,7 +667,7 @@ Updates meta information for the account, container, or object.
If the container is not found, it will be created automatically. If the container is not found, it will be created automatically.
Positional arguments: Positional arguments:
<container> Name of container to post to [container] Name of container to post to
[object] Name of object to post. Specify multiple times [object] Name of object to post. Specify multiple times
for multiple objects for multiple objects