Change the default discovery driver to fake-hardware

The fake classic driver will be removed this release.

Depends-On: Ia0e95cbc1bb4dbd32793705b876ab8b474b753ad
Change-Id: I85f2a2a3ed1ca689c639c60e86853c821e808105
This commit is contained in:
Dmitry Tantsur 2018-03-07 13:24:42 +01:00 committed by Ruby Loo
parent 1fc3bfa6d2
commit 66f318b339
5 changed files with 14 additions and 6 deletions

View File

@ -440,6 +440,7 @@ elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
iniset $TEMPEST_CONFIG service_available ironic_inspector True
if [ -n "$IRONIC_INSPECTOR_NODE_NOT_FOUND_HOOK" ]; then
iniset $TEMPEST_CONFIG baremetal_introspection auto_discovery_feature True
iniset $TEMPEST_CONFIG baremetal_introspection auto_discovery_default_driver fake-hardware
fi
fi
fi

View File

@ -219,9 +219,9 @@ Ironic first.
For discovery, the configuration file option ``node_not_found_hook`` should be
set to load the hook called ``enroll``. This hook will enroll the unidentified
node into Ironic using the ``fake`` driver (this driver is a configurable
option, set ``enroll_node_driver`` in the **ironic-inspector** configuration
file, to the Ironic driver you want).
node into Ironic using the ``fake-hardware`` hardware type. (This is
a configurable option; set ``enroll_node_driver``, in the **ironic-inspector**
configuration file, to the Ironic hardware type or classic driver you want.)
The ``enroll`` hook will also set the ``ipmi_address`` property on the new
node, if its available in the introspection data we received,

View File

@ -18,7 +18,7 @@ from ironic_inspector.common.i18n import _
_OPTS = [
cfg.StrOpt('enroll_node_driver',
default='fake',
default='fake-hardware',
help=_('The name of the Ironic driver used by the enroll '
'hook when creating a new node in Ironic.')),
]

View File

@ -48,7 +48,8 @@ class TestEnrollNodeNotFoundHook(test_base.NodeTest):
discovery.enroll_node_not_found_hook(introspection_data)
mock_create_node.assert_called_once_with('fake', ironic=self.ironic,
mock_create_node.assert_called_once_with('fake-hardware',
ironic=self.ironic,
driver_info={})
mock_check_existing.assert_called_once_with(
introspection_data, {}, self.ironic)
@ -66,7 +67,7 @@ class TestEnrollNodeNotFoundHook(test_base.NodeTest):
discovery.enroll_node_not_found_hook(introspection_data)
mock_create_node.assert_called_once_with(
'fake', ironic=self.ironic,
'fake-hardware', ironic=self.ironic,
driver_info={'ipmi_address': '1.2.3.4'})
mock_check_existing.assert_called_once_with(
expected_data, {'ipmi_address': '1.2.3.4'}, self.ironic)

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The ``[discovery]enroll_node_driver`` option, specifying the hardware type
or driver to use for newly discovered nodes, was changed from ``fake``
classic driver to ``fake-hardware`` hardware type.