Skip to content

Commit

Permalink
Bug #904830: use type==object-store instead of name==swift from servi…
Browse files Browse the repository at this point in the history
…ce catalog

The name field in the service catalog is an operator-specified, marketing name.
The type field contains the canonical name for the service (i.e., swift is
object-store).

Change-Id: I8556b3e6fddd8784f259170195352478d9c6ae32
  • Loading branch information
Donagh McCabe committed Jan 5, 2012
1 parent 0a7f8ca commit 6fe46ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ def _get_auth_v2_0(url, user, key, snet):
url = None
catalogs = body['access']['serviceCatalog']
for service in catalogs:
if service['name'] == 'swift':
if service['type'] == 'object-store':
url = service['endpoints'][0]['publicURL']
token_id = body['access']['token']['id']
if not url:
raise ClientException("There is no swift endpoint " \
raise ClientException("There is no object-store endpoint " \
"on this auth server.")
except(KeyError, IndexError):
raise ClientException("Error while getting answers from auth server")
Expand Down

0 comments on commit 6fe46ad

Please sign in to comment.