diff options
author | Monty Taylor <mordred@inaugust.com> | 2017-02-28 11:22:30 -0600 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2017-02-28 11:31:11 -0600 |
commit | d321a14ecbe79c888e891424250c1b5bdfd2ea65 (patch) | |
tree | 0c460123e4ed4a79db41bd0c6376de1b64b1f14d | |
parent | 81e04fcec6cb333a7d44124c045358c4904cf765 (diff) | |
download | os-client-config-d321a14ecbe79c888e891424250c1b5bdfd2ea65.tar.gz |
Pass ironic microversion through from api_version
If someone sets baremetal_api_version to 1.29 right now, we don't really
do anything with that information. Pass it through to the constructor
for ironicclient in get_legacy_client().
Change-Id: I470fbb8852eac7d5cb35aef549ac591d63f3636f
-rw-r--r-- | os_client_config/cloud_config.py | 6 | ||||
-rw-r--r-- | releasenotes/notes/ironic-microversion-ba5b0f36f11196a6.yaml | 4 |
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. |