Merge "Remove duplicated DEFAULT_API_VERSION"

This commit is contained in:
Zuul 2021-03-11 07:13:13 +00:00 committed by Gerrit Code Review
commit abde6038b2
3 changed files with 2 additions and 4 deletions

View File

@ -50,6 +50,7 @@ REST_API_VERSION_HISTORY = """REST API Version History:
# support is fully merged.
_MIN_API_VERSION = "1.0"
_MAX_API_VERSION = "1.2"
# The default api version request if none is requested in the headers
DEFAULT_API_VERSION = _MIN_API_VERSION

View File

@ -57,9 +57,6 @@ _METHODS_WITH_BODY = [
'PUT',
]
# The default api version request if none is requested in the headers
DEFAULT_API_VERSION = "1.0"
# name of attribute to keep version method information
VER_METHOD_ATTR = 'versioned_methods'

View File

@ -76,7 +76,7 @@ class HTTPRequest(os_wsgi.Request):
kwargs['base_url'] = 'http://localhost/v1'
use_admin_context = kwargs.pop('use_admin_context', False)
project_id = kwargs.pop('project_id', uuidsentinel.fake_project_id)
version = kwargs.pop('version', os_wsgi.DEFAULT_API_VERSION)
version = kwargs.pop('version', api_version.DEFAULT_API_VERSION)
out = os_wsgi.Request.blank(*args, **kwargs)
out.environ['masakari.context'] = FakeRequestContext(
user_id=uuidsentinel.fake_user_id,