Reviewed: https://review.openstack.org/287202 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3f046e209ffd5729b73dd97a91a5b6cbcdc47ecb Submitter: Jenkins Branch: master
commit 3f046e209ffd5729b73dd97a91a5b6cbcdc47ecb Author: scottda <scott.dang...@hp.com> Date: Wed Mar 2 06:55:39 2016 -0700 Api_version_request.matches does not accept a string or None 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. This changes the doc to implement an api_version_request object to use this pattern. Closes-Bug: #1550337 Change-Id: I14a943b21e9e98dd848c0c292ca1a1ae941cb98b ** Changed in: nova 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: In Progress 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp