'Setups the connection based on the given url.
The form is:
<http|https>://<host>:port/doc_root'

def configure_from_url(self, url):

    LOG.debug('Configuring    from    URL:    %s', url)
    parsed = urlparse.urlparse(url)
    self.use_ssl = (parsed.scheme == 'https')
    self.host = parsed.hostname
    self.port = (parsed.port or 80)
    self.doc_root = parsed.path.rstrip('/')
    if (not VERSION_REGEX.match(self.doc_root)):
        if self.DEFAULT_DOC_ROOT:
            doc_root = self.DEFAULT_DOC_ROOT.lstrip('/')
            self.doc_root += ('/' + doc_root)
            LOG.debug('Appending    doc_root    %(doc_root)s    to    URL    %(url)s', {'doc_root': doc_root, 'url': url})
    self.connect_kwargs = self.get_connect_kwargs()
