Correct the API microversion docs

* Fixed the construction of Version object.
* Remove un-needed action for updating the version.

Change-Id: Ia47e3569093129108a611c10a1042939b1a813d8
This commit is contained in:
Hongbin Lu 2017-06-30 23:18:38 +00:00
parent 745cebc9ef
commit 5464b393fe
1 changed files with 6 additions and 6 deletions

View File

@ -256,11 +256,11 @@ can be used to modify behavior based on its value::
def index(self):
<common code>
req_version = pecan.request.headers.get(Version.string)
req1_min = versions.Version("1.1")
req1_max = versions.Version("1.5")
req2_min = versions.Version("1.6")
req2_max = versions.Version("1.10")
req_version = pecan.request.version
req1_min = versions.Version('', '', '', "1.1")
req1_max = versions.Version('', '', '', "1.5")
req2_min = versions.Version('', '', '', "1.6")
req2_max = versions.Version('', '', '', "1.10")
if req_version.matches(req1_min, req1_max):
....stuff....
@ -293,7 +293,7 @@ necessary to add changes to other places which describe your change:
release notes.
* Update the expected versions in affected tests, for example in
``zun/tests/unit/api/controllers/test_base.py``.
``zun/tests/unit/api/controllers/test_root.py``.
* Make a new commit to python-zunclient and update corresponding
files to enable the newly added microversion API.