Require ironic API version 1.6
This is Kilo, so make it clear in README that we actually still support it (only stand alone case). Change-Id: I9a5bd97a2a33a12311626bb3fae878bfb5c9d53c
This commit is contained in:
parent
39636b8fb1
commit
6f8342955e
12
README.rst
12
README.rst
@ -31,6 +31,10 @@ CONTRIBUTING.rst_ for instructions on how to contribute.
|
||||
Version Support Matrix
|
||||
----------------------
|
||||
|
||||
**ironic-inspector** currently requires bare metal API version ``1.6`` to be
|
||||
provided by Ironic. This version is available starting with Ironic Kilo
|
||||
release.
|
||||
|
||||
Here is a mapping between Ironic versions and supported **ironic-inspector**
|
||||
versions. The Standalone column shows which **ironic-inspector** versions can
|
||||
be used in standalone mode with each Ironic version. The Inspection Interface
|
||||
@ -44,11 +48,15 @@ inspection interface in each version of Ironic.
|
||||
+==============+==========+====================+
|
||||
|Juno |1.0 |N/A |
|
||||
+--------------+----------+--------------------+
|
||||
|Kilo |1.0 - 1.1 |1.0 - 1.1 |
|
||||
|Kilo |1.0 - 2.2 |1.0 - 1.1 |
|
||||
+--------------+----------+--------------------+
|
||||
|Liberty |1.1 - 2.X |2.X |
|
||||
|Liberty |1.1 - 2.X |2.0 - 2.X |
|
||||
+--------------+----------+--------------------+
|
||||
|
||||
.. note::
|
||||
``2.X`` means we don't have specific plans on deprecating support for this
|
||||
Ironic version. This does not imply that we'll support it forever though.
|
||||
|
||||
Workflow
|
||||
--------
|
||||
|
||||
|
@ -46,7 +46,8 @@ class TestCheckAuth(base.BaseTest):
|
||||
fake_ironic_url)
|
||||
utils.get_client(fake_token)
|
||||
args = {'os_auth_token': fake_token,
|
||||
'ironic_url': fake_ironic_url}
|
||||
'ironic_url': fake_ironic_url,
|
||||
'os_ironic_api_version': '1.6'}
|
||||
mock_client.assert_called_once_with(1, **args)
|
||||
|
||||
@mock.patch.object(client, 'get_client')
|
||||
@ -57,7 +58,8 @@ class TestCheckAuth(base.BaseTest):
|
||||
'os_auth_url': CONF.ironic.os_auth_url,
|
||||
'os_tenant_name': CONF.ironic.os_tenant_name,
|
||||
'os_endpoint_type': CONF.ironic.os_endpoint_type,
|
||||
'os_service_type': CONF.ironic.os_service_type}
|
||||
'os_service_type': CONF.ironic.os_service_type,
|
||||
'os_ironic_api_version': '1.6'}
|
||||
mock_client.assert_called_once_with(1, **args)
|
||||
|
||||
@mock.patch.object(auth_token, 'AuthProtocol')
|
||||
|
@ -37,6 +37,9 @@ RETRY_DELAY = 5
|
||||
|
||||
GREEN_POOL = None
|
||||
|
||||
# 1.6 is a Kilo API version, which has all we need and is pretty well tested
|
||||
DEFAULT_IRONIC_API_VERSION = '1.6'
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
"""Inspector exception."""
|
||||
@ -61,7 +64,8 @@ def spawn_n(*args, **kwargs):
|
||||
return GREEN_POOL.spawn_n(*args, **kwargs)
|
||||
|
||||
|
||||
def get_client(token=None): # pragma: no cover
|
||||
def get_client(token=None,
|
||||
api_version=DEFAULT_IRONIC_API_VERSION): # pragma: no cover
|
||||
"""Get Ironic client instance."""
|
||||
# NOTE: To support standalone ironic without keystone
|
||||
if CONF.ironic.auth_strategy == 'noauth':
|
||||
@ -85,6 +89,7 @@ def get_client(token=None): # pragma: no cover
|
||||
endpoint_type=CONF.ironic.os_endpoint_type)
|
||||
args = {'os_auth_token': token,
|
||||
'ironic_url': ironic_url}
|
||||
args['os_ironic_api_version'] = api_version
|
||||
return client.get_client(1, **args)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user