'Validate source volume information.'

def _validate_migrate_volume(self, volume, xml):

    (pools, lds, ldsets, used_ldns, hostports, max_ld_count) = self.configs(xml)
    ldname = self._validate_ld_exist(lds, volume.id, self._properties['ld_name_format'])
    if (volume.status != 'available'):
        msg = (_('Specified    Logical    Disk    %s    is    not    available.') % ldname)
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    ld = lds[ldname]
    if (ld['Purpose'] != '---'):
        msg = (_('Specified    Logical    Disk    %(ld)s    has    an    invalid    attribute    (%(purpose)s).') % {'ld': ldname, 'purpose': ld['Purpose']})
        raise exception.VolumeBackendAPIException(data=msg)
    return True
