<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-swiftclient.git/tests/unit/test_shell.py, branch 2.3.0</title>
<subtitle>opendev.org: openstack/python-swiftclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/'/>
<entry>
<title>Add importable SwiftService incorporating shell.py logic</title>
<updated>2014-08-26T12:14:21+00:00</updated>
<author>
<name>Joel Wright</name>
<email>joel.wright@sohonet.com</email>
</author>
<published>2014-04-04T19:13:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=24673f8d19fe2f48964f528369081c37e880ec47'/>
<id>24673f8d19fe2f48964f528369081c37e880ec47</id>
<content type='text'>
This patch adds a SwiftService class that incorporates the high
level logic from swiftclient/shell.py. It also ports shell.py to
use the new class, and updates the code in swiftclient/multithreading.py
to allow the SwiftService to be used for multiple operations whilst
using only one thread pool.

Currently, code that imports swiftclient has to have its own logic for
things like creating large objects, parallel uploads, and parallel
downloads. This patch adds a SwiftService class that makes that
functionality available in Python code as well as through the shell.

Change-Id: I08c5796b4c01001d79fd571651c3017c16462ffd
Implements: blueprint bin-swift-logic-as-importable-library
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a SwiftService class that incorporates the high
level logic from swiftclient/shell.py. It also ports shell.py to
use the new class, and updates the code in swiftclient/multithreading.py
to allow the SwiftService to be used for multiple operations whilst
using only one thread pool.

Currently, code that imports swiftclient has to have its own logic for
things like creating large objects, parallel uploads, and parallel
downloads. This patch adds a SwiftService class that makes that
functionality available in Python code as well as through the shell.

Change-Id: I08c5796b4c01001d79fd571651c3017c16462ffd
Implements: blueprint bin-swift-logic-as-importable-library
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "fixed unit tests when env vars are set"</title>
<updated>2014-08-21T20:34:35+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2014-08-21T20:34:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=d97ec374cb1ef91c34e49302842e5a151ee3e476'/>
<id>d97ec374cb1ef91c34e49302842e5a151ee3e476</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not create an empty directory 'pseudo/'</title>
<updated>2014-08-18T22:51:01+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@kotori.zaitcev.us</email>
</author>
<published>2014-08-18T22:51:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=309437bb5255a2205337fb951fc3c6836cfdaabf'/>
<id>309437bb5255a2205337fb951fc3c6836cfdaabf</id>
<content type='text'>
This is a fix-up for the commit 3d56b65c. The code change was good,
but the additional test had a side effect of creating an empty
directory "pseudo/". Fix this by mocking-out mkdirs().

Change-Id: Iead55e72d8a75d96bde0a7491aca12bbdcc269cf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a fix-up for the commit 3d56b65c. The code change was good,
but the additional test had a side effect of creating an empty
directory "pseudo/". Fix this by mocking-out mkdirs().

Change-Id: Iead55e72d8a75d96bde0a7491aca12bbdcc269cf
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed unit tests when env vars are set</title>
<updated>2014-08-18T22:09:33+00:00</updated>
<author>
<name>John Dickinson</name>
<email>me@not.mn</email>
</author>
<published>2014-08-18T22:09:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=2eca5278e6f643e8e7b233df4272afb3e5d1c2ba'/>
<id>2eca5278e6f643e8e7b233df4272afb3e5d1c2ba</id>
<content type='text'>
Change-Id: Ia73c10c7c81b9434895941ea29282dbcdc667556
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ia73c10c7c81b9434895941ea29282dbcdc667556
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Fix crash when downloading a pseudo-directory"</title>
<updated>2014-08-17T19:08:15+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2014-08-17T19:08:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=eedb0d4ab5f2fc6ac8b49a80cd2128edcbc5aceb'/>
<id>eedb0d4ab5f2fc6ac8b49a80cd2128edcbc5aceb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Add keystone v3 auth support"</title>
<updated>2014-08-15T23:24:00+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2014-08-15T23:23:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=23474b7d11b8d9fc97b315062a237c2d5aec19a4'/>
<id>23474b7d11b8d9fc97b315062a237c2d5aec19a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix crash when downloading a pseudo-directory</title>
<updated>2014-08-14T19:57:53+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@kotori.zaitcev.us</email>
</author>
<published>2014-08-14T19:57:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=3d56b65c898d7997819f2627a2fb722bd0c33b69'/>
<id>3d56b65c898d7997819f2627a2fb722bd0c33b69</id>
<content type='text'>
If a user creates an object with name ending with a slash, then
downloading such container ends in a traceback like this:

