<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-swiftclient.git/tests/unit/test_utils.py, branch stable/newton</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>Accept gzip-encoded API responses</title>
<updated>2016-08-30T22:38:55+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2015-05-22T05:44:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=f728027bed59d08a6491ae9c14d2f5968f8d6fa3'/>
<id>f728027bed59d08a6491ae9c14d2f5968f8d6fa3</id>
<content type='text'>
Previously, we would accept gzip-encoded responses, but only because we
were letting requests decode *all* responses (even object data). This
restores the previous capability, but with tighter controls about which
requests will accept gzipped responses and where the decoding happens.

Change-Id: I4fd8b97207b9ab01b1bcf825cc16efd8ad46344a
Related-Bug: 1282861
Related-Bug: 1338464
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we would accept gzip-encoded responses, but only because we
were letting requests decode *all* responses (even object data). This
restores the previous capability, but with tighter controls about which
requests will accept gzipped responses and where the decoding happens.

Change-Id: I4fd8b97207b9ab01b1bcf825cc16efd8ad46344a
Related-Bug: 1282861
Related-Bug: 1338464
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unicode issues in tempurl command</title>
<updated>2016-07-19T19:52:51+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2016-06-29T18:07:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=dca4ea5fd6e1a4eb15eeea9879913f64f2851446'/>
<id>dca4ea5fd6e1a4eb15eeea9879913f64f2851446</id>
<content type='text'>
Previously, we weren't encoding paths and keys as UTF-8, which would
trigger a UnicodeEncodeError on py27.

Change-Id: I2fad428369406c2ae32343a5e943ffb2cd1ca6ef
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we weren't encoding paths and keys as UTF-8, which would
trigger a UnicodeEncodeError on py27.

Change-Id: I2fad428369406c2ae32343a5e943ffb2cd1ca6ef
</pre>
</div>
</content>
</entry>
<entry>
<title>Drop testtools from test-requirements.txt</title>
<updated>2016-02-12T17:57:58+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2015-12-04T19:28:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=bed6bbd5efd24234825e266a50ac37d33447d340'/>
<id>bed6bbd5efd24234825e266a50ac37d33447d340</id>
<content type='text'>
My understanding is that it was mainly being used so we could have sane
testing on py26.  With py26 support being dropped, we no longer need it.

Also drop discover from test-requirements.txt, as we don't seem to
actually use it.

Change-Id: Iee04c42890596d3b483c1473169480a3ae19aac8
Related-Change: I37116731db11449d0c374a6a83a3a43789a19d5f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
My understanding is that it was mainly being used so we could have sane
testing on py26.  With py26 support being dropped, we no longer need it.

Also drop discover from test-requirements.txt, as we don't seem to
actually use it.

Change-Id: Iee04c42890596d3b483c1473169480a3ae19aac8
Related-Change: I37116731db11449d0c374a6a83a3a43789a19d5f
</pre>
</div>
</content>
</entry>
<entry>
<title>Use bulk-delete middleware when available</title>
<updated>2016-01-12T23:40:57+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2015-06-11T21:33:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=7a1e192803b8f4b739c9c3086bbfdc9a9c8d6753'/>
<id>7a1e192803b8f4b739c9c3086bbfdc9a9c8d6753</id>
<content type='text'>
When issuing `delete` commands that would require three or more
individual deletes, check whether the cluster supports bulk deletes
and use that if it's available.

Additionally, a new option is added to the `delete` command:

  * --prefix &lt;prefix&gt;

    Delete all objects that start with &lt;prefix&gt;. This is similar to the
    --prefix option for the `list` command.

Example:

$ swift delete c --prefix obj_prefix/

    ...will delete from container "c" all objects whose name begins with
    "obj_prefix/", such as "obj_prefix/foo" and "obj_prefix/bar".

Change-Id: I6b9504848d6ef562cf4f570bbcd17db4e3da8264
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When issuing `delete` commands that would require three or more
individual deletes, check whether the cluster supports bulk deletes
and use that if it's available.

Additionally, a new option is added to the `delete` command:

  * --prefix &lt;prefix&gt;

    Delete all objects that start with &lt;prefix&gt;. This is similar to the
    --prefix option for the `list` command.

Example:

$ swift delete c --prefix obj_prefix/

    ...will delete from container "c" all objects whose name begins with
    "obj_prefix/", such as "obj_prefix/foo" and "obj_prefix/bar".

