'Send command to VPSA Controller.'

def send_cmd(self, cmd, **kwargs):

    self.ensure_connection(cmd)
    (method, url, body) = self._generate_vpsa_cmd(cmd, **kwargs)
    LOG.debug('Invoking    %(cmd)s    using    %(method)s    request.', {'cmd': cmd, 'method': method})
    host = self.conf.zadara_vpsa_host
    port = int(self.conf.zadara_vpsa_port)
    protocol = ('https' if self.conf.zadara_vpsa_use_ssl else 'http')
    if (protocol == 'https'):
        if (not self.conf.zadara_ssl_cert_verify):
            verify = False
        else:
            cert = (self.conf.driver_ssl_cert_path or None)
            verify = (cert if cert else True)
    else:
        verify = False
    if port:
        api_url = ('%s://%s:%d%s' % (protocol, host, port, url))
    else:
        api_url = ('%s://%s%s' % (protocol, host, url))
    try:
        response = requests.request(method, api_url, data=body, verify=verify)
    except requests.exceptions.RequestException as e:
        message = (_('Exception:    %s') % six.text_type(e))
        raise exception.VolumeDriverException(message=message)
    if (response.status_code != 200):
        raise exception.BadHTTPResponseStatus(status=response.status_code)
    data = response.content
    xml_tree = etree.fromstring(data)
    status = xml_tree.findtext('status')
    if (status != '0'):
        raise exception.FailedCmdWithDump(status=status, data=data)
    if (method in ['POST', 'DELETE']):
        LOG.debug('Operation    completed    with    status    code    %(status)s', {'status': status})
    return xml_tree
