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
Before commit 7d88d14d (http://git.io/hhJWdQ) swifclient used to accept
header value with the type None :
{'Headers': None}
It would just be happy with it with those None headers and not process
them, reinstate the old behavior.
Closes-Bug: 1256441
Change-Id: Ic7f80c38ef2ce9ef1687ed0d6d65521f2e754905
We noticed a difference in download bandwidth while using
authentication details and pre-auth information for download.
Download using authentication details included authentication
time into the download bandwidth at each call of the function.
This time should have been excluded from download bandwidth.
This patch set is adding a timer variable to the client library.
That allows to accurately measure and store the time of each action.
Then while printing the download bandwith in the swift command
authentication time is excluded from bandwidth.
Change-Id: I63df9023e169f637f120ae9e25dac9c90a4e75a0
Fixes: bug #1197443
To ignore swap files from getting into repository
currently the implemented ignore is *.swp
however vim adds more swap files if these files exists,
so improving this with *.sw?
Change-Id: I48846345de6838735d2d2e46328698f6a526f397
Closes-Bug: #1255876
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
* log to debug for successes and info for errors
* remove dead code, neither body or raw_body are sent in kwargs
* include resp.reason and response headers in logging
* remove trailing \n in logging. users who want them can set logging.basicConfig(format=FORMAT)
* add --info option to swift cli
Change-Id: If07af46cb377f3f3d70f6c4284037241d360a8b7
Appends the container's name to the URL displayed, to be used to
replay the queries with curl.
Replaying the curl commands displayed by "swift --debug list
<container>" now works properly.
Example:
$ swift --debug list test-container
...
DEBUG:swiftclient:REQ: curl -i http://10.0.48.134:8080/v1/AUTH_6c554b8dd3d74e44878eddb92caf8687/test-container?format=json -X GET -H ...
...
Change-Id: I7ec33d185fedc44a529c016d38f841fde39d20d0
Closes-Bug: #1238612
This lets you build python-swiftclient packages that don't require pbr
to be installed at all. You would need pbr on the machine running
rpmbuild / debuild, but not on the machines that install the packages.
Unfortunately, this does not make python-swiftclient able to be
installed via pip 0.3.1 on Lucid; you'll need to uninstall the system
python-pip package and install a new pip some other way. Given that
pip < 1.3 doesn't perform SSL certificate validation for pypi (trivial
MITM attack, anyone?), you'd probably want to get a new pip anyway.
Change-Id: I85d4d77aacf094e48d39e48e750594b95dbc7af0
When you stat a container or object with the verbose flag the full path of the
reousrce will be displayed with the token similarlly to how an account stat
displays the auth url and token.
* move some logic out of bin/swift.st_stat to test it
* new module swiftclient.commnad_helpers for code you want to test
* moved prt_bytes into swiftclient.utils to test it
* fixed IndexError with prt_bytes on sizes >= 1024Y
Change-Id: Iaaa96e0308b08c554205b0055b8a04de581fefa4
This commit fixes a problem where headers passed through the option
--header were not taken into account when doing "post" queries.
Change-Id: Ia34808c53a1816d9956a98e0803d8c4d20d2ad44
Closes-Bug: #1226256
Specifically, removing d2to1 is the important part. While we're at it
though, use hacking to get the pyflakes/pep8 pins.
Change-Id: Ic4a43955526fcde313ad2f2afec8fafeb87f37a6
Make it clear that you do not have to provide either the container or
object positional parameters, and what swiftclient will do if you omit
them.
Change-Id: I3766fc1eabd51f197e2175771af579577a96c192
Reformatted the help outputs in the swift client to bring them more
in line with the rest of the openstack clients. Changes were added to
all of the st_command_help variables and a new variable
st_command_options was added to help with correct formatting of
help outputs.
Change-Id: I0c549cf96292384ddb36b43ecec41a883d8b2e13
Implements: changes to help outputs
I was gunna write a test, but mocking ImportErrors is a PITA, so I decided to
just get my tox py26 working instead. Tests seem to fail/pass as expected
without/with the inline NullHanlder.
Closes-Bug: 1212861
Change-Id: I20207374a77ee9969ab201c3a57e4caf40c02a61
This patch extracts the multi-threading code from bin/swift into
swiftclient/multithreading and adds tests. In particular, this new way
of doing it (with context managers) will prevent non-daemonic threads
from wedging the process when unexpected exceptions happen.
I enabled reporting of which lines, specifically, are not covered by
unit tests (added -m option to "coverage report" in .unittests).
This patch includes a drive-by fix for uploading a segmented file with
--use-slo when that object already exists. A key of "name" was used
instead of "path", raising KeyError.
There's also another drive-by fix for uploading segmented objects with
--use-slo. Commit 874e0e4427b80e1b15b74a1557b73ba9d61443ca regressed
this by removing the capturing of thread-worker results in
QueueFunctionThread.run(). This patch restores that functionality and
the feature (uploading SLO objects).
Change-Id: I0b4f677e4a734e83d1a25088d9a74f7d46384e53
Added log statements in swiftclient/client.py:_retry where exceptions
are being raised.
Fixes bug# 1202229
Change-Id: I727537177849d08bb9603aa884152bdebc62fb85
There were two undocumented parameters in there, one introduced
recently in 6411fd3, and the other some time before.
Change-Id: I3a7d59e1c272b382b035b88ba5495bc1c57a3154
See bug #1188896.
Comparing with Curl and Django, they both refuse carriage returns in
header values, so the request() method on the HTTP(S)Connection instance
returned by swiftclient.client.http_connection() will raise an
InvalidHeadersException if any of the headers to be sent contain a
newline.
Drive-by fix for a couple of header values which were integers instead
of strings (Content-Length getting set to zero).
Fixes bug #1188896
Change-Id: Ic6afdb92882284f843aacb06d20f682ddcb47151