<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-glanceclient.git/tests/test_http.py, branch 0.17.3</title>
<subtitle>opendev.org: openstack/python-glanceclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/'/>
<entry>
<title>Ignore NoneType when encoding headers</title>
<updated>2015-02-03T19:22:44+00:00</updated>
<author>
<name>Ian Cordasco</name>
<email>ian.cordasco@rackspace.com</email>
</author>
<published>2015-02-02T15:39:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=db743e363544d2064107cbaedcf2f5fda4683b8a'/>
<id>db743e363544d2064107cbaedcf2f5fda4683b8a</id>
<content type='text'>
Some generated header values may in fact be None. Trying to encode None
causes the client to fail with an exception and cannot be worked around
by the user.

Change-Id: I638b1fba0ef9a07d726445d8c2cdd774140f5b83
Closes-bug: 1415935
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some generated header values may in fact be None. Trying to encode None
causes the client to fail with an exception and cannot be worked around
by the user.

Change-Id: I638b1fba0ef9a07d726445d8c2cdd774140f5b83
Closes-bug: 1415935
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove openstack.common.strutils</title>
<updated>2015-01-27T19:22:42+00:00</updated>
<author>
<name>Louis Taylor</name>
<email>kragniz@gmail.com</email>
</author>
<published>2015-01-06T14:32:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=b818826420a383e733ec40881ff436595ca57cc8'/>
<id>b818826420a383e733ec40881ff436595ca57cc8</id>
<content type='text'>
This module now lives in oslo.utils, so import it from there instead.

Co-Authored-By: Ian Cordasco &lt;ian.cordasco@rackspace.com&gt;
Change-Id: Ib35dc840992433542490670781badd9529ec8947
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This module now lives in oslo.utils, so import it from there instead.

Co-Authored-By: Ian Cordasco &lt;ian.cordasco@rackspace.com&gt;
Change-Id: Ib35dc840992433542490670781badd9529ec8947
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle HTTP byte returns in python 3</title>
<updated>2015-01-14T02:32:07+00:00</updated>
<author>
<name>Jamie Lennox</name>
<email>jamielennox@redhat.com</email>
</author>
<published>2015-01-05T01:46:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=62df6c669f2625582cea9602ed2ec4a4aca2948a'/>
<id>62df6c669f2625582cea9602ed2ec4a4aca2948a</id>
<content type='text'>
The returns from requests' response.content is a bytes type. Under
python 3 this fails in error handling and string conversion. The
response.text variable should be used to treat a response body as a
string.

Closes-Bug: #1407531
Change-Id: Ifd588b5f6820ef21beb186d88d0b3f1a267695aa
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The returns from requests' response.content is a bytes type. Under
python 3 this fails in error handling and string conversion. The
response.text variable should be used to treat a response body as a
string.

Closes-Bug: #1407531
Change-Id: Ifd588b5f6820ef21beb186d88d0b3f1a267695aa
</pre>
</div>
</content>
</entry>
<entry>
<title>Send `identity_headers` through the wire</title>
<updated>2014-11-25T10:01:39+00:00</updated>
<author>
<name>Flavio Percoco</name>
<email>flaper87@gmail.com</email>
</author>
<published>2014-11-21T12:55:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=5080d100999b17e86b62d463474affe2a4f1ed05'/>
<id>5080d100999b17e86b62d463474affe2a4f1ed05</id>
<content type='text'>
Change I09f70eee3e2777f52ce040296015d41649c2586a, introduced a bug where
the identity_headers are not added to the request headers anymore
causing the former to be completely ignored and useless.

This patch fixes that issue by restoring the previous code. A new test
has been added to avoid regressions.

Closes-bug: #1394965
Change-Id: I1b1633636448398cf3f41217f1d671b43ebd9946
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change I09f70eee3e2777f52ce040296015d41649c2586a, introduced a bug where
the identity_headers are not added to the request headers anymore
causing the former to be completely ignored and useless.

