summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--os_client_config/cloud_config.py6
-rw-r--r--releasenotes/notes/ironic-microversion-ba5b0f36f11196a6.yaml4
2 files changed, 10 insertions, 0 deletions
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py
index f52756f..3521920 100644
--- a/os_client_config/cloud_config.py
+++ b/os_client_config/cloud_config.py
@@ -372,6 +372,12 @@ class CloudConfig(object):
constructor_kwargs['endpoint'] = endpoint
if service_key == 'network':
constructor_kwargs['api_version'] = version
+ elif service_key == 'baremetal':
+ if version != '1':
+ # Set Ironic Microversion
+ constructor_kwargs['os_ironic_api_version'] = version
+ # Version arg is the major version, not the full microstring
+ constructor_kwargs['version'] = version[0]
else:
constructor_kwargs['version'] = version
if service_key == 'database':
diff --git a/releasenotes/notes/ironic-microversion-ba5b0f36f11196a6.yaml b/releasenotes/notes/ironic-microversion-ba5b0f36f11196a6.yaml
new file mode 100644
index 0000000..62e3627
--- /dev/null
+++ b/releasenotes/notes/ironic-microversion-ba5b0f36f11196a6.yaml
@@ -0,0 +1,4 @@
+---
+features:
+ - Add support for passing Ironic microversion to the ironicclient
+ constructor in get_legacy_client.