Alistair Coles f90d7f28e5 Fix bug with some OS options not being passed to client
Fixes a regression that is preventing swiftclient from
authenticating using keystone v3 options.

swiftclient/shell.py processes the dict of command
line options to set up a child dict ('os_options')
of keystone auth specific options (line 960). The
processing includes stripping --os- prefixes from
the command line options before adding keys to
os_options.

A recent patch https://review.openstack.org/#/c/85453/
introduced a duplication of this option processing
in service.py (line 79) which replaces the os_options
created in shell.py, but omits keystone v3 related
options. Consequently the keystone v3 options are
not being passed to the client get_auth() method.

This patch adds the keystone v3 related options to
the option processing in service.py.

For pragmatic reasons (i.e. fixing the bug quickly)
the option processing code has not been removed from
parse_args in shell.py. It is likely that the code in
parse_args is now redundant, but all code paths between
parse_args and process_options should be inspected and
test coverage added before removing that code.

Unit tests have been added in test_shell.py to verify
that command line options are correctly passed to the
client get_auth method.

The MockHttpTest class is re-used in test_shell.py,
so it is moved from test_swiftclient.py
to tests/unit/utils.py

Closes-bug: #1372465

Change-Id: I4fed013cdb8936509609d06093337cc147ade0d6
2014-09-24 18:19:12 +01:00
2014-03-25 11:36:39 +00:00
2014-05-09 09:29:04 +02:00
2014-07-24 17:54:10 -04:00
2014-07-03 14:54:25 +08:00
2012-05-08 16:30:13 +01:00
2013-05-01 12:23:12 -04:00
2012-05-21 12:52:55 +02:00
2014-08-21 01:01:24 +03:00
2013-09-13 11:02:05 -05:00
2014-07-24 20:59:45 -04:00

Python bindings to the OpenStack Object Storage API

This is a python client for the Swift API. There's a Python API (the swiftclient module), and a command-line script (swift).

You can find the documentation online.

Development takes place via the usual OpenStack processes as outlined in the OpenStack wiki. The master repository is on GitHub.

This code is based on original the client previously included with OpenStack's swift The python-swiftclient is licensed under the Apache License like the rest of OpenStack.

Contents:

Description
OpenStack Storage (Swift) Client
Readme 14 MiB
Languages
Python 99.9%
Shell 0.1%