This patch fixes that issue by restoring the previous code. A new test
has been added to avoid regressions.

Closes-bug: #1394965
Change-Id: I1b1633636448398cf3f41217f1d671b43ebd9946
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't set X-Auth-Token key in http session header if no token provided</title>
<updated>2014-10-30T10:07:50+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem@us.ibm.com</email>
</author>
<published>2014-10-17T14:53:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=8c159a2eb4d61f2b9691fbfa1288bcda2156f3f1'/>
<id>8c159a2eb4d61f2b9691fbfa1288bcda2156f3f1</id>
<content type='text'>
Commit f980fc549247fa2deb87dfacebc6d8d13ccd45d1 changed how the
X-Auth-Token header was scrubbed when logging the request, but
effectively made the value required which can lead to an AttributeError
if the value for the header is None.

The value can be None if you're using Nova but don't have Nova
configured with auth_strategy='keystone' (see
nova.image.glance._create_glance_client for details).

This patch simply checks if the auth_token is set in the http client
object and if not, it doesn't set the X-Auth-Token key in the session
header.

Closes-Bug: #1381295

Change-Id: Ie285d5253df28a9f0f964147a53c99ceaa919c5c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit f980fc549247fa2deb87dfacebc6d8d13ccd45d1 changed how the
X-Auth-Token header was scrubbed when logging the request, but
effectively made the value required which can lead to an AttributeError
if the value for the header is None.

The value can be None if you're using Nova but don't have Nova
configured with auth_strategy='keystone' (see
nova.image.glance._create_glance_client for details).

This patch simply checks if the auth_token is set in the http client
object and if not, it doesn't set the X-Auth-Token key in the session
header.

Closes-Bug: #1381295

Change-Id: Ie285d5253df28a9f0f964147a53c99ceaa919c5c
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the ordering of assertEqual arguments</title>
<updated>2014-09-19T13:00:28+00:00</updated>
<author>
<name>Louis Taylor</name>
<email>kragniz@gmail.com</email>
</author>
<published>2014-09-19T12:41:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=1511c86933bf73a3a5af32f52d15ad4d9fe0d03d'/>
<id>1511c86933bf73a3a5af32f52d15ad4d9fe0d03d</id>
<content type='text'>
This keeps testtools happy, since it expects the argument ordering to be
(expected, actual).

Change-Id: I95b41ad7645700ce23b46c7a5700e79008ed08be
Closes-bug: #1277104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This keeps testtools happy, since it expects the argument ordering to be
(expected, actual).

Change-Id: I95b41ad7645700ce23b46c7a5700e79008ed08be
Closes-bug: #1277104
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle UnicodeDecodeError in log_http_response</title>
<updated>2014-09-15T21:57:58+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem@us.ibm.com</email>
</author>
<published>2014-09-15T21:55:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=ba19a534b7576846d542f9c6a4d6769253c603e8'/>
<id>ba19a534b7576846d542f9c6a4d6769253c603e8</id>
<content type='text'>
Similar to commit dec9c9f35 and log_curl_request,
this ignores decoding errors when logging response
headers by passing errors='ignore' to safe_encode.

Change-Id: Ic915a7d8334e9473f300c9db670a3a8f5cda8976
Closes-Bug: #1369756
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to commit dec9c9f35 and log_curl_request,
this ignores decoding errors when logging response
headers by passing errors='ignore' to safe_encode.

Change-Id: Ic915a7d8334e9473f300c9db670a3a8f5cda8976
Closes-Bug: #1369756
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace old httpclient with requests</title>
<updated>2014-07-10T07:52:05+00:00</updated>
<author>
<name>AmalaBasha</name>
<email>amala.alungal@RACKSPACE.COM</email>
</author>
<published>2014-07-01T09:15:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=dbb242b776908ca50ed8557ebfe7cfcd879366c8'/>
<id>dbb242b776908ca50ed8557ebfe7cfcd879366c8</id>
<content type='text'>
This review implements blueprint python-request and replaces the old
http client implementation in favor of a new one based on
python-requests.

