<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-ceilometerclient.git/ceilometerclient/tests/test_client.py, branch 1.0.10</title>
<subtitle>opendev.org: openstack/python-ceilometerclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/'/>
<entry>
<title>Checking the type of auth_token, and fixing it if necessary</title>
<updated>2014-03-14T06:09:50+00:00</updated>
<author>
<name>Marc Solanas</name>
<email>msolanas@cisco.com</email>
</author>
<published>2014-03-14T06:09:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-ceilometerclient.git/commit/?id=69be3ff0e48e062e412c9e01c2c16995f6ecd3d8'/>
<id>69be3ff0e48e062e412c9e01c2c16995f6ecd3d8</id>
<content type='text'>
When creating a new Client object by calling the get_client function,
if the ceilometer_url is not passed as a parameter, but the token is
passed, the auth_token is converted to a lambda function.
However, when both the ceilometer_url and the auth_token are passed,
this conversion does not take place.
This fix checks if the auth_token is a lambda function or not.
If it is not, it creates a new lambda function which returns the
token.
Without this check, if a token was passed as a string, the
python client would throw and error, when trying to call
self.auth_token() in ceilomenterclient/common/http.py.

Change-Id: I3e564fcf17ce497546b75f0ab8c7ca0f6f2099df
Closes-Bug: #1254186
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating a new Client object by calling the get_client function,
if the ceilometer_url is not passed as a parameter, but the token is
passed, the auth_token is converted to a lambda function.
However, when both the ceilometer_url and the auth_token are passed,
this conversion does not take place.
This fix checks if the auth_token is a lambda function or not.
If it is not, it creates a new lambda function which returns the
token.
Without this check, if a token was passed as a string, the
python client would throw and error, when trying to call
self.auth_token() in ceilomenterclient/common/http.py.

Change-Id: I3e564fcf17ce497546b75f0ab8c7ca0f6f2099df
Closes-Bug: #1254186
</pre>
</div>
</content>
</entry>
</feed>
