15 Commits

Author SHA1 Message Date
Cheng Li
69bf4634b9 Add an option: disable etag check on downloads
This patch is to add an option of disable etag
check on downloads.

Change-Id: I9ad389dd691942dea6db470ca3f0543eb6e9703e
Closes-bug: #1581147
2016-06-02 22:53:18 +08:00
Tim Burke
7a1e192803 Use bulk-delete middleware when available
When issuing `delete` commands that would require three or more
individual deletes, check whether the cluster supports bulk deletes
and use that if it's available.

Additionally, a new option is added to the `delete` command:

  * --prefix <prefix>

    Delete all objects that start with <prefix>. This is similar to the
    --prefix option for the `list` command.

Example:

$ swift delete c --prefix obj_prefix/

    ...will delete from container "c" all objects whose name begins with
    "obj_prefix/", such as "obj_prefix/foo" and "obj_prefix/bar".

Change-Id: I6b9504848d6ef562cf4f570bbcd17db4e3da8264
2016-01-12 15:40:57 -08:00
Peter Lisák
3b1f4fda72 Unification of manpages and docstrings
* adding missing options
* unification of help

Change-Id: I2365e66433b63de8fd4da205611d9c1bf3bb6730
2015-11-13 17:32:12 +01:00
Zack M. Davis
52d39bebc1 absolute expiry option for tempURL generation
The `tempurl` subcommand's second positional argument is called
`seconds` and has heretofore interpreted as the number of seconds for
which the tempURL should be valid, counting from the moment of running
the command. This is indeed a common, if not the most common,
use-case. But some users, occasionally, might want to generate a tempURL
that expires at some particular ("absolute") time, rather than a
particular amount of time relative to the moment of happening to run the
command. (One might make an analogy to the way in which Swift's expiring
object support supports an `X-Delete-At` header in addition to
`X-Delete-After`—and it's the former that must be regarded as
ontologically prior.) Thus, this commit adds an `--absolute` optional
argument to the `tempurl` subcommand; if present, the `seconds` argument
will be interpreted as a Unix timestamp of when the tempURL should be
expire, rather than a duration for which the tempURL should be valid
starting from "now".

Change-Id: If9ded96f2799800958d5063127f3de812f50ef06
2015-09-04 14:57:30 -07:00
Zack M. Davis
ca70dd9e15 add tempurl command to swift.1 man page
Change-Id: Ifccc7f6dc049ca0ac2c53c00b1704cff4d1a770f
Closes-Bug: #1450606
2015-07-13 11:38:58 -07:00
Hirokazu Sakata
eb85f8c1a4 Add help message for "<subcommand> --help"
This patch fixed help message for "<subcommand> --help" in
general help message. Previous help message was only
"this help message". It has not described for subcommand.

Change-Id: I2fe6413baf98ba3881425ee6bed29c618e29fff8
Closes-Bug: 1420253
2015-02-10 20:52:17 +09:00
Thomas Goirand
822274b637 swift.1 manpage fix for groff warnings
The current manual page contains hyphens where a minus sign
was intended. By default, "-" chars are interpreted as
hyphens (U+2010) by groff, not as minus signs (U+002D).
Since options to programs use minus signs (U+002D), this
means for example in UTF-8 locales that you cannot cut and
paste options, nor search for them easily.

This patch fixes this by escaping hyphens with backslashes,
and also fixes a typo: s/retreived/retrieved/.

Change-Id: If954c91eebe7b39bdac792f1f126998d2e3bcb8e
2014-02-18 11:42:18 +08:00
Fabien Boucher
533c9c5ba1 Add capabilities option
This patch adds a capabilities option on swiftclient.
This option uses the new /info endpoint to request the
remote capabilities and nicely display it.

Change-Id: Ie34b454511d5527e402e66e1fdb72120f427f2fd
2014-01-17 10:26:34 +01:00
Taurus Cheung
26ecec0f6d Add --object-name
Add parameter --object-name, which:
1) Sets target object name when upload single file
2) Sets object prefix when upload a directory

Change-Id: Idc4357c3355e66d31c100540b901e70db20b03c3
Closes-Bug: 1012979
2013-12-24 10:27:17 +08:00
Matthieu Huin
3cabda8c48 Allow custom headers when using swift download (CLI)
This fixes bug #1051046

A repeatable option, --header or -H, is added so a user can specify
custom headers such as Range or If-Modified-Since when downloading
an object with the swift CLI.

Change-Id: I1f7dcf64cf625f2e5a4488c210894cfe6e0d5974
2013-11-04 17:41:55 +01:00
Alex Gaynor
ff6ba367fa Replaced two references to Cloud Files with Swift
Change-Id: I721f2b25a255a829c625b34928b066df3cd3e632
2013-11-01 11:40:44 -07:00
Darrell Bishop
1d4d51b218 Allow storage url override for both auth vers.
When --os-storage-url is specified on the command-line to bin/swift, it
will override the used storage URL regardless of authentication for both
authentication version 1 and version 2.  This can be used to bypass a
load-balancer to hit a specific proxy server for testing/debugging
purposes.

Within the client library, this feature is accessed by passing the
desired storage URL into swiftclient.client.Conection.__init__() via the
os_options keyword argument.  For example:

  conn = Connection(auth_url, user, key, os_options={
    'object_storage_url': 'http://overridden.storage.url/AUTH_foo'})

This patch also adds a dependency on mock>=0.8.0, which is the same as
openstack/swift.

Change-Id: Id2a36ed6abffd65e7762b6beea5bbfc6c036e848
2013-07-05 14:12:59 -05:00
Mark Seger
17bb3fa779 Add -l and --lh switches to swift 'list' command
Also updated man page and added an example in 'list'
command help message

Change-Id: Icf38de9bab6d387a9a1deed444a91f68b4389cfe
2013-06-10 16:49:44 +00:00
Pete Zaitcev
07311a0639 Update the man page
- Add -V option
- Use uniform and correct capitalization for OpenStack Swift
- Make the example of output of stat command up-to-date
- Generally prettify the document
- Remove all trailing whitespace

Change-Id: Id3da2035851847c4bff8cec8f927d3654824bf5b
2013-05-21 15:34:21 -06:00
Pete Zaitcev
d79c435bfe Add client man page swift.1
This is the byte-by-byte copy of swift.1 that was left behind
in the main Swift package when python-swiftclient was split away.
Apparently there is absolutely nothing to be changed in setup.py
and the distribution packagers are supposed to pick the page as-is
using their packaging systems.

Change-Id: I24f238501589db940574eac61b89a1422fe2fd77
2013-02-26 12:47:34 -07:00