<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-swiftclient.git/swiftclient/multithreading.py, branch ocata-eol</title>
<subtitle>opendev.org: openstack/python-swiftclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/'/>
<entry>
<title>Add new doc structure and contents for swiftclient</title>
<updated>2016-04-29T18:21:36+00:00</updated>
<author>
<name>Joel Wright</name>
<email>joel.wright@sohonet.com</email>
</author>
<published>2016-03-03T17:22:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=3a5a25fe981817ba0e550d39d6e9863fa1539588'/>
<id>3a5a25fe981817ba0e550d39d6e9863fa1539588</id>
<content type='text'>
As a result of the Hackathon we have produced a new
documentation structure for the python-swiftclient.
This patch introduces the new structure and adds the
required content.

The intention is to document the CLI, the SwiftService
and Connection API. Importantly, we also provide
guidance on important considerations when using a swift
object store, such as which aspect of the python-swiftclient
to use for various use cases, common authentication patterns
and some useful examples.

Co-Authored-By: Alexandra Settle &lt;alexandra.settle@rackspace.com&gt;
Co-Authored-By: Mohit Motiani &lt;mohit.motiani@intel.com&gt;
Co-Authored-By: Hisashi Osanai &lt;osanai.hisashi@jp.fujitsu.com&gt;

Change-Id: I9eb41f8e9137efa66cead67dc264a76a3c03fbda
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a result of the Hackathon we have produced a new
documentation structure for the python-swiftclient.
This patch introduces the new structure and adds the
required content.

The intention is to document the CLI, the SwiftService
and Connection API. Importantly, we also provide
guidance on important considerations when using a swift
object store, such as which aspect of the python-swiftclient
to use for various use cases, common authentication patterns
and some useful examples.

Co-Authored-By: Alexandra Settle &lt;alexandra.settle@rackspace.com&gt;
Co-Authored-By: Mohit Motiani &lt;mohit.motiani@intel.com&gt;
Co-Authored-By: Hisashi Osanai &lt;osanai.hisashi@jp.fujitsu.com&gt;

Change-Id: I9eb41f8e9137efa66cead67dc264a76a3c03fbda
</pre>
</div>
</content>
</entry>
<entry>
<title>Python 3: Replacing unicode with six.text_type for py3 compatibility</title>
<updated>2015-06-28T02:10:26+00:00</updated>
<author>
<name>janonymous</name>
<email>janonymous.codevulture@gmail.com</email>
</author>
<published>2015-06-28T02:04:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=ef467ddee494a9c0154c31fa6aae781d89ed6abe'/>
<id>ef467ddee494a9c0154c31fa6aae781d89ed6abe</id>
<content type='text'>
The "unicode" type was renamed to "str" in Python 3.
Use six.text_type to make swiftclient compatible with Python 3.

For more information about changes needed for py3
compatibility, see:
https://wiki.openstack.org/wiki/Python3

Change-Id: Ic65607a69935652a1874340928f626fbcc35c014
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "unicode" type was renamed to "str" in Python 3.
Use six.text_type to make swiftclient compatible with Python 3.

For more information about changes needed for py3
compatibility, see:
https://wiki.openstack.org/wiki/Python3

Change-Id: Ic65607a69935652a1874340928f626fbcc35c014
</pre>
</div>
</content>
</entry>
<entry>
<title>Compare each chunk of large objects when uploading</title>
<updated>2015-03-24T01:35:45+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2015-03-03T20:35:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=a4fb70ece189aff85f234ab6b3f275b69e936c03'/>
<id>a4fb70ece189aff85f234ab6b3f275b69e936c03</id>
<content type='text'>
Previously, we compared the ETag from Swift against the MD5 of the
entire large object. However, the ETag for large objects is generally
the MD5 of the concatenation of the ETags for each segment, unless the
object is a DLO whose segments span more than one page of a container
listing. Rather than worry about ETags, just compare each chunk of the
segmented file. This allows the use of --skip-identical when uploading
SLOs and DLOs.

Additionally, there are several test-related improvements:
 * The default arguments for OutputManager are now evaluated on
   construction, rather than on definition, so that
   TestOutputManager.test_instantiation will succeed when using nosetest
   as a test runner. (See also: bug 1251507)
 * An account_username option is now available in the functional tests
   config file for auth systems that do not follow the account:username
   format.
 * CaptureOutput no longer writes to the captured stream, and
   MockHttpTest now captures output. These were polluting test output
   unnecessarily. (See also: bug 1201376)

Change-Id: Ic484e9a0c186c9283c4012c6a2fa77b96b8edf8a
Closes-Bug: #1201376
Closes-Bug: #1379252
Related-Bug: #1251507
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we compared the ETag from Swift against the MD5 of the
entire large object. However, the ETag for large objects is generally
the MD5 of the concatenation of the ETags for each segment, unless the
object is a DLO whose segments span more than one page of a container
listing. Rather than worry about ETags, just compare each chunk of the
segmented file. This allows the use of --skip-identical when uploading
SLOs and DLOs.

Additionally, there are several test-related improvements:
 * The default arguments for OutputManager are now evaluated on
   construction, rather than on definition, so that
   TestOutputManager.test_instantiation will succeed when using nosetest
   as a test runner. (See also: bug 1251507)
 * An account_username option is now available in the functional tests
   config file for auth systems that do not follow the account:username
   format.
 * CaptureOutput no longer writes to the captured stream, and
   MockHttpTest now captures output. These were polluting test output
   unnecessarily. (See also: bug 1201376)

