yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #47892
[Bug 1550337] Re: api_version_request.matches does not accept a string or None
Reviewed: https://review.openstack.org/285293
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=72876024648052b25aac036add8c5feb2440e10f
Submitter: Jenkins
Branch: master
commit 72876024648052b25aac036add8c5feb2440e10f
Author: scottda <scott.dangelo@xxxxxx>
Date: Fri Feb 26 06:17:08 2016 -0700
Allow api_version_request.matches to accept a string
According to the Cinder devref you should be able to use the following
pattern:
if req_version.matches("3.1", "3.5"):
....stuff....
elif req_version.matches("3.6", "3.10"):
....other stuff....
elif req_version > api_version_request.APIVersionRequest("3.10"):
....more stuff.....
However, the api_version_request.matches() function will not accept a
string, it requires an api_version_request object.
Fix this to accept a string, as well as None for object.
Closes-Bug: 1550337
Change-Id: Ic90f4a13cfad601a181fd3a91684ecbb2b2fba74
** Changed in: cinder
Status: In Progress => 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/1550337
Title:
api_version_request.matches does not accept a string or None
Status in Cinder:
Fix Released
Status in Manila:
In Progress
Status in OpenStack Compute (nova):
Fix Released
Bug description:
According to the Cinder devref (https://github.com/openstack/cinder/blob/master/doc/source/devref/api_microversion_dev.rst)
you should be able to use the following pattern:
def index(self, req):
<common code>
req_version = req.api_version_request
if req_version.matches("3.1", "3.5"):
....stuff....
elif req_version.matches("3.6", "3.10"):
....other stuff....
elif req_version > api_version_request.APIVersionRequest("3.10"):
....more stuff.....
<common code>
However, the api_version_request.matches() function will not accept a
string, it requires an api_version_request object.
Fix this to accept a string.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1550337/+subscriptions