Trivial: Fix some document comments in microversion

This is follow up patch to fix doc comments left in
Icbdcfb4cd5b7fb1029eec035b9e0024be59c8d1f

Change-Id: Iebdbfd62d1db4088e7e356aae700b74c17888415
This commit is contained in:
ghanshyam 2016-03-16 11:58:34 +09:00 committed by Ghanshyam Mann
parent 36521463de
commit c3b0b8b499
3 changed files with 8 additions and 9 deletions

View File

@ -8,7 +8,7 @@ Framework to support API Microversion testing
---------------------------------------------
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.

View File

@ -82,7 +82,7 @@ def check_skip_with_microversion(test_min_version, test_max_version,
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 select_request_microversion(test_min_version, cfg_min_version):
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.

View File

@ -23,15 +23,14 @@ COMPUTE_MICROVERSION = None
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 @@ class BaseComputeClient(rest_client.RestClient):
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