Reviewed: https://review.openstack.org/285426 Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=29b8358ef56160b2845d6ce6f5fd46695617bf7e Submitter: Zuul Branch: master
commit 29b8358ef56160b2845d6ce6f5fd46695617bf7e Author: scottda <[email protected]> Date: Fri Feb 26 09:49:28 2016 -0700 Allow api_version_request.matches to accept a string or None According to the Manila devref you should be able to use the following pattern: if req_version.matches("2.1", "2.5"): ....stuff.... elif req_version.matches("2.6", "2.10"): ....other stuff.... elif req_version > api_version_request.APIVersionRequest("2.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. Change-Id: Ic2faaaa7696cc7a647679cbb7a8600b30c3d66d7 Closes-Bug: 1550337 ** Changed in: manila 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: Fix Released 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