Change-Id: Ic484e9a0c186c9283c4012c6a2fa77b96b8edf8a
Closes-Bug: #1201376
Closes-Bug: #1379252
Related-Bug: #1251507
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix crash when stat'ing objects with non-ascii names</title>
<updated>2015-02-17T14:52:35+00:00</updated>
<author>
<name>Joel Wright</name>
<email>joel.wright@sohonet.com</email>
</author>
<published>2015-01-14T11:10:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=cac21e3cff323d828b69b2280151b9c505bdaeda'/>
<id>cac21e3cff323d828b69b2280151b9c505bdaeda</id>
<content type='text'>
This patch fixes a crash and stack trace in stat when an object
name contains non-ascii characters.

Change-Id: Ib6dc686771e593243de56cafc100b17e51d9d9d5
Closes-Bug: 1411665
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a crash and stack trace in stat when an object
name contains non-ascii characters.

Change-Id: Ib6dc686771e593243de56cafc100b17e51d9d9d5
Closes-Bug: 1411665
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "This patch fixes downloading files to stdout."</title>
<updated>2015-02-03T18:55:47+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2015-02-03T18:55:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=eb28d8aff6d6b6e985e76643bee7dbf729055c82'/>
<id>eb28d8aff6d6b6e985e76643bee7dbf729055c82</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>This patch fixes downloading files to stdout.</title>
<updated>2015-01-23T11:46:13+00:00</updated>
<author>
<name>Joel Wright</name>
<email>joel.wright@sohonet.com</email>
</author>
<published>2015-01-04T21:14:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=bd42c2b00d0e4a18d15fd494bd9b9101742c4a37'/>
<id>bd42c2b00d0e4a18d15fd494bd9b9101742c4a37</id>
<content type='text'>
This patch fixes downloading files to stdout and modifies
_SwiftReader to operate as an iterator that performs file
checks at the end of iteration as well as a context manager.
File verification checks have been removed from __exit__
and added to __iter__.

Change-Id: I3250bdeeef8484a9122c4b5b854756a7c8f8731e
Closes-Bug: 1395922
Closes-Bug: 1387376
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes downloading files to stdout and modifies
_SwiftReader to operate as an iterator that performs file
checks at the end of iteration as well as a context manager.
File verification checks have been removed from __exit__
and added to __iter__.

Change-Id: I3250bdeeef8484a9122c4b5b854756a7c8f8731e
Closes-Bug: 1395922
Closes-Bug: 1387376
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cross account upload using --os-storage-url</title>
<updated>2015-01-06T16:13:39+00:00</updated>
<author>
<name>Alistair Coles</name>
<email>alistair.coles@hp.com</email>
</author>
<published>2014-09-29T17:26:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=9593d4b58a5e9f240e26d7873d3cc251c7d51f71'/>
<id>9593d4b58a5e9f240e26d7873d3cc251c7d51f71</id>
<content type='text'>
Removes an account stat from the object upload path.
This stat fails when user is not account admin even
though the user may have container ACL permission to
write objects.

Reduces the severity of the CLI output message when
upload fails to create the given container (this is
not an error since the container may exist - the user
just does not have permission to PUT or POST the
container).

Changes the 'swift upload' exit return code from 1 to
0 if container PUT fails but object PUT succeeds.

For segment uploads, makes the attempt to create the
segment container conditional on it not being the same
as the manifest container. This avoids an unnecessary
container PUT.

Fixes another bug that became apparent: with segmented
upload a container HEAD may be attempted to determine
the policy to be used for the segment container. When
this failed the result dict has headers=None which was
causing an exception in the shell result handler.

Add unit tests for object upload/download and container
list with --os-storage-url option.

Closes-Bug: #1371650
Change-Id: If1f8a02ee7459ea2158ffa6e958f67d299ec529e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes an account stat from the object upload path.
This stat fails when user is not account admin even
though the user may have container ACL permission to
write objects.

Reduces the severity of the CLI output message when
upload fails to create the given container (this is
not an error since the container may exist - the user
just does not have permission to PUT or POST the
container).

Changes the 'swift upload' exit return code from 1 to
0 if container PUT fails but object PUT succeeds.

For segment uploads, makes the attempt to create the
segment container conditional on it not being the same
as the manifest container. This avoids an unnecessary
container PUT.

Fixes another bug that became apparent: with segmented
upload a container HEAD may be attempted to determine
the policy to be used for the segment container. When
this failed the result dict has headers=None which was
causing an exception in the shell result handler.

Add unit tests for object upload/download and container
list with --os-storage-url option.

Closes-Bug: #1371650
Change-Id: If1f8a02ee7459ea2158ffa6e958f67d299ec529e
</pre>
</div>
</content>
</entry>
<entry>
<title>Change tests to use new CaptureOutput class.</title>
<updated>2014-12-05T10:57:09+00:00</updated>
<author>
<name>Daniel Wakefield</name>
<email>daniel.wakefield@hp.com</email>
</author>
<published>2014-12-04T16:59:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-swiftclient.git/commit/?id=49a80f734c5a4ec8cbc359c6fc8099ddfbdfc6ba'/>
<id>49a80f734c5a4ec8cbc359c6fc8099ddfbdfc6ba</id>
<content type='text'>
Added the ability to clear the buffers in the
CaptureOutput class so it can be easily used multiple
times in the same context manager.
Also added a option to suppress the SystemExit
associated with printing an error.

Change-Id: Ib59bbbe88256f215eed0a8ebc8282e02181d4377
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added the ability to clear the buffers in the
CaptureOutput class so it can be easily used multiple
times in the same context manager.
Also added a option to suppress the SystemExit
associated with printing an error.

Change-Id: Ib59bbbe88256f215eed0a8ebc8282e02181d4377
</pre>
</div>
</content>
</entry>
<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://91.123.203.49/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>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://91.123.203.49/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>
</feed>
