From c4c3499490f496d79c1438b6d3d941e922e2e5b3 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 9 Feb 2017 12:33:48 +0100 Subject: [PATCH] Bump OS_BAREMETAL_API_VERSION to 1.29 This way the CLI and OSC users can use the latest features without specifying the version explicitly. The final Ocata version is 1.31, but 1.29 is the most recent version supported by ironicclient Ocata. Change-Id: I8e0818eff079a802e7c2023749ff3824958dbd7d Depends-On: I285178d0b7384956eb151ca66007d7354566574d Partial-Bug: #1663203 (cherry picked from commit 6180c2cdf66456011d06b9e334baedb816083b54) --- releasenotes/notes/ironic-api-version-d2b4ec1474918f12.yaml | 6 ++++++ tripleo_common/constants.py | 4 ++++ tripleo_common/utils/overcloudrc.py | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/ironic-api-version-d2b4ec1474918f12.yaml diff --git a/releasenotes/notes/ironic-api-version-d2b4ec1474918f12.yaml b/releasenotes/notes/ironic-api-version-d2b4ec1474918f12.yaml new file mode 100644 index 000000000..95dd8e0d1 --- /dev/null +++ b/releasenotes/notes/ironic-api-version-d2b4ec1474918f12.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + The default ``OS_BAREMETAL_API_VERSION`` and ``IRONIC_API_VERSION`` in + ``overcloudrc`` were bumped to 1.29, which corresponds to Ocata final and + allows using all recent features without specifying an explicit version. diff --git a/tripleo_common/constants.py b/tripleo_common/constants.py index f00e03680..c40165e69 100644 --- a/tripleo_common/constants.py +++ b/tripleo_common/constants.py @@ -101,3 +101,7 @@ PASSWORD_PARAMETER_NAMES = ( ) PLAN_NAME_PATTERN = '^[a-zA-Z0-9-]+$' + +# The default version of the Bare metal API to set in overcloudrc. +# 1.29 is the latest API version in Ironic Ocata supported by ironicclient. +DEFAULT_BAREMETAL_API_VERSION = '1.29' diff --git a/tripleo_common/utils/overcloudrc.py b/tripleo_common/utils/overcloudrc.py index 64eae529c..27fab64f8 100644 --- a/tripleo_common/utils/overcloudrc.py +++ b/tripleo_common/utils/overcloudrc.py @@ -16,6 +16,8 @@ import socket from six.moves import urllib +from tripleo_common import constants + def get_service_ips(stack): service_ips = {} @@ -89,6 +91,8 @@ def create_overcloudrc(stack, no_proxy, admin_password): 'OS_AUTH_TYPE': 'password', 'OS_PASSWORD': admin_password, 'OS_AUTH_URL': overcloud_endpoint, + 'OS_BAREMETAL_API_VERSION': constants.DEFAULT_BAREMETAL_API_VERSION, + 'IRONIC_API_VERSION': constants.DEFAULT_BAREMETAL_API_VERSION, } overcloudrc = CLEAR_ENV