Set default network api to 2.0 instead of 2
neutronclient expects 2.0 as the version if you go through the discovery constructor. For that reason, 2.0 is the 'correct' version to set in config files or environment variables for if you're using things that are not OSC. However, if you do that, OSC prints a warning that 2.0 is not in the supported network version list. Let's support both so that users don't get a confuse. Change-Id: I7412519693f75fcd29f5621ce9e5a2df2da92684
This commit is contained in:
parent
a337f664d2
commit
441543d67f
@ -18,10 +18,11 @@ from openstackclient.common import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_API_VERSION = '2'
|
||||
DEFAULT_API_VERSION = '2.0'
|
||||
API_VERSION_OPTION = 'os_network_api_version'
|
||||
API_NAME = "network"
|
||||
API_VERSIONS = {
|
||||
"2.0": "neutronclient.v2_0.client.Client",
|
||||
"2": "neutronclient.v2_0.client.Client",
|
||||
}
|
||||
# Translate our API version to auth plugin version prefix
|
||||
@ -32,6 +33,7 @@ API_VERSION_MAP = {
|
||||
|
||||
NETWORK_API_TYPE = 'network'
|
||||
NETWORK_API_VERSIONS = {
|
||||
'2.0': 'openstackclient.api.network_v2.APIv2',
|
||||
'2': 'openstackclient.api.network_v2.APIv2',
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user