Comment 2 for bug 1502949

Revision history for this message
David Paterson (davpat2112) wrote :

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)