Some mechancical replacement of the deprecated except x,y:
construct with except x as y, which works with any Python
version >= 2.6
Change-Id: Ic245049dc7b408a5c89b9e27dfd2bd7c08acc5b5
Add to the help strings to clarify the need for --os-auth-token to
also have --os-storage-url supplied.
Change-Id: I6a7259c38ce01813ae96f307efaf46e7863bd223
Also fixed bug with current large objects with segment listing prefixes.
Allow retry for object PUTs when possible.
Change-Id: I0edff127fd5d5c53da33aa7cb76a4f4dc85bf6e6
Files test_swiftclient.py and utils.py had all pep8 errors
fixed.
Also added tests directory to tox.ini file, so that
pep8 would monitor tests directory by default.
Change-Id: Id60a2cd88bd814d1dcbeca951764c9d236500837
Fixes: bug #1158819
Currently swift client does not allow content type to be specified
when upload an object. It does not allow a user to change content
type neither. This patch will allow a user to specify content
type by using upload command or modify the content type by using
post command.
For example:
1. To upload an object with specific content type:
swift upload -H content-type:applicaiton/xml con1 file1
2. To modify an object to a specific content type:
swift post -H content-type:application/josn con1 file1
This patch also allow a client to specify other request headers.
Change-Id: I12db83a1d465285e0906889cc67dfaa44e059568
Fixes: bug #1154621
Changed documentation for chunk_size parameter to indicate
that it can be used only with file like objects.
Also added a UserWarning when using a string contents to inform
that chunk_size will be ignored.
Added a unit test to check whether the warning is working
correctly.
Fixes: bug #1147232
Change-Id: I618ec45520ba81905ce2ead4d61f192d21ae3489
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
Fix bug 1110924
Add segment container option as part of 'swift upload -S'. If this
option is omitted, the segments will go to <container>_segments.
Example:
$ swift upload c1 obj1 -S 1 -C user_segments
Please check swift upload --help for more details
Change-Id: Ib71aae322485d8d3ac89916d37ebcac053f49e3b
client.py now prints a useful message when trying to use Auth version
2.0 and keystoneclient is not installed.
Fixes bug 1102322
Change-Id: I6ed83610fd6e8c79c2dc5cf05db377a843cab1d5
nose is invasive and can sometimes alter the outcome of a test run. testr,
on the other hand, keeps a distinction between running tests and displaying
results of the test runs. Additionally, it supports the stock python unittest
protocol.
Even better, testr supports parallel test running, which makes things faster,
and a command "testr run --failing" which will just re-run the latest failing
tests (often something one wants to do in iterative dev)
Part of blueprint grizzly-testtools
Change-Id: I0b3f1bcb5d4ff59c65eb3219b30a9e64f54d70bd
Add env[SWIFTCLIENT_INSECURE] as default of --insecure option.
If set to 'true', allow to access insecure keystone server.
The name follows 'NOVACLIENT_INSECURE' in novaclient.
Change-Id: I322674eba9c07e6def97bce339815fa15191a92d
- Remove PYTHON_SWIFTCLIENT and use --debug making it more consistents
with other openstack clients libraries.
- Fix printing the curl command.
- Don't show the body of the GET objects it could get bad on large
objects and it's an iterator anyway.
- Use -I for showing HEADs (and not -X HEAD).
Change-Id: I954e7d3d795401fc3679725440dec36cdc80af87
Add support to specify a ca certificate bundle to verify
keystone TLS (https) certificates. This only verifies
certificates on the keystone connection, swift https
connections are unchanged.
Change-Id: I14351b405af4fd3d1970ba6656c1282a5d0a1082
If enable this option , swift CLI is allowed to access a keystone
server with self signed certificate.
Change-Id: I5e219fe875b246b68ac51a077e7ff15e95463adf
Adding a trailing slash to the authentication URL may interfere with
auth service implementations not using /FOO/ but /FOO as authentication
URL.
OpenStack Object Storage API 1.0 doesn't specify that the auth URL must
end in a slash and swiftclient.client doesn't force it either.
Change-Id: I4e6b6d758d5ccc884e253880513e3d8763ffc2ff
Fixes: bug #1085827
str(float) isn't a good way of converting a float to a string with all the precision
Eg
>>> f = os.path.getmtime("z")
>>> f
1347717491.343554
>>> str(f)
'1347717491.34'
>>> "%f" % f
'1347717491.343554'
Change-Id: I6eb02f7f6730eff814c348d1039eae4606642b52
Fixes Bug #1052161
"python setup.py build" fails on Windows due to a hardcoded shell path:
/bin/sh
setup.py updated using openstack-common/update.py
Change-Id: I763dd5613d91a2523087173b196500648c477fa6
This patch forces swiftclient to encode to utf-8
all url and headers arguments, to avoid the
UnicodeDecodeError which is raised by '\r\n'.join([])
invoked in htplib.py.
Currently the affected projects are Horizon(upload file
with unicode name) and swiftclient CLI('swift post' with
unicode filename as header)
This is also a follow-up of this review:
https://review.openstack.org/#/c/14216/
I'd still want to hear what the Swift core devs
think of it. Is it better to create a new
AutoEncodingHTTPConnection? Or to handle the connection
creation and make sure there are no unicode and utf-8
string at the same time. If these unicode checks have to
be added in the calling code(Dashboard, CLI), there are
so many places to be added, and also in all new commands
that might be exposed from the API.
Fixes bug 1008940
Change-Id: Ice2aa29024429d3e6f569a88d5cf8b4202537827
Default the authurl/user/key constructor arguments for the
Connection class to None, as these are not required in the
preauthurl/preauthtoken case
Change-Id: I445a5d365212c365ecc691c0a670a226e2b7954a
Add trove classifier to have the client listed among the
other OpenStack-related projets on PyPI.
Change-Id: I7b2a9b0e163b79593662bfa799f076f538e3d7ca
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>