yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #06398
[Bug 1239890] Re: boto version checking in test cases still not correct
** Changed in: nova
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1239890
Title:
boto version checking in test cases still not correct
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
https://review.openstack.org/#/c/50908/ was meant to fix test cases to
inspect boto versions and use the correct function parameters
accordinglyin api tests.
boto_version = pkg_resources.parse_version(boto.Version)
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:
self.ec2.new_http_connection(host, is_secure).AndReturn(self.http)
However, this is still not correct:
>>> import pkg_resources
>>> import boto
>>> print boto.Version
2.9.6
>>> boto_version = pkg_resources.parse_version(boto.Version)
>>> print boto_version
('00000002', '00000009', '00000006', '*final')
>>> print boto_version >= (2, 13)
I believe we should also be using pkg_resources to construct the other
side of the conditional:
>>> print boto_version >= pkg_resources.parse_version('2.13')
False
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1239890/+subscriptions