Merge "swiftclient: add short options to help message"
This commit is contained in:
commit
207e80c65c
@ -66,7 +66,7 @@ Positional arguments:
|
|||||||
for multiple objects.
|
for multiple objects.
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
--all Delete all containers and objects.
|
-a, --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.
|
||||||
@ -89,10 +89,10 @@ def st_delete(parser, args, output_manager):
|
|||||||
'', '--object-threads', type=int,
|
'', '--object-threads', type=int,
|
||||||
default=10, help='Number of threads to use for deleting objects. '
|
default=10, help='Number of threads to use for deleting objects. '
|
||||||
'Default is 10.')
|
'Default is 10.')
|
||||||
parser.add_option('', '--container-threads', type=int,
|
parser.add_option(
|
||||||
default=10, help='Number of threads to use for '
|
'', '--container-threads', type=int,
|
||||||
'deleting containers. '
|
default=10, help='Number of threads to use for deleting containers. '
|
||||||
'Default is 10.')
|
'Default is 10.')
|
||||||
(options, args) = parse_args(parser, args)
|
(options, args) = parse_args(parser, args)
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
if (not args and not options.yes_all) or (args and options.yes_all):
|
if (not args and not options.yes_all) or (args and options.yes_all):
|
||||||
@ -156,6 +156,7 @@ st_download_options = '''[--all] [--marker] [--prefix <prefix>]
|
|||||||
[--object-threads <threads>]
|
[--object-threads <threads>]
|
||||||
[--container-threads <threads>] [--no-download]
|
[--container-threads <threads>] [--no-download]
|
||||||
[--skip-identical] [--remove-prefix]
|
[--skip-identical] [--remove-prefix]
|
||||||
|
[--header <header:value>]
|
||||||
<container> <object>
|
<container> <object>
|
||||||
'''
|
'''
|
||||||
|
|
||||||
@ -170,17 +171,18 @@ Positional arguments:
|
|||||||
objects from the container.
|
objects from the container.
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
--all Indicates that you really want to download
|
-a, --all Indicates that you really want to download
|
||||||
everything in the account.
|
everything in the account.
|
||||||
--marker Marker to use when starting a container or account
|
-m, --marker Marker to use when starting a container or account
|
||||||
download.
|
download.
|
||||||
--prefix <prefix> Only download items beginning with <prefix>
|
-p, --prefix <prefix> Only download items beginning with <prefix>
|
||||||
--remove-prefix An optional flag for --prefix <prefix>, use this
|
-r, --remove-prefix An optional flag for --prefix <prefix>, use this
|
||||||
option to download items without <prefix>
|
option to download items without <prefix>
|
||||||
--output <out_file> For a single file download, stream the output to
|
-o, --output <out_file>
|
||||||
|
For a single file download, stream the output to
|
||||||
<out_file>. Specifying "-" as <out_file> will
|
<out_file>. Specifying "-" as <out_file> will
|
||||||
redirect to stdout.
|
redirect to stdout.
|
||||||
--output-dir <out_directory>
|
-D, --output-dir <out_directory>
|
||||||
An optional directory to which to store objects.
|
An optional directory to which to store objects.
|
||||||
By default, all objects are recreated in the current
|
By default, all objects are recreated in the current
|
||||||
directory.
|
directory.
|
||||||
@ -192,9 +194,9 @@ Optional arguments:
|
|||||||
Default is 10.
|
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>
|
-H, --header <header:value>
|
||||||
Adds a customized request header to the query, like
|
Adds a customized request header to the query, like
|
||||||
"Range" or "If-Match". This argument is repeatable.
|
"Range" or "If-Match". This option may be repeated.
|
||||||
Example --header "content-type:text/plain"
|
Example --header "content-type:text/plain"
|
||||||
--skip-identical Skip downloading files that are identical on both
|
--skip-identical Skip downloading files that are identical on both
|
||||||
sides.
|
sides.
|
||||||
@ -241,7 +243,7 @@ def st_download(parser, args, output_manager):
|
|||||||
'-H', '--header', action='append', dest='header',
|
'-H', '--header', action='append', dest='header',
|
||||||
default=[],
|
default=[],
|
||||||
help='Adds a customized request header to the query, like "Range" or '
|
help='Adds a customized request header to the query, like "Range" or '
|
||||||
'"If-Match". This argument is repeatable. '
|
'"If-Match". This option may be repeated. '
|
||||||
'Example: --header "content-type:text/plain"')
|
'Example: --header "content-type:text/plain"')
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
'--skip-identical', action='store_true', dest='skip_identical',
|
'--skip-identical', action='store_true', dest='skip_identical',
|
||||||
@ -366,12 +368,12 @@ Positional arguments:
|
|||||||
[container] Name of container to list object in.
|
[container] Name of container to list object in.
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
--long Long listing format, similar to ls -l.
|
-l, --long Long listing format, similar to ls -l.
|
||||||
--lh Report sizes in human readable format similar to
|
--lh Report sizes in human readable format similar to
|
||||||
ls -lh.
|
ls -lh.
|
||||||
--totals Used with -l or --lh, only report totals.
|
-t, --totals Used with -l or --lh, only report totals.
|
||||||
--prefix Only list items beginning with the prefix.
|
-p, --prefix Only list items beginning with the prefix.
|
||||||
--delimiter Roll up items with the given delimiter. For containers
|
-d, --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
|
||||||
this means.
|
this means.
|
||||||
'''.strip('\n')
|
'''.strip('\n')
|
||||||
@ -577,17 +579,22 @@ Positional arguments:
|
|||||||
[object] Name of object to post.
|
[object] Name of object to post.
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
--read-acl <acl> Read ACL for containers. Quick summary of ACL syntax:
|
-r, --read-acl <acl> Read ACL for containers. Quick summary of ACL syntax:
|
||||||
.r:*, .r:-.example.com, .r:www.example.com, account1,
|
.r:*, .r:-.example.com, .r:www.example.com, account1,
|
||||||
account2:user2
|
account2:user2
|
||||||
--write-acl <acl> Write ACL for containers. Quick summary of ACL syntax:
|
-w, --write-acl <acl> Write ACL for containers. Quick summary of ACL syntax:
|
||||||
account1 account2:user2
|
account1 account2:user2
|
||||||
--sync-to <sync-to> Sync To for containers, for multi-cluster replication.
|
-t, --sync-to <sync-to>
|
||||||
--sync-key <sync-key> Sync Key for containers, for multi-cluster replication.
|
Sync To for containers, for multi-cluster replication.
|
||||||
--meta <name:value> Sets a meta data item. This option may be repeated.
|
-k, --sync-key <sync-key>
|
||||||
|
Sync Key for containers, for multi-cluster replication.
|
||||||
|
-m, --meta <name:value>
|
||||||
|
Sets a meta data item. This option may be repeated.
|
||||||
Example: -m Color:Blue -m Size:Large
|
Example: -m Color:Blue -m Size:Large
|
||||||
--header <header> Set request headers. This option may be repeated.
|
-H, --header <header:value>
|
||||||
Example -H "content-type:text/plain"
|
Adds a customized request header.
|
||||||
|
This option may be repeated. Example
|
||||||
|
-H "content-type:text/plain" -H "Content-Length: 4000"
|
||||||
'''.strip('\n')
|
'''.strip('\n')
|
||||||
|
|
||||||
|
|
||||||
@ -612,7 +619,8 @@ def st_post(parser, args, output_manager):
|
|||||||
'Example: -m Color:Blue -m Size:Large')
|
'Example: -m Color:Blue -m Size:Large')
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
'-H', '--header', action='append', dest='header',
|
'-H', '--header', action='append', dest='header',
|
||||||
default=[], help='Set request headers. This option may be repeated. '
|
default=[], help='Adds a customized request header. '
|
||||||
|
'This option may be repeated. '
|
||||||
'Example: -H "content-type:text/plain" '
|
'Example: -H "content-type:text/plain" '
|
||||||
'-H "Content-Length: 4000"')
|
'-H "Content-Length: 4000"')
|
||||||
(options, args) = parse_args(parser, args)
|
(options, args) = parse_args(parser, args)
|
||||||
@ -665,8 +673,7 @@ st_upload_options = '''[--changed] [--skip-identical] [--segment-size <size>]
|
|||||||
<container> <file_or_directory>
|
<container> <file_or_directory>
|
||||||
'''
|
'''
|
||||||
|
|
||||||
st_upload_help = '''
|
st_upload_help = ''' Uploads specified files and directories to the given container.
|
||||||
Uploads specified files and directories to the given container.
|
|
||||||
|
|
||||||
Positional arguments:
|
Positional arguments:
|
||||||
<container> Name of container to upload to.
|
<container> Name of container to upload to.
|
||||||
@ -674,10 +681,11 @@ Positional arguments:
|
|||||||
times for multiple uploads.
|
times for multiple uploads.
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
--changed Only upload files that have changed since the last
|
-c, --changed Only upload files that have changed since the last
|
||||||
upload.
|
upload.
|
||||||
--skip-identical Skip uploading files that are identical on both sides.
|
--skip-identical Skip uploading files that are identical on both sides.
|
||||||
--segment-size <size> Upload files in segments no larger than <size> (in
|
-S, --segment-size <size>
|
||||||
|
Upload files in segments no larger than <size> (in
|
||||||
Bytes) and then create a "manifest" file that will
|
Bytes) and then create a "manifest" file that will
|
||||||
download all the segments as if it were the original
|
download all the segments as if it were the original
|
||||||
file.
|
file.
|
||||||
@ -694,9 +702,10 @@ Optional arguments:
|
|||||||
--segment-threads <threads>
|
--segment-threads <threads>
|
||||||
Number of threads to use for uploading object segments.
|
Number of threads to use for uploading object segments.
|
||||||
Default is 10.
|
Default is 10.
|
||||||
--header <header> Set request headers with the syntax header:value.
|
-H, --header <header:value>
|
||||||
This option may be repeated.
|
Adds a customized request header. This option may be
|
||||||
Example -H "content-type:text/plain".
|
repeated. Example -H "content-type:text/plain"
|
||||||
|
-H "Content-Length: 4000".
|
||||||
--use-slo When used in conjunction with --segment-size it will
|
--use-slo When used in conjunction with --segment-size it will
|
||||||
create a Static Large Object instead of the default
|
create a Static Large Object instead of the default
|
||||||
Dynamic Large Object.
|
Dynamic Large Object.
|
||||||
@ -1130,7 +1139,7 @@ usage: %%prog [--version] [--help] [--os-help] [--snet] [--verbose]
|
|||||||
[--os-endpoint-type <endpoint-type>]
|
[--os-endpoint-type <endpoint-type>]
|
||||||
[--os-cacert <ca-certificate>] [--insecure]
|
[--os-cacert <ca-certificate>] [--insecure]
|
||||||
[--no-ssl-compression]
|
[--no-ssl-compression]
|
||||||
<subcommand> [--help]
|
<subcommand> [--help] [<subcommand options>]
|
||||||
|
|
||||||
Command-line interface to the OpenStack Swift API.
|
Command-line interface to the OpenStack Swift API.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user