commit 69be3ff0e48e062e412c9e01c2c16995f6ecd3d8
Author: Marc Solanas <email address hidden>
Date: Thu Mar 13 23:09:50 2014 -0700
Checking the type of auth_token, and fixing it if necessary
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.
Reviewed: https:/ /review. openstack. org/58051 /git.openstack. org/cgit/ openstack/ python- ceilometerclien t/commit/ ?id=69be3ff0e48 e062e412c9e01c2 c16995f6ecd3d8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 69be3ff0e48e062 e412c9e01c2c169 95f6ecd3d8
Author: Marc Solanas <email address hidden>
Date: Thu Mar 13 23:09:50 2014 -0700
Checking the type of auth_token, and fixing it if necessary
When creating a new Client object by calling the get_client function, auth_token( ) in ceilomenterclie nt/common/ http.py.
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.
Change-Id: I3e564fcf17ce49 7546b75f0ab8c7c a0f6f2099df
Closes-Bug: #1254186