Skip to content

Commit 441543d

Browse files
committed
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
1 parent a337f66 commit 441543d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

openstackclient/network/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818

1919
LOG = logging.getLogger(__name__)
2020

21-
DEFAULT_API_VERSION = '2'
21+
DEFAULT_API_VERSION = '2.0'
2222
API_VERSION_OPTION = 'os_network_api_version'
2323
API_NAME = "network"
2424
API_VERSIONS = {
25+
"2.0": "neutronclient.v2_0.client.Client",
2526
"2": "neutronclient.v2_0.client.Client",
2627
}
2728
# Translate our API version to auth plugin version prefix
@@ -32,6 +33,7 @@
3233

3334
NETWORK_API_TYPE = 'network'
3435
NETWORK_API_VERSIONS = {
36+
'2.0': 'openstackclient.api.network_v2.APIv2',
3537
'2': 'openstackclient.api.network_v2.APIv2',
3638
}
3739

0 commit comments

Comments
 (0)