150 Commits

Author SHA1 Message Date
Flaper Fesp
4ac431a9a2 Print useful message when keystoneclient is not installed
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
2013-02-05 10:13:56 +01:00
Jenkins
b5f222b5d6 Merge "Use testr instead of nose." 2013-01-30 21:56:29 +00:00
Jenkins
8298803091 Merge "Fix reporting version." 2013-01-30 20:53:33 +00:00
Chmouel Boudjnah
9a484dfd63 Fix reporting version.
- Fixes bug 1102691.

Change-Id: I72749a1c87a1f337b45d193e923b437d12270b05
2013-01-22 16:32:50 +01:00
Jenkins
bf09dd9573 Merge "Update to latest oslo version/setup." 2013-01-21 21:50:21 +00:00
Jenkins
c194266096 Merge "Add generated files to .gitignore." 2013-01-21 21:19:12 +00:00
Monty Taylor
bfeffb6366 Use testr instead of nose.
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
2013-01-18 16:13:27 -05:00
Monty Taylor
8b80285da6 Update to latest oslo version/setup.
Change-Id: I7bd38b950ef9fea8b6eaa1df599085a1c64d8b61
2013-01-14 03:29:22 -08:00
Jenkins
3d04363ba4 Merge "Add env[SWIFTCLIENT_INSECURE]" 2013-01-10 20:10:30 +00:00
Monty Taylor
1aa712eaf2 Add generated files to .gitignore.
Change-Id: I609b98d3ffe576313d3206925a03b1657d3fbce9
2013-01-10 08:45:26 +00:00
You Yamagata
5edb40b442 Add env[SWIFTCLIENT_INSECURE]
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
2013-01-10 13:26:53 +09:00
Chmouel Boudjnah
ab4282ebb4 Fix debug feature and add --debug to swift.
- 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
2013-01-07 17:59:12 +01:00
Monty Taylor
e93d47a930 Use testtools as base class for test cases.
Part of blueprint grizzly-testtools

Change-Id: Iff9aac184a115df9b396e218209962e6897a32d9
2012-12-26 09:36:07 -06:00
Dean Troyer
f65f96bc59 Add --os-cacert
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
2012-12-20 14:03:19 -06:00
Jenkins
7df9cadbf0 Merge "Add --insecure option to fix bug #1077869" 2012-12-09 09:19:33 +00:00
Jenkins
1662cbd0a3 Merge "Don't add trailing slash to auth URL." 2012-12-06 01:45:16 +00:00
You Yamagata
6a4dc039ff Add --insecure option to fix bug #1077869
If enable this option , swift CLI is allowed to access a keystone
server with self signed certificate.

Change-Id: I5e219fe875b246b68ac51a077e7ff15e95463adf
2012-12-05 13:26:37 +09:00
yuan-zhou
d702d00ab4 Don't segment objects smaller than --segment-size
Fix bug 1075184

Change-Id: I369e742ca802744ac20e3575828cfa881018de6d
2012-12-04 10:27:13 +08:00
Jenkins
4efe3bfa7e Merge "Adding segment size as another x-object-manifest component" 2012-12-03 19:41:46 +00:00
Juan J. Martinez
994c691d66 Don't add trailing slash to auth URL.
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
2012-12-03 10:20:33 +00:00
yuan-zhou
94511a0624 Adding segment size as another x-object-manifest component
Fix bug 1082930

Change-Id: I2cee91a8f74a3f58379b1b4aefae9401ba5b02c1
2012-11-27 15:33:50 +08:00
Nick Craig-Wood
402d87c757 Stop loss of precision when writing 'x-object-meta-mtime'
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
2012-11-18 11:42:18 +00:00
Jenkins
0053b4cf0e Merge "Remove unused json_request." 2012-11-16 23:19:59 +00:00
Jenkins
4cd4093bd6 Merge "Force utf-8 encode of HTTPConnection params" 2012-11-16 23:13:09 +00:00
Chmouel Boudjnah
8e63b53a9b Remove unused json_request.
- This has been long delegated to python-keystoneclient for auth 2.0.

