'Gets all host mappings for given volume from array.'

def get_volume_mappings_for_volume(self, volume):

    mappings = (self.get_volume_mappings() or [])
    return [x for x in mappings if (x.get('volumeRef') == volume['volumeRef'])]
