summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Kotton <gkotton@vmware.com>2013-10-10 09:48:41 -0700
committerGary Kotton <gkotton@vmware.com>2013-10-11 03:49:24 -0700
commitba7ad536d59718d9eced34bfe70871b90c2f794b (patch)
treef9b66a145063f77c264c8c8bf4db0b24e9fb2c19
parentf89e624981163089f3ccd2d33a5d5290cba953e0 (diff)
downloadnova-ba7ad536d59718d9eced34bfe70871b90c2f794b.tar.gz
Add boto special casing for param changes in 2.13
boto 2.13 has some interface changes with the get_http_connection call which adds port as a non optional parameter *in the middle of* existing non optional parameters. It's a special kind of incompatible change. We are already special casing around boto in the unit tests, lets just do more of that if we are running on a newer version. (cherry picked from commit 1ce493b9e4e0c381146287161ab2a3c75f1fc603) Change-Id: I62f5d4ef5cfa5577015a521a5d161086546a4125 Co-Authored-By: Sean Dague <sdague@linux.vnet.ibm.com> Co-Authored-By: Dan Smith <dansmith@redhat.com>
-rw-r--r--nova/tests/test_api.py5
-rw-r--r--nova/tests/test_objectstore.py6
-rw-r--r--tools/pip-requires2
3 files changed, 9 insertions, 4 deletions
diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py
index 949f54512b..0e733d15f2 100644
--- a/nova/tests/test_api.py
+++ b/nova/tests/test_api.py
@@ -241,7 +241,10 @@ class ApiEc2TestCase(test.TestCase):
self.http = FakeHttplibConnection(
self.app, '%s:8773' % (self.host), False)
# pylint: disable=E1103
- if boto.Version >= '2':
+ if boto.Version >= '2.13':
+ self.ec2.new_http_connection(host or self.host, 8773,
+ is_secure).AndReturn(self.http)
+ elif boto.Version >= '2':
self.ec2.new_http_connection(host or '%s:8773' % (self.host),
is_secure).AndReturn(self.http)
else:
diff --git a/nova/tests/test_objectstore.py b/nova/tests/test_objectstore.py
index 0775bb66fd..833506d9a4 100644
--- a/nova/tests/test_objectstore.py
+++ b/nova/tests/test_objectstore.py
@@ -77,9 +77,11 @@ class S3APITestCase(test.TestCase):
calling_format=s3.OrdinaryCallingFormat())
self.conn = conn
- def get_http_connection(host, is_secure):
+ def get_http_connection(*args):
"""Get a new S3 connection, don't attempt to reuse connections."""
- return self.conn.new_http_connection(host, is_secure)
+ # The calling function passed the parameters according to the
+ # the boto version.
+ return self.conn.new_http_connection(*args)
self.conn.get_http_connection = get_http_connection
diff --git a/tools/pip-requires b/tools/pip-requires
index 5dd63fe89a..05a103ee9f 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -3,7 +3,7 @@ Cheetah>=2.4.4
amqplib>=0.6.1
anyjson>=0.2.4
argparse
-boto>=2.4.0,<2.13.0
+boto
eventlet>=0.9.17
kombu>=1.0.4
lxml>=2.3