Change-Id: I6b9504848d6ef562cf4f570bbcd17db4e3da8264
</pre>
</div>
</content>
</entry>
<entry>
<title>Retry file uploads via SwiftService</title>
<updated>2016-01-11T19:12:13+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2015-09-23T17:42:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=d4157ce5b5eeeebb3516092de995cee20025a5c1'/>
<id>d4157ce5b5eeeebb3516092de995cee20025a5c1</id>
<content type='text'>
When we introduced LengthWrapper, we neglected to make it resettable. As
a result, upload failures result in errors like:

    put_object(...) failure and no ability to reset contents for reupload.

Now, LengthWrappers will be resettable if their _readable has seek/tell.

Related-Change: I6c8bc1366dfb591a26d934a30cd21c9e6b9a04ce
Change-Id: I21f43f06e8c78b24d1fc081efedf2687942e042f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we introduced LengthWrapper, we neglected to make it resettable. As
a result, upload failures result in errors like:

    put_object(...) failure and no ability to reset contents for reupload.

Now, LengthWrappers will be resettable if their _readable has seek/tell.

Related-Change: I6c8bc1366dfb591a26d934a30cd21c9e6b9a04ce
Change-Id: I21f43f06e8c78b24d1fc081efedf2687942e042f
</pre>
</div>
</content>
</entry>
<entry>
<title>Miscellaneous (mostly test) cleanup</title>
<updated>2015-10-08T05:33:42+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2015-09-10T00:41:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=9fed7ed5e1f6dd3e589a35e3ee4abecb676f2188'/>
<id>9fed7ed5e1f6dd3e589a35e3ee4abecb676f2188</id>
<content type='text'>
 * Always use testtools.TestCase, since we're relying on testtools
 * Always use mock (as opposed to unittest.mock) since we're relying on
   mock
 * Add note about when a missing logging handler was added
 * Stop %-formatting the giant usage string that doesn't actually need
   any formatting
 * Prefer assertIs, assertIn, assertIsInstance over assertTrue
 * Use else-self.fail instead of sentinel values
 * Check resp.get('error') is None before checking resp['success'] is
   True, so test failures actually tell you something useful
 * Tighten some isinstance assertions
 * Import MockHttpTest from correct location
 * Only populate clean_os_environ once
 * Use setUp for setup, not __init__
 * Replace assertIn(key, dict) and assertEqual(foo, dict[key]) with
   assertEqual(foo, dict.get(key)) when key is a literal and foo is not
   None
 * Use mock.patch.object instead of manually patching for tests
 * Use six.binary_type instead of type(''.encode('utf-8'))
 * Stop shadowing builtin bytes
 * Reclaim some margin
 * Stop checking the return-type of encode_utf8; we already know it's
   bytes

Change-Id: I2138ea553378ce88810b7353147c8645a8f8c90e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * Always use testtools.TestCase, since we're relying on testtools
 * Always use mock (as opposed to unittest.mock) since we're relying on
   mock
 * Add note about when a missing logging handler was added
 * Stop %-formatting the giant usage string that doesn't actually need
   any formatting
 * Prefer assertIs, assertIn, assertIsInstance over assertTrue
 * Use else-self.fail instead of sentinel values
 * Check resp.get('error') is None before checking resp['success'] is
   True, so test failures actually tell you something useful
 * Tighten some isinstance assertions
 * Import MockHttpTest from correct location
 * Only populate clean_os_environ once
 * Use setUp for setup, not __init__
 * Replace assertIn(key, dict) and assertEqual(foo, dict[key]) with
   assertEqual(foo, dict.get(key)) when key is a literal and foo is not
   None
 * Use mock.patch.object instead of manually patching for tests
 * Use six.binary_type instead of type(''.encode('utf-8'))
 * Stop shadowing builtin bytes
 * Reclaim some margin
 * Stop checking the return-type of encode_utf8; we already know it's
   bytes

Change-Id: I2138ea553378ce88810b7353147c8645a8f8c90e
</pre>
</div>
</content>
</entry>
<entry>
<title>absolute expiry option for tempURL generation</title>
<updated>2015-09-04T21:57:30+00:00</updated>
<author>
<name>Zack M. Davis</name>
<email>zdavis@swiftstack.com</email>
</author>
<published>2015-09-04T21:57:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=52d39bebc11979fa1be5090ff75466710638e561'/>
<id>52d39bebc11979fa1be5090ff75466710638e561</id>
<content type='text'>
The `tempurl` subcommand's second positional argument is called
`seconds` and has heretofore interpreted as the number of seconds for
which the tempURL should be valid, counting from the moment of running
the command. This is indeed a common, if not the most common,
use-case. But some users, occasionally, might want to generate a tempURL
that expires at some particular ("absolute") time, rather than a
particular amount of time relative to the moment of happening to run the
command. (One might make an analogy to the way in which Swift's expiring
object support supports an `X-Delete-At` header in addition to
`X-Delete-After`—and it's the former that must be regarded as
ontologically prior.) Thus, this commit adds an `--absolute` optional
argument to the `tempurl` subcommand; if present, the `seconds` argument
will be interpreted as a Unix timestamp of when the tempURL should be
expire, rather than a duration for which the tempURL should be valid
starting from "now".