..............
test5g.file [auth 1.516s, headers 1.560s, total 244.565s, 22.089 MB/s]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/swiftclient/multithreading.py", lin
    result = self.func(item, *self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/swiftclient/shell.py", line 403, in
    fp = open(path, 'wb')
IOError: [Errno 21] Is a directory: 'first-pseudo-folder/'

The proposed fix is not to save this object. Note that the contents of
the object are available with --output option, as before. Only the
crash is fixed.

Even though we do not use the contents, we download the object and
check its Etag, in case. We also create a corresponding directory,
in case the pseudo-directory contains no objects.

The format of printout is changed, so user realizes easier when
pseudo-directory convention is in effect. Note that this is not a
compatibility issue because previously there was crash in such case.

Change-Id: I3352f7a4eaf9970961af0cc84c4706fc1eab281d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a user creates an object with name ending with a slash, then
downloading such container ends in a traceback like this:

..............
test5g.file [auth 1.516s, headers 1.560s, total 244.565s, 22.089 MB/s]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/swiftclient/multithreading.py", lin
    result = self.func(item, *self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/swiftclient/shell.py", line 403, in
    fp = open(path, 'wb')
IOError: [Errno 21] Is a directory: 'first-pseudo-folder/'

The proposed fix is not to save this object. Note that the contents of
the object are available with --output option, as before. Only the
crash is fixed.

Even though we do not use the contents, we download the object and
check its Etag, in case. We also create a corresponding directory,
in case the pseudo-directory contains no objects.

The format of printout is changed, so user realizes easier when
pseudo-directory convention is in effect. Note that this is not a
compatibility issue because previously there was crash in such case.

Change-Id: I3352f7a4eaf9970961af0cc84c4706fc1eab281d
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up raw policy stats in account stat</title>
<updated>2014-08-06T08:07:17+00:00</updated>
<author>
<name>Yuan Zhou</name>
<email>yuan.zhou@intel.com</email>
</author>
<published>2014-07-31T11:51:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=776133bd299adfb644f2274143b9fba72672428d'/>
<id>776133bd299adfb644f2274143b9fba72672428d</id>
<content type='text'>
Storage policy stats was not well parsed in account stat. This
patch parses the stats and print out the stats in a format like below:

$swift -A http://swift_cluster/auth/v1.0 -U test:tester -K testing stat
                   Account: AUTH_test
                Containers: 5
                   Objects: 1
                     Bytes: 2097152
Objects in policy "golden": 1
 Bytess in policy "golden": 2097152
Objects in policy "silver": 0
  Bytes in policy "silver": 0
               X-Timestamp: 1404697760.88809
                X-Trans-Id: txec519e24b44a413abb705-0053da2dcb
              Content-Type: text/plain; charset=utf-8
             Accept-Ranges: bytes

Change-Id: I7ad0ee6d88f8393e3a93e90cd52b9b592da7072d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Storage policy stats was not well parsed in account stat. This
patch parses the stats and print out the stats in a format like below:

$swift -A http://swift_cluster/auth/v1.0 -U test:tester -K testing stat
                   Account: AUTH_test
                Containers: 5
                   Objects: 1
                     Bytes: 2097152
Objects in policy "golden": 1
 Bytess in policy "golden": 2097152
Objects in policy "silver": 0
  Bytes in policy "silver": 0
               X-Timestamp: 1404697760.88809
                X-Trans-Id: txec519e24b44a413abb705-0053da2dcb
              Content-Type: text/plain; charset=utf-8
             Accept-Ranges: bytes

Change-Id: I7ad0ee6d88f8393e3a93e90cd52b9b592da7072d
</pre>
</div>
</content>
</entry>
<entry>
<title>Add keystone v3 auth support</title>
<updated>2014-07-23T15:55:38+00:00</updated>
<author>
<name>anc</name>
<email>alistair.coles@hp.com</email>
</author>
<published>2014-03-25T08:21:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=cae12940b1bff230381289b732b464d88423fec1'/>
<id>cae12940b1bff230381289b732b464d88423fec1</id>
<content type='text'>
Enables swiftclient to authenticate using
the keystone v3 API, allowing user id's, user
domains and tenant/project domains to be
specified.

Since swiftclient imports keystoneclient, the
main changes in swiftclient/client.py are to
selectively import the correct keystoneclient
library version and pass a number of new
options to it via the get_auth() function. In
addition the get_keystoneclient_2_0 method
has been renamed get_auth_keystone to better
reflect its purpose since it now deals with
both v2 and v3 use cases.

In swiftclient/shell.py the new options are
added to the parser. To make the default help
message shorter, help for all the --os-*
options (including the existing v2 options)
is only displayed when explicitly requested
usng a new --os-help option.

A new set of unit tests is added to
test_shell.py to verify the parser. A comment
in tests/sample.conf explains how to
configure the existing functional tests to
run using keystone v3 API.

Note that to use keystone v3
with swift you will need to set
auth_version = v3.0 in the auth_token
middleware config section of
proxy-server.conf.

Change-Id: Ifda0b3263eb919a8c6a1b204ba0a1215ed6f642f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enables swiftclient to authenticate using
the keystone v3 API, allowing user id's, user
domains and tenant/project domains to be
specified.

Since swiftclient imports keystoneclient, the
main changes in swiftclient/client.py are to
selectively import the correct keystoneclient
library version and pass a number of new
options to it via the get_auth() function. In
addition the get_keystoneclient_2_0 method
has been renamed get_auth_keystone to better
reflect its purpose since it now deals with
both v2 and v3 use cases.

In swiftclient/shell.py the new options are
added to the parser. To make the default help
message shorter, help for all the --os-*
options (including the existing v2 options)
is only displayed when explicitly requested
usng a new --os-help option.

A new set of unit tests is added to
test_shell.py to verify the parser. A comment
in tests/sample.conf explains how to
configure the existing functional tests to
run using keystone v3 API.

Note that to use keystone v3
with swift you will need to set
auth_version = v3.0 in the auth_token
middleware config section of
proxy-server.conf.

Change-Id: Ifda0b3263eb919a8c6a1b204ba0a1215ed6f642f
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix context sensitive help for info and tempurl</title>
<updated>2014-07-21T22:27:40+00:00</updated>
<author>
<name>Alistair Coles</name>
<email>alistair.coles@hp.com</email>
</author>
<published>2014-07-10T10:29:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=394cb57f630b3dfdc1d5b2e172ef0f1c16b8211f'/>
<id>394cb57f630b3dfdc1d5b2e172ef0f1c16b8211f</id>
<content type='text'>
Make it so that swift &lt;cmd&gt; --help will print the info
subcommand help for info and tempurl just like all the
other subcommands.

Also add unit tests to verify subcommand help.

Change-Id: Id3666dcf72a9727fbfda2f74c23293ada1c53aa0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it so that swift &lt;cmd&gt; --help will print the info
subcommand help for info and tempurl just like all the
other subcommands.

Also add unit tests to verify subcommand help.

Change-Id: Id3666dcf72a9727fbfda2f74c23293ada1c53aa0
</pre>
</div>
</content>
</entry>
</feed>
