From 441543d67fbff068c1993a39c72c8dd62df34cfb Mon Sep 17 00:00:00 2001
From: Monty Taylor <mordred@inaugust.com>
Date: Mon, 9 Nov 2015 09:29:38 -0500
Subject: [PATCH] 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
---
 openstackclient/network/client.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/openstackclient/network/client.py b/openstackclient/network/client.py
index 5f72782bb1..69ed11feb8 100644
--- a/openstackclient/network/client.py
+++ b/openstackclient/network/client.py
@@ -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',
 }