Change-Id: If9ded96f2799800958d5063127f3de812f50ef06
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `tempurl` subcommand's second positional argument is called
`seconds` and has heretofore interpreted as the number of seconds for
which the tempURL should be valid, counting from the moment of running
the command. This is indeed a common, if not the most common,
use-case. But some users, occasionally, might want to generate a tempURL
that expires at some particular ("absolute") time, rather than a
particular amount of time relative to the moment of happening to run the
command. (One might make an analogy to the way in which Swift's expiring
object support supports an `X-Delete-At` header in addition to
`X-Delete-After`—and it's the former that must be regarded as
ontologically prior.) Thus, this commit adds an `--absolute` optional
argument to the `tempurl` subcommand; if present, the `seconds` argument
will be interpreted as a Unix timestamp of when the tempURL should be
expire, rather than a duration for which the tempURL should be valid
starting from "now".

Change-Id: If9ded96f2799800958d5063127f3de812f50ef06
</pre>
</div>
</content>
</entry>
<entry>
<title>change deprecated assertEquals to assertEqual</title>
<updated>2015-08-06T09:50:33+00:00</updated>
<author>
<name>Hiroshi Miura</name>
<email>miurahr@nttdata.co.jp</email>
</author>
<published>2015-08-03T03:20:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=be0f1aad8a5ed6f8d61016902c713db609ad834c'/>
<id>be0f1aad8a5ed6f8d61016902c713db609ad834c</id>
<content type='text'>
fix against H234: assertEquals() logs a DeprecationWarning
in Python3.x. use assertEqual() instead.

Closes-bug: #1480776

Change-Id: Iffda6bb5f2616d4af4567eeea37bb26531e34371
Signed-off-by: Hiroshi Miura &lt;miurahr@nttdata.co.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix against H234: assertEquals() logs a DeprecationWarning
in Python3.x. use assertEqual() instead.

Closes-bug: #1480776

Change-Id: Iffda6bb5f2616d4af4567eeea37bb26531e34371
Signed-off-by: Hiroshi Miura &lt;miurahr@nttdata.co.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Verify MD5 of uploaded objects.</title>
<updated>2015-02-19T11:21:32+00:00</updated>
<author>
<name>Daniel Wakefield</name>
<email>daniel.wakefield@hp.com</email>
</author>
<published>2014-10-29T10:11:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=f0300e3714e0d8cdd0ed9e4744b813e3b263d034'/>
<id>f0300e3714e0d8cdd0ed9e4744b813e3b263d034</id>
<content type='text'>
Changed existing code to calculate the MD5 of the object
during the upload stream. Checks this MD5 against the etag
returned in the response.
An exception is raised if they do not match.

Closes-Bug: 1379263

Change-Id: I6c8bc1366dfb591a26d934a30cd21c9e6b9a04ce
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changed existing code to calculate the MD5 of the object
during the upload stream. Checks this MD5 against the etag
returned in the response.
An exception is raised if they do not match.

Closes-Bug: 1379263

Change-Id: I6c8bc1366dfb591a26d934a30cd21c9e6b9a04ce
</pre>
</div>
</content>
</entry>
<entry>
<title>Adding Swift Temporary URL support</title>
<updated>2014-07-11T20:05:22+00:00</updated>
<author>
<name>Josh Gachnang</name>
<email>josh@pcsforeducation.com</email>
</author>
<published>2014-06-25T20:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=def0e0a6435deee5c55b7859e1b132590ea0860c'/>
<id>def0e0a6435deee5c55b7859e1b132590ea0860c</id>
<content type='text'>
Temporary URLs allow a user to sign an object URL with a shared
secret to so that the object can be downloaded without auth for
a specified amount of time.

http://docs.openstack.org/trunk/config-reference/content/object-storage-tempurl.html

Change-Id: Ife0b6c98c975e074d4dad0a31145573b784747c5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Temporary URLs allow a user to sign an object URL with a shared
secret to so that the object can be downloaded without auth for
a specified amount of time.

http://docs.openstack.org/trunk/config-reference/content/object-storage-tempurl.html

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