<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-cinderclient.git/cinderclient/tests/unit/test_exceptions.py, branch stable/train</title>
<subtitle>opendev.org: openstack/python-cinderclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/'/>
<entry>
<title>Cinder client should retry with Retry-After value</title>
<updated>2016-07-06T08:42:20+00:00</updated>
<author>
<name>Yuriy Nesenenko</name>
<email>ynesenenko@mirantis.com</email>
</author>
<published>2016-06-22T14:36:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=f8eef18297ec2dba4abf45f8ca57c40c2380cad9'/>
<id>f8eef18297ec2dba4abf45f8ca57c40c2380cad9</id>
<content type='text'>
If a request fails but the response contains a "Retry-After",
the cinder client should wait the amount of time and then retry.
Cinder client should report a warning to user and continue with
retry, so that user can cancel the operation if not interested
in retry. The value in "Retry-After" header will be in seconds
or GMT value, client should handle both the cases.

How many times client should retry will be controlled by user
through "--retries" argument to cinder api example,
$ cinder --retries 3 availability-zone-list

If request was not sucessful within the retries, client should
raise the exception.

Change-Id: I99af957bfbbe3a202b148dc2fcafdd20b5d7cda0
Partial-Bug: #1263069
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a request fails but the response contains a "Retry-After",
the cinder client should wait the amount of time and then retry.
Cinder client should report a warning to user and continue with
retry, so that user can cancel the operation if not interested
in retry. The value in "Retry-After" header will be in seconds
or GMT value, client should handle both the cases.

How many times client should retry will be controlled by user
through "--retries" argument to cinder api example,
$ cinder --retries 3 availability-zone-list

If request was not sucessful within the retries, client should
raise the exception.

Change-Id: I99af957bfbbe3a202b148dc2fcafdd20b5d7cda0
Partial-Bug: #1263069
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ClientException init when there is no message on py34</title>
<updated>2015-08-04T21:21:52+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem@us.ibm.com</email>
</author>
<published>2015-08-04T21:20:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=03542ee65a5e818a5d908a85a6a9eba21ef63b53'/>
<id>03542ee65a5e818a5d908a85a6a9eba21ef63b53</id>
<content type='text'>
BaseException.message was removed in python 3 per PEP 0352 so if no
message is passed to the ClientException __init__ it will blow up:

AttributeError: type object 'ClientException' has no attribute 'message'

So this change does two things:

1. Default to 'n/a' for message and details when body['keys'] doesn't
   have a message or details in it (which should be fine since
   from_response defaults to n/a if 'keys' is not in body).
2. Use getattr for self.__class__.message and default to None if that
   attribute is not set.  Arguably we could just remove this and make
   the message kwarg default to 'n/a' in ClientException.__init__ but
   I figured that was more invasive.

Closes-Bug: #1481478

Change-Id: I738cb9c8d4f015048c45a1df16bf18e29190e392
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BaseException.message was removed in python 3 per PEP 0352 so if no
message is passed to the ClientException __init__ it will blow up:

AttributeError: type object 'ClientException' has no attribute 'message'

So this change does two things:

1. Default to 'n/a' for message and details when body['keys'] doesn't
   have a message or details in it (which should be fine since
   from_response defaults to n/a if 'keys' is not in body).
2. Use getattr for self.__class__.message and default to None if that
   attribute is not set.  Arguably we could just remove this and make
   the message kwarg default to 'n/a' in ClientException.__init__ but
   I figured that was more invasive.

Closes-Bug: #1481478

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