diff options
author | Eric Fried <efried@us.ibm.com> | 2017-11-30 12:37:56 -0600 |
---|---|---|
committer | Eric Fried <openstack@fried.cc> | 2019-10-07 16:33:20 +0000 |
commit | 5601c82915a2d745ee600a4ca4c0e7215206dbb6 (patch) | |
tree | a7d09de65f92997c2a170de7781f657026a7b327 /nova/utils.py | |
parent | 2c6542948f1f57c1a8a8faec1ba61800eaddff2a (diff) | |
download | nova-5601c82915a2d745ee600a4ca4c0e7215206dbb6.tar.gz |
Remove workaround for bug #1709118
A possible fix [1] for bug #1709118 is in keystoneauth1 release 3.3.0.
This change removes a workaround for that bug in
nova.utils.get_endpoint.
[1] https://review.openstack.org/#/c/500956/
Change-Id: If2a56ed56ecb3402fdee1189df81f0b9fbc483b3
Related-Bug: #1709118
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/nova/utils.py b/nova/utils.py index 12df2549f2..5164607615 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -30,7 +30,6 @@ import shutil import tempfile import eventlet -from keystoneauth1 import exceptions as ks_exc from keystoneauth1 import loading as ks_loading import netaddr from openstack import connection @@ -1066,30 +1065,7 @@ def get_endpoint(ksa_adapter): # ksa_adapter.auth is a _ContextAuthPlugin, which doesn't have # get_endpoint_data. Fall through to using get_endpoint(). pass - # TODO(efried): The remainder of this method reduces to - # TODO(efried): return ksa_adapter.get_endpoint() - # TODO(efried): once bug #1709118 is fixed. - # NOTE(efried): Id9bd19cca68206fc64d23b0eaa95aa3e5b01b676 may also do the - # trick, once it's in a ksa release. - # The EndpointNotFound exception happens when _ContextAuthPlugin is in play - # because its get_endpoint() method isn't yet set up to handle interface as - # a list. (It could also happen with a real auth if the endpoint isn't - # there; but that's covered below.) - try: - return ksa_adapter.get_endpoint() - except ks_exc.EndpointNotFound: - pass - - interfaces = list(ksa_adapter.interface) - for interface in interfaces: - ksa_adapter.interface = interface - try: - return ksa_adapter.get_endpoint() - except ks_exc.EndpointNotFound: - pass - raise ks_exc.EndpointNotFound( - "Could not find requested endpoint for any of the following " - "interfaces: %s" % interfaces) + return ksa_adapter.get_endpoint() def generate_hostid(host, project_id): |