Merge "Fix redundant format of enable_deprecated_api_versions"
This commit is contained in:
commit
cce3fb3d92
@ -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