Merge "_discover_latest_version is private and not used"

This commit is contained in:
Jenkins 2017-04-19 13:09:18 +00:00 committed by Gerrit Code Review
commit 0666bed25b
1 changed files with 0 additions and 19 deletions

View File

@ -426,25 +426,6 @@ class OpenStackCloud(_normalize.Normalizer):
self._raw_clients['raw-image'] = image_client
return self._raw_clients['raw-image']
def _discover_latest_version(self, client):
# Used to get the versioned endpoint for a service with one version
try:
# Version discovery
versions = client.get('/')
api_version = [
version for version in versions
if version['status'] == 'CURRENT'][0]
return api_version['links'][0]['href']
except (keystoneauth1.exceptions.connection.ConnectFailure,
OpenStackCloudURINotFound) as e:
# A 404 or a connection error is a likely thing to get
# either with a misconfgured glance. or we've already
# gotten a versioned endpoint from the catalog
self.log.debug(
"Version discovery failed, assuming endpoint in"
" the catalog is already versioned. {e}".format(e=str(e)))
return image_client.get_endpoint()
def _discover_image_endpoint(self, config_version, image_client):
try:
# Version discovery