GitHub user lrvan opened a pull request:

    [LIBCLOUD-936] fixed AWS ALB/ELB driver init method to instantiate ne…

    …sted connection object properly
    ## Fixed AWS ALB/ELB driver init method to instantiate nested connection 
object properly
    ### Description
    AWS ELB/ALB Driver connection object initialization is broken. 
    Code to reproduce:
    `from libcloud.loadbalancer.types import Provider
    from libcloud.loadbalancer.providers import get_driver
    key = ''
    secret = ''
    token = ''
    cls = get_driver(Provider.ELB)
    #cls = get_driver(Provider.ALB)
    driver = cls(key, secret, 'us-east-1', token=token)
    data = driver.list_balancers()`
    Traceback (most recent call last):
      File "", line 33, in <module>
        data = driver.list_balancers()
line 68, in list_balancers
        data = self.connection.request(ROOT, params=params).object
      File "/Users/irvan/Repos/GIT/github/libcloud/libcloud/common/", 
line 603, in request
        headers=headers, stream=stream)
      File "/Users/irvan/Repos/GIT/github/libcloud/libcloud/", line 215, 
in request
"/Users/irvan/py27venv/lib/python2.7/site-packages/requests/", line 
518, in request
        resp = self.send(prep, **send_kwargs)
"/Users/irvan/py27venv/lib/python2.7/site-packages/requests/", line 
639, in send
        r = adapter.send(request, **kwargs)
"/Users/irvan/py27venv/lib/python2.7/site-packages/requests/", line 
502, in send
        raise ConnectionError(e, request=request)
HTTPSConnectionPool(host='', port=443): 
Max retries exceeded with url: 
/2012-06-01/?Action=DescribeLoadBalancers&Version=2012-06-01 (Caused by 
 object at 0x10760f4d0>: Failed to establish a new connection: [Errno 8] 
nodename nor servname provided, or not known',))`
    ### Status
    done, ready for review
    ### Checklist (tick everything that applies)
    - [ ] [Code 
 (required, can be done after the PR checks)
    - [ ] Documentation
    - [ ] [Tests](
    - [ ] 
 (required for bigger changes)

You can merge this pull request into a Git repository by running:

    $ git pull LIBCLOUD-936

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1089
commit 0a03bede146c1984daa0c5be2431335c5cedc550
Author: Anton Kozyrev <>
Date:   2017-08-08T10:08:02Z

    [LIBCLOUD-936] fixed AWS ALB/ELB driver init method to instantiate nested 
connection object properly


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

Reply via email to