Rework the ironic-inspector auto-discovery test
Currently this test relies on changing the driver in introspection rules.
This is quite fragile, since for hardware types changing the driver may
involve changing some or all of the interface fields. It's also absolutely
unnecessary to verify the functioning of the discovery process.
This change removes it.
Instead, the change starts verifying the "auto_discovered" flag in
the introspection data, as well as uses introspection rules to verify
it indirectly.
Finally, the discovery driver is checked. The expected value is provided
by the new configuration option auto_discovery_default_driver.
Change-Id: Ia0e95cbc1bb4dbd32793705b876ab8b474b753ad
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index f9fefc4..e5ba81e 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -168,4 +168,10 @@
help="Is the auto-discovery feature enabled. Enroll hook "
"should be specified in node_not_found_hook - processing "
"section of inspector.conf"),
+ cfg.StrOpt('auto_discovery_default_driver',
+ # TODO(dtantsur): change to fake-hardware when Queens is no
+ # longer supported.
+ default='fake',
+ help="The driver expected to be set on newly discovered nodes. "
+ "Only has effect with auto_discovery_feature is True."),
]