'Find DRBD resource and snapshot name from the snapshot ID.'

def _resource_and_snap_data_from_snapshot(self, snapshot, empty_ok=False):

    s_uuid = snapshot['id']
    (res, rs) = self.call_or_reconnect(self.odm.list_snapshots, self.empty_dict, self.empty_dict, 0, dm_utils.dict_to_aux_props({AUX_PROP_CINDER_VOL_ID: s_uuid}), self.empty_dict)
    self._check_result(res)
    if ((not rs) or (len(rs) == 0)):
        if empty_ok:
            return None
        else:
            raise exception.VolumeBackendAPIException(data=(_('no    snapshot    with    id    %s    found    in    drbdmanage') % s_uuid))
    if (len(rs) > 1):
        raise exception.VolumeBackendAPIException(data=(_('multiple    resources    with    snapshot    ID    %s    found') % s_uuid))
    (r_name, snaps) = rs[0]
    if (len(snaps) != 1):
        raise exception.VolumeBackendAPIException(data=(_('not    exactly    one    snapshot    with    id    %s') % s_uuid))
    (s_name, s_props) = snaps[0]
    LOG.debug('snapshot    %(uuid)s    is    %(res)s/%(snap)s', {'uuid': s_uuid, 'res': r_name, 'snap': s_name})
    return (r_name, s_name, s_props)
