Merge "Trivial: Fix some document comments in microversion"
diff --git a/doc/source/library/api_microversion_testing.rst b/doc/source/library/api_microversion_testing.rst
index 0d0b595..b7a4ba8 100644
--- a/doc/source/library/api_microversion_testing.rst
+++ b/doc/source/library/api_microversion_testing.rst
@@ -8,7 +8,7 @@
---------------------------------------------
Many of the OpenStack components have implemented API microversions.
-It is important to tests those microversion in Tempest or external plugins.
+It is important to test those microversions in Tempest or external plugins.
Tempest now provides stable interfaces to support to test the API microversions.
Based on the microversion range coming from the combination of both configuration
and each test case, APIs request will be made with selected microversion.
diff --git a/tempest/lib/common/api_version_utils.py b/tempest/lib/common/api_version_utils.py
index 73cd280..1371b3c 100644
--- a/tempest/lib/common/api_version_utils.py
+++ b/tempest/lib/common/api_version_utils.py
@@ -82,7 +82,7 @@
def select_request_microversion(test_min_version, cfg_min_version):
- """Select microversion from test and configuration.
+ """Select microversion from test and configuration min version.
Compare requested microversion and return the maximum
microversion out of those.
@@ -101,7 +101,7 @@
def assert_version_header_matches_request(api_microversion_header_name,
api_microversion,
response_header):
- """Checks API microversion in resposne header
+ """Checks API microversion in response header
Verify whether microversion is present in response header
and with specified 'api_microversion' value.
diff --git a/tempest/lib/services/compute/base_compute_client.py b/tempest/lib/services/compute/base_compute_client.py
index bbadc8f..9161abb 100644
--- a/tempest/lib/services/compute/base_compute_client.py
+++ b/tempest/lib/services/compute/base_compute_client.py
@@ -23,15 +23,14 @@
class BaseComputeClient(rest_client.RestClient):
"""Base compute service clients class to support microversion.
- This class adds microversion to API request header if same is set
- and provide interface to select appropriate JSON schema file for
+ This class adds microversion to API request header if that is set
+ and provides interface to select appropriate JSON schema file for
response validation.
- :param auth_provider: an auth provider object used to wrap requests in
+ :param auth_provider: An auth provider object used to wrap requests in
auth
:param str service: The service name to use for the catalog lookup
:param str region: The region to use for the catalog lookup
- request with microversion
:param kwargs: kwargs required by rest_client.RestClient
"""
@@ -79,12 +78,12 @@
for items in schema_versions_info:
min_version = api_version_request.APIVersionRequest(items['min'])
max_version = api_version_request.APIVersionRequest(items['max'])
- # This is case where self.api_microversion is None, which means
+ # This is case where COMPUTE_MICROVERSION is None, which means
# request without microversion So select base v2.1 schema.
if version.is_null() and items['min'] is None:
schema = items['schema']
break
- # else select appropriate schema as per self.api_microversion
+ # else select appropriate schema as per COMPUTE_MICROVERSION
elif version.matches(min_version, max_version):
schema = items['schema']
break