'Retrieve the type the volume object.'

def _get_volume_type(self, volume):

    if (volume['volume_type_id'] and volume.get('volume_type')):
        return volume['volume_type']['name']
    else:
        return volume['volume_type_id']
