Files
nova/doc/source
scottda 3f046e209f 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
2016-03-02 07:08:21 -07:00
..
2015-09-22 22:33:26 +02:00
2015-11-09 15:52:22 +00:00
2015-05-15 10:47:18 -07:00
2015-05-15 10:47:18 -07:00
2015-09-24 20:52:44 +08:00
2015-05-15 10:47:18 -07:00
2015-06-24 20:38:52 -05:00
2016-01-24 19:20:00 +01:00