vavavr00m / boto

Automatically exported from code.google.com/p/boto
1 stars 0 forks source link

boto.connect_elb does not take a host argument, as specified in the corresponding documentation (v2.0 (rHEAD)) #549

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Documentation error.

Follow the instructions at 
http://boto.cloudhackers.com/elb_tut.html#a-note-about-regions-and-endpoints

the expected result is a valid elb connection object, instead boto fails with:

>>> ec2 = boto.connect_elb(host='eu-west-1.elasticloadbalancing.amazonaws.com')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\site-packages\boto-2.0-py2.6.egg\boto\__init__.py", line 149, in connect_elb
    return ELBConnection(aws_access_key_id, aws_secret_access_key, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'host'

Seems like connect_elb() routes through boto.ec2.elb.ELBConnection() which does 
not have a host argument. It does have a region argument, but not in the format 
of the example from the documentation.

Using boto v2.0 (rHEAD), on Windows 7.

Original issue reported on code.google.com by rune.bri...@gmail.com on 19 Aug 2011 at 10:32

GoogleCodeExporter commented 9 years ago
I can't work out how to connect to to a specific region now either.  This was 
working not so long ago…

Original comment by markhell...@projectfusion.com on 19 Sep 2011 at 6:27

GoogleCodeExporter commented 9 years ago
The documentation is out of date for ELB.  All of the boto modules have now 
been updated to accept a RegionInfo argument to specify which region to connect 
to.  In addition, each module has a regions function that returns a list of all 
available regions (in RegionInfo form) as well as a connect_to_region function 
that allows you to connect to a specify region via the name of the region (e.g. 
connect_to_region('us-east-1'). 

I'll update the documentation.

Original comment by Mitch.Ga...@gmail.com on 19 Sep 2011 at 10:35

GoogleCodeExporter commented 9 years ago
See https://github.com/boto/boto/issues/344

Original comment by Mitch.Ga...@gmail.com on 19 Sep 2011 at 1:33