Consolidate API version in client
This patch calculates the value of LAST_KNOWN_API_VERSION from DEFAULT_CONTAINER_API_VERSION, which can avoid to bump api version in two places. Change-Id: I68c51c28ef2f8f548d99276187675505d2fb2796 Closes-Bug: #1717402
This commit is contained in:
parent
509f4d17f6
commit
79ad64845f
@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__)
|
||||
DEFAULT_CONTAINER_API_VERSION = api_versions.DEFAULT_API_VERSION
|
||||
API_VERSION_OPTION = "os_container_api_version"
|
||||
API_NAME = "container"
|
||||
LAST_KNOWN_API_VERSION = 9
|
||||
LAST_KNOWN_API_VERSION = int(DEFAULT_CONTAINER_API_VERSION.split('.')[1])
|
||||
API_VERSIONS = {
|
||||
'1.%d' % i: 'zunclient.v1.client.Client'
|
||||
for i in range(1, LAST_KNOWN_API_VERSION + 1)
|
||||
|
Loading…
Reference in New Issue
Block a user