Change-Id: I92b1fc2db68192cfeefd623c59882f65a4e4405c
2012-11-16 14:47:27 +10:00
Jenkins
015dc502a9 Merge "tell nose to explicity test the 'tests' directory" 2012-11-16 01:41:30 +00:00
Jenkins
5427f7f501 Merge "Fixes setup compatibility issue on Windows" 2012-11-15 22:01:46 +00:00
Christian Berendt
1bbee8189c fixed inconsistencies in parameter descriptions
Change-Id: I208c7fe97c8ec543b5e1cd230527d3eceb52570f
2012-11-13 08:41:42 +01:00
John Dickinson
b4272711ed tell nose to explicity test the 'tests' directory
Change-Id: Ib6afa775defc521794da627952edbf69721b0874
2012-11-08 16:55:15 +01:00
Alessandro Pilotti
7253133837 Fixes setup compatibility issue on Windows
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
2012-11-06 20:08:11 +02:00
Tihomir Trifonov
8b42f8a40c Force utf-8 encode of HTTPConnection params
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
2012-11-02 21:33:32 +02:00
Steven Hardy
656b80bef3 swiftclient Connection : default optional arguments to None
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
2012-10-24 22:40:31 +01:00
Doug Hellmann
2be776c2e5 Add OpenStack trove classifier for PyPI
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>
2012-10-22 18:52:46 -04:00
Jenkins
a99a37f7f6 Merge " Fix swiftclient 400 error when OS_AUTH_URL is set." 2012-10-02 06:28:09 +00:00
Jenkins
57dfd21e1b Merge "Resolves issue with empty os_options for swift-bench & swift-dispersion-report" 2012-09-21 23:31:07 +00:00
Andy McCrae
fe7c535db3 Resolves issue with empty os_options for swift-bench & swift-dispersion-report
Fixes Bug 1044204

Change-Id: I5f0863776bc4e2953548bc7a3958141378a032a0
2012-09-20 10:05:03 +00:00
Donagh McCabe
3265ad5241 Catch authorization failures
Catch the most common authorization exceptions.

Fixes bug 1048560

Change-Id: I81c562d6093e94e827e6583dcb31db8408980476
2012-09-18 09:25:42 +01:00
Mark Washenberger
9b3c4f847d Do not use dictionaries as default parameters
Change-Id: I1e2b7065a7cfad2511fbcee669f666257ef291d0
2012-09-13 05:36:38 +00:00
Donagh McCabe
68d1550f15 Add region_name support
Add --os-region-name (and OS_REGION_NAME env) to bin/swift
Add region_name to the os_options in Connection class.

bug 1019832

Change-Id: Id8515d97e5351638dce10581c7368f61518e1fa7
2012-09-11 09:26:12 +01:00
David Kranz
4b4fbf0dc0 Allow endpoint type to be specified.
Fixes bug 1037690.

Change-Id: I36b3807b2f3234c778316f1e743d27304755aed8
2012-09-04 12:53:18 -04:00
Jenkins
c97a90c847 Merge "PEP8 issues fixed" 2012-08-29 17:26:41 +00:00
Chmouel Boudjnah
cec3a79b8b PEP8 cleanup.
Some trivial pep8 cleanup.

Change-Id: I0f02c0730bf889b2b89063bef6bcc8b71d36505c
2012-08-29 13:40:32 +02:00
Ray Chen
93b5997843 PEP8 issues fixed
1. Have a better indent in doc/source/conf.py
2. Fix an import issue

Change-Id: I5811c195157706d2a85c0fd47666e67f94b2c558
2012-08-29 13:43:15 +08:00
Darrell Bishop
c94ca0e298 Add ability to download without writing to disk.
This patch adds a "--no-download" option to the "download" command.
When given, all writing to disk is bypassed, while still actually
downloading the data and validating etags.

This can be handy when you're using the swift command-line client to
test out a swift cluster and don't want client-side disk writing to be a
bottle-neck (but you still want to know about any etag validation
failures).

Change-Id: I0a511f473a64820161d1eb529b995900742794f2
2012-08-28 13:41:50 -07:00
lrqrun
3207e36984 Fix PEP8 issues.
Fix some pep8 issues in doc/source/conf.py make the code looks pretty.

Change-Id: Icc5ce260aaae8a2c436f5146840ffde4e6ef2839
2012-08-28 20:00:49 +08:00
Jenkins
58baa42075 Merge "Add nosehtmloutput as a test dependency." 2012-08-28 06:05:23 +00:00
Dean Troyer
55f0886066 Change '_' to '-' in options
This changes every command-line option with a '_' in its name
and changes them to '-'.  The old option names are maintained
for backward compatibility but are no longer in the help text.

BP command-options

Change-Id: I79b3c03f59ce8e253aa0dcbf0c2ed5a56d71cd0c
2012-08-23 14:16:50 -05:00
yuxcer
8e2e97fd75 Fix swiftclient 400 error when OS_AUTH_URL is set.
Description: The swift command tool will set the auth version
        to 2 if OS_AUTH_URL is set even use -V 1 option to set Version
        to 1.So when use nova/glance client and swift client in the
        same shell, and export environment OS_AUTH_URL, it will lead
        swift client to raise 400 error if swift not use keystone
        for auth.
	Fixes bug 1034158

Change-Id: I8003ff2ad4ac25fd710f87c4dab1507f6040ed3d
2012-08-22 18:06:39 +08:00
Jenkins
46aad0e8fb Merge "Ensure Content-Length header when PUT/POST a container" 2012-08-22 00:04:17 +00:00
Clark Boylan
b0eb070655 Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: I4292ba27db9371d5a8dae4b901a46165b9ee6721
2012-08-21 14:40:00 -07:00