Adding support for a new microversion

Adding support for a new microversion

If a new microversion is added on the nova side, then support must be added on the python-novaclient side also. The following procedure describes how to add support for a new microversion in python-novaclient.

  1. Update API_MAX_VERSION

    Set API_MAX_VERSION in novaclient/__init__.py to the version you are going to support.

    Note

    Microversion support should be added one by one in order. For example, microversion 2.74 should be added right after microversion 2.73. Microversion 2.74 should not be added right after microversion 2.72 or earlier.

  2. Update CLI and Python API

    Update CLI (novaclient/v2/shell.py) and/or Python API (novaclient/v2/*.py) to support the microversion.

  3. Add tests

    Add unit tests for the change. Add unit tests for the previous microversion to check raising an error or an exception when new arguments or parameters are specified. Add functional tests if necessary.

    Add the microversion in the exclusions in the test_versions method of the novaclient.tests.unit.v2.test_shell.ShellTest class if there are no versioned wrapped method changes for the microversion. The versioned wrapped methods have @api_versions.wraps decorators.

    For example (microversion 2.72 example):

    exclusions = set([
        (snipped...)
        72,  # There are no version-wrapped shell method changes for this.
    ])
    
  4. Update the CLI reference

    Update the CLI reference (doc/source/cli/nova.rst) if the CLI commands and/or arguments are modified.

  5. Add a release note

    Add a release note for the change. The release note should include a link to the description for the microversion in the :nova-doc:`Compute API Microversion History <reference/api-microversion-history>`.

  6. Commit message

    The description of the blueprint and dependency on the patch in nova side should be added in the commit message. For example:

    Implements: blueprint remove-force-flag-from-live-migrate-and-evacuate
    Depends-On: https://review.opendev.org/#/c/634600/
    

See the following examples:

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.