This change is broken unless the first service['type'] == 'identity'. If the first service type is 'volume' for instance, we raise exception and exit loop, never reaching the identity service. We should add unit tests.
Breaks here:
for service in token['catalog']:
if service['type'] == 'identity' and \
'id' in service and service['id'] is not None:
return service['id']
else:
message = "Unable to retrive CPID. " + \ "Identity service ID was not " + \
"found in Keystone v3 catalog." self.logger.error(message)
raise RuntimeError(message)
This change is broken unless the first service['type'] == 'identity'. If the first service type is 'volume' for instance, we raise exception and exit loop, never reaching the identity service. We should add unit tests.
Breaks here:
" Identity service ID was not " + \
self. logger. error(message) message)
for service in token['catalog']:
if service['type'] == 'identity' and \
'id' in service and service['id'] is not None:
return service['id']
else:
message = "Unable to retrive CPID. " + \
"found in Keystone v3 catalog."
raise RuntimeError(