Fix missing service_catalog parameter in Client object
Return None if service_catalog parameter does not exist.
service_catalog is the property and it is not initialized on object creation.
service_catalog tries to get value from auth_ref and raises AttributeError
exception if auth_ref is not initialized. It worked before we introduced
sessions, because authentication happened on client instantiation. Now,
when sessions are used, auth_ref is not initialized until the first
request. This change adds try-catch block in service_catalog property
to catch this error.
Reviewed: https:/ /review. openstack. org/339150 /git.openstack. org/cgit/ openstack/ python- keystoneclient/ commit/ ?id=b405d71a5f9 562414ce6b08f7e b4556f534dd273
Committed: https:/
Submitter: Jenkins
Branch: master
commit b405d71a5f95624 14ce6b08f7eb455 6f534dd273
Author: Mikhail Nikolaenko <email address hidden>
Date: Thu Jul 7 19:30:59 2016 +0300
Fix missing service_catalog parameter in Client object
Return None if service_catalog parameter does not exist.
service_catalog is the property and it is not initialized on object creation.
service_catalog tries to get value from auth_ref and raises AttributeError
exception if auth_ref is not initialized. It worked before we introduced
sessions, because authentication happened on client instantiation. Now,
when sessions are used, auth_ref is not initialized until the first
request. This change adds try-catch block in service_catalog property
to catch this error.
Change-Id: I58eb888f098924 1f9e5626564bd48 d901b324d36
Closes-Bug: #1508374