'Return all block device mappings on a compute host.'

def _get_host_volume_bdms(self, context, use_slave=False):

    compute_host_bdms = []
    instances = objects.InstanceList.get_by_host(context, self.host, use_slave=use_slave)
    for instance in instances:
        bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(context, instance.uuid, use_slave=use_slave)
        instance_bdms = [bdm for bdm in bdms if bdm.is_volume]
        compute_host_bdms.append(dict(instance=instance, instance_bdms=instance_bdms))
    return compute_host_bdms
