'Throws an exception if the input is invalid for manage existing.
if the input is valid - return a request.'

def _create_scaleio_get_volume_request(self, volume, existing_ref):

    type_id = volume.get('volume_type_id')
    if ('source-id' not in existing_ref):
        reason = _('Reference    must    contain    source-id.')
        raise exception.ManageExistingInvalidReference(existing_ref=existing_ref, reason=reason)
    if (type_id is None):
        reason = _('Volume    must    have    a    volume    type')
        raise exception.ManageExistingVolumeTypeMismatch(existing_ref=existing_ref, reason=reason)
    vol_id = existing_ref['source-id']
    req_vars = {'server_ip': self.server_ip, 'server_port': self.server_port, 'id': vol_id}
    request = ('https://%(server_ip)s:%(server_port)s/api/instances/Volume::%(id)s' % req_vars)
    LOG.info('ScaleIO    get    volume    by    id    request:    %s.', request)
    return request
