Merge "_discover_latest_version is private and not used"
This commit is contained in:
commit
0666bed25b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue