'Perform some checks for volumes configured for discard support.
If discard is configured for the volume, and the guest is using a
configuration known to not work, we will log a message explaining
the reason why.'

def _check_discard_for_attach_volume(self, conf, instance):

    if ((conf.driver_discard == 'unmap') and (conf.target_bus == 'virtio')):
        LOG.debug('Attempting    to    attach    volume    %(id)s    with    discard    support    enabled    to    an    instance    using    an    unsupported    configuration.    target_bus    =    %(bus)s.    Trim    commands    will    not    be    issued    to    the    storage    device.', {'bus': conf.target_bus, 'id': conf.serial}, instance=instance)
