Define default Image and Volume API versions in overcloudrc

Define the default API versions for the Image and Volume services in
overcloudrc.

The default Image API version (2) is the latest major version supported
by Glance, and matches the version Glance implements when the version is
unspecified. The default Volume API version (3) is the latest major
version supported by Cinder. Cinder supports higher microversions, but
the Cinder project recommends a lower default value in order prevent
breaking legacy applications (e.g. scripts).

Change-Id: I306fc90b0adcc001aae5bfbe83685b27371c80c8
This commit is contained in:
Alan Bishop 2017-06-12 12:58:19 -04:00
parent fa0fdb16a9
commit 4e38b28344
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,7 @@
---
features:
- |
Set ``OS_VOLUME_API_VERSION`` and ``OS_IMAGE_API_VERSION`` in
``overcloudrc`` in order to establish the default API versions for
the Volume and Image services. The values match the default major API
versions for Cinder (3) and Glance (2).

View File

@ -110,6 +110,12 @@ PLAN_NAME_PATTERN = '^[a-zA-Z0-9-]+$'
# 1.29 is the latest API version in Ironic Ocata supported by ironicclient. # 1.29 is the latest API version in Ironic Ocata supported by ironicclient.
DEFAULT_BAREMETAL_API_VERSION = '1.29' DEFAULT_BAREMETAL_API_VERSION = '1.29'
# The default version of the Image API to set in overcloudrc.
DEFAULT_IMAGE_API_VERSION = '2'
# The default version of the Volume API to set in overcloudrc.
DEFAULT_VOLUME_API_VERSION = '3'
# The name of the file which holds the Mistral environment contents for plan # The name of the file which holds the Mistral environment contents for plan
# import/export # import/export
PLAN_ENVIRONMENT = 'plan-environment.yaml' PLAN_ENVIRONMENT = 'plan-environment.yaml'

View File

@ -101,6 +101,8 @@ def create_overcloudrc(stack, no_proxy, admin_password):
'OS_AUTH_URL': overcloud_endpoint, 'OS_AUTH_URL': overcloud_endpoint,
'OS_BAREMETAL_API_VERSION': constants.DEFAULT_BAREMETAL_API_VERSION, 'OS_BAREMETAL_API_VERSION': constants.DEFAULT_BAREMETAL_API_VERSION,
'IRONIC_API_VERSION': constants.DEFAULT_BAREMETAL_API_VERSION, 'IRONIC_API_VERSION': constants.DEFAULT_BAREMETAL_API_VERSION,
'OS_IMAGE_API_VERSION': constants.DEFAULT_IMAGE_API_VERSION,
'OS_VOLUME_API_VERSION': constants.DEFAULT_VOLUME_API_VERSION,
} }
overcloudrc = CLEAR_ENV overcloudrc = CLEAR_ENV