'Send requests to Huawei storage server.
Send HTTPS call, get response in JSON.
Convert response into Python Object and return it.'

def do_call(self, url, data, method, calltimeout=constants.SOCKET_TIMEOUT, log_filter_flag=False):

    if self.url:
        url = (self.url + url)
    kwargs = {'timeout': calltimeout}
    if data:
        kwargs['data'] = json.dumps(data)
    if (method in ('POST', 'PUT', 'GET', 'DELETE')):
        func = getattr(self.session, method.lower())
    else:
        msg = (_('Request    method    %s    is    invalid.') % method)
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    try:
        res = func(url, **kwargs)
    except Exception as err:
        LOG.exception('Bad    response    from    server:    %(url)s.    Error:    %(err)s', {'url': url, 'err': err})
        return {'error': {'code': constants.ERROR_CONNECT_TO_SERVER, 'description': 'Connect    to    server    error.'}}
    try:
        res.raise_for_status()
    except requests.HTTPError as exc:
        return {'error': {'code': exc.response.status_code, 'description': six.text_type(exc)}}
    res_json = res.json()
    if (not log_filter_flag):
        LOG.info('\n\n\n\nRequest    URL:    %(url)s\n\nCall    Method:    %(method)s\n\nRequest    Data:    %(data)s\n\nResponse    Data:%(res)s\n\n', {'url': url, 'method': method, 'data': data, 'res': res_json})
    return res_json
