Add support for API microversions in Tempest tests
This adds support for testing Ironic API microversions, specified
as an additional 'X-OpenStack-Ironic-API-Version' header. This change
also adds tests for Ironic API /v1/nodes/(node_ident)/states/*
endpoint for microversions that were changing state machine.
Co-Authored-By: Vladyslav Drok <vdrok@mirantis.com>
Change-Id: Ibf0c73aa6795aaa52e945fd6baa821de20a599e7
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index 1f9ba51..36d59df 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -66,4 +66,20 @@
# help="Timeout for unprovisioning an Ironic node. "
# "Takes longer since Kilo as Ironic performs an extra "
# "step in Node cleaning.")
+ cfg.StrOpt('min_microversion',
+ default=None,
+ help="Lower version of the test target microversion range. "
+ "The format is 'X.Y', where 'X' and 'Y' are int values. "
+ "Tempest selects tests based on the range between "
+ "min_microversion and max_microversion. "
+ "If both values are None, Tempest avoids tests which "
+ "require a microversion."),
+ cfg.StrOpt('max_microversion',
+ default='latest',
+ help="Upper version of the test target microversion range. "
+ "The format is 'X.Y', where 'X' and 'Y' are int values. "
+ "Tempest selects tests based on the range between "
+ "min_microversion and max_microversion. "
+ "If both values are None, Tempest avoids tests which "
+ "require a microversion."),
]