3f046e209f
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