'Verify the input of manage function.'

def _manage_input_check(self, ref):

    if ('source-name' in ref):
        manage_source = ref['source-name']
        vdisk = self._helpers.get_vdisk_attributes(manage_source)
    elif ('source-id' in ref):
        manage_source = ref['source-id']
        vdisk = self._helpers.vdisk_by_uid(manage_source)
    else:
        reason = _('Reference    must    contain    source-id    or    source-name    element.')
        raise exception.ManageExistingInvalidReference(existing_ref=ref, reason=reason)
    if (vdisk is None):
        reason = (_('No    vdisk    with    the    UID    specified    by    ref    %s.') % manage_source)
        raise exception.ManageExistingInvalidReference(existing_ref=ref, reason=reason)
    return vdisk
