##
"""Common methods for the OpenStack plugins."""
-import logging as log
+import logging
+log = logging.getLogger(__name__)
from keystoneclient.v3 import client
self._endpoint = None
self._ks = None
- def _authenticate(self, tenant_id=None):
+ def _authenticate(self):
"""Authenticate and/or renew the authentication token."""
if self._auth_token is not None:
return self._auth_token
except Exception as e:
log.warn("Exception thrown on request", e)
+ if response is not None:
+ log.warn("Request resulted in %s code and %s response",
+ response.status_code, response.text)
return response