diff --git a/releasenotes/notes/cinder-and-glance-api-version-bca6acd809d4151c.yaml b/releasenotes/notes/cinder-and-glance-api-version-bca6acd809d4151c.yaml new file mode 100644 index 000000000..510a6cec8 --- /dev/null +++ b/releasenotes/notes/cinder-and-glance-api-version-bca6acd809d4151c.yaml @@ -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). diff --git a/tripleo_common/constants.py b/tripleo_common/constants.py index 23d4ff9b5..51af64b39 100644 --- a/tripleo_common/constants.py +++ b/tripleo_common/constants.py @@ -110,6 +110,12 @@ PLAN_NAME_PATTERN = '^[a-zA-Z0-9-]+$' # 1.29 is the latest API version in Ironic Ocata supported by ironicclient. 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 # import/export PLAN_ENVIRONMENT = 'plan-environment.yaml' diff --git a/tripleo_common/utils/overcloudrc.py b/tripleo_common/utils/overcloudrc.py index 2f9d41d70..369d69298 100644 --- a/tripleo_common/utils/overcloudrc.py +++ b/tripleo_common/utils/overcloudrc.py @@ -101,6 +101,8 @@ def create_overcloudrc(stack, no_proxy, admin_password): 'OS_AUTH_URL': overcloud_endpoint, 'OS_BAREMETAL_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