summaryrefslogtreecommitdiff
path: root/os_client_config/cloud_config.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-11-09 09:43:09 -0500
committerMonty Taylor <mordred@inaugust.com>2015-11-09 09:43:09 -0500
commit397da54db11b5a5506c24dc9af60a34665bbd953 (patch)
tree01a79baf2984833c60e9e240d6fe3658ea18a5bd /os_client_config/cloud_config.py
parentc90de1f691a27d4f434d948f1b77db02c23162a4 (diff)
downloados-client-config-397da54db11b5a5506c24dc9af60a34665bbd953.tar.gz
Workaround a dispute between osc and neutronclient
python-openstackclient wants network_api_version to be 2. neutronclient wants it to be 2.0. There is a patch to OSC to make it understand both, but in the mean time, let's unbreak people. Change-Id: I4d8f187d1302c5bcfa246e017e6c6d8af9c3f733
Diffstat (limited to 'os_client_config/cloud_config.py')
-rw-r--r--os_client_config/cloud_config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py
index 37029f1..bace53e 100644
--- a/os_client_config/cloud_config.py
+++ b/os_client_config/cloud_config.py
@@ -258,6 +258,10 @@ class CloudConfig(object):
constructor_args = []
if pass_version_arg:
version = self.get_api_version(service_key)
+ # Temporary workaround while we wait for python-openstackclient
+ # to be able to handle 2.0 which is what neutronclient expects
+ if service_key == 'network' and version == '2':
+ version = '2.0'
if service_key == 'identity':
# keystoneclient takes version as a tuple.
version = tuple(str(float(version)).split('.'))