From 57e4614c16228ca49bd26e9abd202f19556a6625 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 29 Nov 2016 13:57:51 +0100 Subject: [PATCH] Bump Ironic API version to 1.22 when creating the Ironic client Due to how microversioning works in the Ironic client, it is not possible to use API features introduced in API version 1.10 and later from Mistral, as the default version is 1.9 (mid-Liberty). This change bumps the required API version to 1.22 (Newton final). See the following link for the full API version history: http://docs.openstack.org/developer/ironic/dev/webapi-version-history.html Change-Id: I1c605fc00efe5fe8956d6547ea5e85e6e1172c9b --- mistral/actions/openstack/actions.py | 10 +++++++++- .../notes/ironic-api-newton-9397da8135bb97b4.yaml | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/ironic-api-newton-9397da8135bb97b4.yaml diff --git a/mistral/actions/openstack/actions.py b/mistral/actions/openstack/actions.py index 4130b5427..568d2a5a2 100644 --- a/mistral/actions/openstack/actions.py +++ b/mistral/actions/openstack/actions.py @@ -52,6 +52,13 @@ LOG = log.getLogger(__name__) CONF = cfg.CONF +IRONIC_API_VERSION = '1.22' +"""The default microversion to pass to Ironic API. + +1.22 corresponds to Newton final. +""" + + class NovaAction(base.OpenStackAction): def _create_client(self): ctx = context.ctx() @@ -373,7 +380,8 @@ class IronicAction(base.OpenStackAction): return self._get_client_class()( ironic_endpoint.url, token=ctx.auth_token, - region_name=ironic_endpoint.region + region_name=ironic_endpoint.region, + os_ironic_api_version=IRONIC_API_VERSION ) @classmethod diff --git a/releasenotes/notes/ironic-api-newton-9397da8135bb97b4.yaml b/releasenotes/notes/ironic-api-newton-9397da8135bb97b4.yaml new file mode 100644 index 000000000..23b8848e6 --- /dev/null +++ b/releasenotes/notes/ironic-api-newton-9397da8135bb97b4.yaml @@ -0,0 +1,10 @@ +--- +features: + - It is now possible to use the Bare metal (Ironic) API features introduced + in API version 1.10 to 1.22. +upgrade: + - Required Ironic API version was bumped to '1.22' (corresponding to Ironic + 6.2.0 - Newton final release). + - Due to the default Ironic API version change to '1.22', new bare metal + nodes created with 'node_create' action appears in "enroll" provision state + instead of "available". Please update your workflows accordingly.