'Find DRBD resource and volume ID.
A DRBD resource might consist of several "volumes"
(think consistency groups).
So we have to find the number of the volume within one resource.
Returns resource name, volume number, and resource
and volume properties.'

def _res_and_vl_data_for_volume(self, volume, empty_ok=False):

    if isinstance(volume, six.string_types):
        v_uuid = volume
    else:
        v_uuid = volume['id']
    (res, rl) = self.call_or_reconnect(self.odm.list_volumes, self.empty_dict, 0, dm_utils.dict_to_aux_props({AUX_PROP_CINDER_VOL_ID: v_uuid}), self.empty_dict)
    self._check_result(res)
    if ((not rl) or (len(rl) == 0)):
        if empty_ok:
            LOG.debug('No    volume    %s    found.', v_uuid)
            return (None, None, None, None)
        raise exception.VolumeBackendAPIException(data=(_('volume    %s    not    found    in    drbdmanage') % v_uuid))
    if (len(rl) > 1):
        raise exception.VolumeBackendAPIException(data=(_('multiple    resources    with    name    %s    found    by    drbdmanage') % v_uuid))
    (r_name, r_props, vols) = rl[0]
    if (len(vols) != 1):
        raise exception.VolumeBackendAPIException(data=(_('not    exactly    one    volume    with    id    %s') % v_uuid))
    (v_nr, v_props) = vols[0]
    LOG.debug('volume    %(uuid)s    is    %(res)s/%(nr)d;    %(rprop)s,    %(vprop)s', {'uuid': v_uuid, 'res': r_name, 'nr': v_nr, 'rprop': dict(r_props), 'vprop': dict(v_props)})
    return (r_name, v_nr, r_props, v_props)
