rackspace/python-cloudlb — Issue #13: get_limits() is mentioned in the README but does not actually exist
Author: calebgroom
Created: 2012-01-30 00:35:17+00:00
State: open

It looks like get_limits() was originally implemented in cloudlb/__init__.py but later removed. We should get it working again.

This section is currently in README.rst:

Get limits on all LoadBalancers::

#!/usr/bin/python
import cloudlb
clb = cloudlb.CloudLoadBalancer("username", "apikey","chicago")

print clb.get_limits()

Sample script:

#!/usr/bin/python
import cloudlb
clb = cloudlb.CloudLoadBalancer("myuser", "mykey","chicago")
lbs = clb.loadbalancers.list()
for lb in lbs:
print lb.get_limits()

Output:

Traceback (most recent call last):
File "./test.py", line 6, in
print lb.get_limits()
File "/usr/local/lib/python2.7/dist-packages/python_cloudlb-0.4-py2.7.egg/cloudlb/base.py", line 23, in __getattr__
raise AttributeError("Object has no attribute '%s'" % k)
AttributeError: Object has no attribute 'get_limits'