169 Commits

Author SHA1 Message Date
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
Jenkins
0053b4cf0e Merge "Remove unused json_request." 2012-11-16 23:19:59 +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
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
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
Sam Morrison
29c3af811c Ensure Content-Length header when PUT/POST a container
Fixes bug #951155

Change-Id: Ib1455ddb142137cc0946d50a66540eae6402f598
2012-08-15 15:02:49 +10:00
Chmouel Boudjnah
c8163f4112 Use keystoneclient for authentication.
- This allows us to delegate all 2.0 authentication directly to the
  library without reimplementing ourselves.
- Support reusing a token / storage-url without re-authenticating every
  time via the switch os_storage_url os_auth_token.
- Allow auth via tenant_id instead of just tenant_name via the switch
  os_tenant_id.
- Refactor a bit to make it easier in the future to add new OS features
  (i.e: region).
- Implements blueprint use-keystoneclient-for-swiftclient.
- Fixes bug 1016641.

Change-Id: I532f38a68af884de25326aaac05a2050f5ffa1c7
2012-07-06 18:40:45 +00:00
Chmouel Boudjnah
2bcfe0b4c8 Allow specify tenant:user in user.
We allow having the syntax tenant:user in user since this would make
things easier when switching from auth 1.0 to auth 2.0 and not having to
specify a tenant_name.

In the feature we should use the auth functions from keystoneclient and
be done with those changes, we could then auth by user/tenant-ID.

Change-Id: Ie49748105a678fb9369494e77d41d934d57a39a7
2012-06-27 19:19:37 +00:00
Samuel Merritt
c82773d3d1 Fix pep8 errors w/pep8==1.3.
Also lock down the version of pep8 in
tools/test-requires. python-swiftclient had a passing test suite
yesterday, but today a new and stricter version of pep8 came out, and
the test suite started to fail. Specifying a particular version of
pep8 will prevent that.

Change-Id: I9092d2225c01b99158229918c86b185cdac9d362
2012-06-15 12:18:08 -07:00
Dan Prince
b13823ef18 Raise ClientException for invalid auth version.
- Fixes LP Bug #1008667.
- Fix a pep8 error along the way to pass jenkins.
- Update openstack.swift.common to get jenkins passing for 1.2 pep8
  error.

Change-Id: I4ce86a94e1c799807a2ad8e7e1c502b1eb8a51c7
2012-06-06 19:07:08 +02:00
Chmouel Boudjnah
a42892c1f9 Add logging.
- If SWIFTCLIENT_DEBUG env is defined then print the full query with curl.
2012-05-09 15:50:17 +01:00
Chmouel Boudjnah
4c5ee99f5b Make sure we get a header StorageURL with 1.0
- Since RAX auth always come back with 200 we can't check with status code.
2012-05-08 15:07:58 +01:00
Chmouel Boudjnah
b55acc34f0 First commit. 2012-05-08 13:09:17 +01:00