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
This commit is contained in:
Monty Taylor 2015-11-09 09:43:09 -05:00
parent c90de1f691
commit 397da54db1
2 changed files with 5 additions and 1 deletions

View File

@ -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('.'))

View File

@ -11,7 +11,7 @@
"image_api_use_tasks": false,
"image_api_version": "2",
"image_format": "qcow2",
"network_api_version": "2.0",
"network_api_version": "2",
"object_api_version": "1",
"orchestration_api_version": "1",
"secgroup_source": "neutron",