Browse Source

Change the default discovery driver to fake-hardware

The fake classic driver will be removed this release.

Depends-On: Ia0e95cbc1bb4dbd32793705b876ab8b474b753ad
Change-Id: I85f2a2a3ed1ca689c639c60e86853c821e808105
changes/64/550464/4
Dmitry Tantsur 4 years ago committed by Ruby Loo
parent
commit
66f318b339
  1. 1
      devstack/plugin.sh
  2. 6
      doc/source/user/usage.rst
  3. 2
      ironic_inspector/conf/discovery.py
  4. 5
      ironic_inspector/test/unit/test_plugins_discovery.py
  5. 6
      releasenotes/notes/discovery-default-driver-94f990bb0676369b.yaml

1
devstack/plugin.sh

@ -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

6
doc/source/user/usage.rst

@ -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,

2
ironic_inspector/conf/discovery.py

@ -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.')),
]

5
ironic_inspector/test/unit/test_plugins_discovery.py

@ -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)

6
releasenotes/notes/discovery-default-driver-94f990bb0676369b.yaml

@ -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.
Loading…
Cancel
Save