Merge "Fix redundant format of enable_deprecated_api_versions"

This commit is contained in:
Zuul 2024-11-15 21:43:43 +00:00 committed by Gerrit Code Review
commit cce3fb3d92
3 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ def api_version_manager(version_info):
@functools.wraps(fn)
def register_api(driver, conf):
if (deprecated and
[api_version] not in conf.enable_deprecated_api_versions):
api_version not in conf.enable_deprecated_api_versions):
return None
if deprecated:

View File

@ -35,7 +35,7 @@ unreliable = cfg.BoolOpt(
enable_deprecated_api_versions = cfg.ListOpt(
'enable_deprecated_api_versions', default=[],
item_type=cfg.types.List(item_type=cfg.types.String(choices=('1', '1.1'))),
item_type=cfg.types.String(choices=('1', '1.1')),
help='List of deprecated API versions to enable.')

View File

@ -175,7 +175,7 @@ class TestDecorators(base.TestBase):
public_endpoint_2(None, self.conf)
# 3. Test enabling deprecated API version
self.config(enable_deprecated_api_versions=[['1']])
self.config(enable_deprecated_api_versions=['1'])
@decorators.api_version_manager(VERSION)
def public_endpoint_3(driver, conf):