From 88a12a98fbab037b01e95a92bc79f44a9e9cc25d Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 9 May 2015 09:43:29 -0400 Subject: [PATCH] Make ironic use the API version system The other services honor settings for API versions. Make Ironic comply. Change-Id: I736785896d6d24e18b680d07c82b9922f9d39447 --- shade/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shade/__init__.py b/shade/__init__.py index 68f4928a2..9521707d2 100644 --- a/shade/__init__.py +++ b/shade/__init__.py @@ -307,6 +307,9 @@ class OpenStackCloud(object): def _get_nova_api_version(self): return self.api_versions['compute'] + def _get_ironic_api_version(self): + return self.api_versions.get('baremetal', '1') + @property def nova_client(self): if self._nova_client is None: @@ -2245,7 +2248,7 @@ class OperatorCloud(OpenStackCloud): endpoint = self.get_session_endpoint(service_key='baremetal') try: self._ironic_client = ironic_client.Client( - '1', endpoint, token=token, + self._get_ironic_api_version(), endpoint, token=token, timeout=self.api_timeout) except Exception as e: self.log.debug("ironic auth failed", exc_info=True)