|
| 1 | +===================================== |
| 2 | +Adding support for a new microversion |
| 3 | +===================================== |
| 4 | + |
| 5 | +If a new microversion is added on the nova side, |
| 6 | +then support must be added on the *python-novaclient* side also. |
| 7 | +The following procedure describes how to add support for a new microversion |
| 8 | +in *python-novaclient*. |
| 9 | + |
| 10 | +#. Update ``API_MAX_VERSION`` |
| 11 | + |
| 12 | + Set ``API_MAX_VERSION`` in ``novaclient/__init__.py`` to the version |
| 13 | + you are going to support. |
| 14 | + |
| 15 | + .. note:: |
| 16 | + |
| 17 | + Microversion support should be added one by one in order. |
| 18 | + For example, microversion 2.74 should be added right after |
| 19 | + microversion 2.73. Microversion 2.74 should not be added right |
| 20 | + after microversion 2.72 or earlier. |
| 21 | + |
| 22 | +#. Update CLI and Python API |
| 23 | + |
| 24 | + Update CLI (``novaclient/v2/shell.py``) and/or Python API |
| 25 | + (``novaclient/v2/*.py``) to support the microversion. |
| 26 | + |
| 27 | +#. Add tests |
| 28 | + |
| 29 | + Add unit tests for the change. Add unit tests for the previous microversion |
| 30 | + to check raising an error or an exception when new arguments or parameters |
| 31 | + are specified. Add functional tests if necessary. |
| 32 | + |
| 33 | + Add the microversion in the ``exclusions`` in the ``test_versions`` |
| 34 | + method of the ``novaclient.tests.unit.v2.test_shell.ShellTest`` class |
| 35 | + if there are no versioned wrapped shell method changes |
| 36 | + for the microversion. |
| 37 | + |
| 38 | + For example (microversion 2.72 example):: |
| 39 | + |
| 40 | + exclusions = set([ |
| 41 | + (snipped...) |
| 42 | + 72, # There are no version-wrapped shell method changes for this. |
| 43 | + ]) |
| 44 | + |
| 45 | +#. Update the CLI reference |
| 46 | + |
| 47 | + Update the CLI reference (``doc/source/cli/nova.rst``) |
| 48 | + if the CLI commands and/or arguments are modified. |
| 49 | + |
| 50 | +#. Add a release note |
| 51 | + |
| 52 | + Add a release note for the change. The release note should include a link |
| 53 | + to the description for the microversion in the |
| 54 | + :nova-doc:`Compute API Microversion History |
| 55 | + <reference/api-microversion-history>`. |
| 56 | + |
| 57 | +#. Commit message |
| 58 | + |
| 59 | + The description of the blueprint and dependency on the patch in nova side |
| 60 | + should be added in the commit message. For example:: |
| 61 | + |
| 62 | + Implements: blueprint remove-force-flag-from-live-migrate-and-evacuate |
| 63 | + Depends-On: https://review.opendev.org/#/c/634600/ |
| 64 | + |
| 65 | +See the following examples: |
| 66 | + |
| 67 | +- `Microversion 2.71 - show server group <https://review.opendev.org/#/c/640657/>`_ |
| 68 | +- `API microversion 2.69: Handles Down Cells <https://review.opendev.org/#/c/579563/>`_ |
| 69 | +- `Microversion 2.68: Remove 'forced' live migrations, evacuations <https://review.opendev.org/#/c/635131/>`_ |
| 70 | +- `Add support changes-before for microversion 2.66 <https://review.opendev.org/#/c/603549/>`_ |
| 71 | +- `Microversion 2.64 - Use new format policy in server group <https://review.opendev.org/#/c/578261/>`_ |
0 commit comments