Fix redundant format of enable_deprecated_api_versions
The option can be a list of strings, instead of a list of lists of strings. Change-Id: I61902029a035584b64bccf5f395979c6080e96b8
This commit is contained in:
parent
138a07f329
commit
60a4fee36e
@ -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:
|
||||
|
@ -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.')
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user