Major changes:
* raw_request and json_request removed since everything is now being
  handled by the same method "_request"
* New methods that match HTTP's methods were added:
    - get
    - put
    - post
    - head
    - patch
    - delete
* Content-Type is now being "inferred" based on the data being sent:
    - if it is file-like object it chunks the request
    - if it is a python type not instance of basestring then it'll try
      to serialize it to json
    - Every other case will keep the incoming content-type and will send
      the data as is.
* Glanceclient's HTTPSConnection implementation will be used if
  no-compression flag is set to True.

Co-Author:  Flavio Percoco&lt;flaper87@gmail.com&gt;
Change-Id: I09f70eee3e2777f52ce040296015d41649c2586a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This review implements blueprint python-request and replaces the old
http client implementation in favor of a new one based on
python-requests.

Major changes:
* raw_request and json_request removed since everything is now being
  handled by the same method "_request"
* New methods that match HTTP's methods were added:
    - get
    - put
    - post
    - head
    - patch
    - delete
* Content-Type is now being "inferred" based on the data being sent:
    - if it is file-like object it chunks the request
    - if it is a python type not instance of basestring then it'll try
      to serialize it to json
    - Every other case will keep the incoming content-type and will send
      the data as is.
* Glanceclient's HTTPSConnection implementation will be used if
  no-compression flag is set to True.

Co-Author:  Flavio Percoco&lt;flaper87@gmail.com&gt;
Change-Id: I09f70eee3e2777f52ce040296015d41649c2586a
</pre>
</div>
</content>
</entry>
<entry>
<title>Change a debug line to prevent UnicodeDecodeError issue</title>
<updated>2014-06-18T15:01:25+00:00</updated>
<author>
<name>Michael Still</name>
<email>mikal@stillhq.com</email>
</author>
<published>2014-06-17T07:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=dec9c9f3525577dd865bd12d43e4578ae32e4d3c'/>
<id>dec9c9f3525577dd865bd12d43e4578ae32e4d3c</id>
<content type='text'>
This debug line is causing tracebacks in the n-cpu logs for
tempest runs. Its because the logged data is sometimes unicode:

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 846, in emit
    msg = self.format(record)
  File "/opt/stack/new/nova/nova/openstack/common/log.py", line 710, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/opt/stack/new/nova/nova/openstack/common/log.py", line 674, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1234: ordinal not in range(128)
Logged from file http.py, line 153

The change used correct encoding error handling policy for the log
which may includes non-ascii char.

Closes-bug: 1320655
Change-Id: I97f5f14b9beddcceb7fbd371062caf5a38a62a20
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This debug line is causing tracebacks in the n-cpu logs for
tempest runs. Its because the logged data is sometimes unicode:

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 846, in emit
    msg = self.format(record)
  File "/opt/stack/new/nova/nova/openstack/common/log.py", line 710, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/opt/stack/new/nova/nova/openstack/common/log.py", line 674, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1234: ordinal not in range(128)
Logged from file http.py, line 153

The change used correct encoding error handling policy for the log
which may includes non-ascii char.

Closes-bug: 1320655
Change-Id: I97f5f14b9beddcceb7fbd371062caf5a38a62a20
</pre>
</div>
</content>
</entry>
<entry>
<title>Finalize Python3 support</title>
<updated>2014-05-20T14:42:10+00:00</updated>
<author>
<name>Frederic Lepied</name>
<email>frederic.lepied@enovance.com</email>
</author>
<published>2014-04-26T21:34:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-glanceclient.git/commit/?id=628c541a693ce39a524191250f93c967aef0dba5'/>
<id>628c541a693ce39a524191250f93c967aef0dba5</id>
<content type='text'>
Set the environment variable PYTHONHASHSEED to 0 to have
predictive tests under Python 3.

Change-Id: Ia15a9383e0f20bd0e4572e9f9b9772f1704dff86
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set the environment variable PYTHONHASHSEED to 0 to have
predictive tests under Python 3.

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