diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-03-26 21:08:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-03-26 21:08:50 +0000 |
| commit | 31194ff33a171c192df32fb09b172bb990a8392e (patch) | |
| tree | 6af1bc040c20d1a8bd6f464a5d6da50552166414 | |
| parent | 9f077a755c540551c4b74089d500f4de5026485f (diff) | |
| parent | 2e30d22ad8b6e35cfffed6a883bf959009707d73 (diff) | |
| download | nova-31194ff33a171c192df32fb09b172bb990a8392e.tar.gz nova-31194ff33a171c192df32fb09b172bb990a8392e.tar.xz nova-31194ff33a171c192df32fb09b172bb990a8392e.zip | |
Merge "Make more readable error msg on quantum client authentication failure"
| -rw-r--r-- | nova/network/quantumv2/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/network/quantumv2/__init__.py b/nova/network/quantumv2/__init__.py index bda0392a9..6d6e7c7bc 100644 --- a/nova/network/quantumv2/__init__.py +++ b/nova/network/quantumv2/__init__.py @@ -17,6 +17,7 @@ from oslo.config import cfg from quantumclient import client +from quantumclient.common import exceptions from quantumclient.v2_0 import client as clientv20 from nova.openstack.common import excutils @@ -38,10 +39,10 @@ def _get_auth_token(): auth_strategy=CONF.quantum_auth_strategy, insecure=CONF.quantum_api_insecure) httpclient.authenticate() - except Exception: + return httpclient.auth_token + except exceptions.QuantumClientException as e: with excutils.save_and_reraise_exception(): - LOG.exception(_("_get_auth_token() failed")) - return httpclient.auth_token + LOG.error(_('Quantum client authentication failed: %s'), e) def _get_client(token=None): |
