Allow to pass default interface values to tempest

In case any of those are set in ironic, test that resets interfaces
might fail.

Closes-issue: https://mirantis.jira.com/browse/PRODX-9563
Change-Id: I6f07e25644a92ccac169f84f7c79696d21b58e76
(cherry picked from commit 675c7c0109c8d83f1d8de9b3d28b0e93dd900595)
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index 95b29b3..f1f7053 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -18,6 +18,10 @@
 from tempest import config  # noqa
 
 
+_DEFAULT_IFACE_HELP = ('Default {0} interface to be used for nodes that '
+                       'do not have {0}_interface field set.')
+
+
 ironic_service_option = cfg.BoolOpt('ironic',
                                     default=False,
                                     help='Whether or not ironic is expected '
@@ -134,8 +138,30 @@
     cfg.ListOpt('enabled_raid_interfaces',
                 default=['no-raid', 'agent'],
                 help="List of Ironic enabled RAID interfaces."),
+    cfg.StrOpt('default_bios_interface',
+               help=_DEFAULT_IFACE_HELP.format('bios')),
+    cfg.StrOpt('default_boot_interface',
+               help=_DEFAULT_IFACE_HELP.format('boot')),
+    cfg.StrOpt('default_console_interface',
+               help=_DEFAULT_IFACE_HELP.format('console')),
+    cfg.StrOpt('default_deploy_interface',
+               help=_DEFAULT_IFACE_HELP.format('deploy')),
+    cfg.StrOpt('default_inspect_interface',
+               help=_DEFAULT_IFACE_HELP.format('inspect')),
+    cfg.StrOpt('default_management_interface',
+               help=_DEFAULT_IFACE_HELP.format('management')),
+    cfg.StrOpt('default_network_interface',
+               help=_DEFAULT_IFACE_HELP.format('network')),
+    cfg.StrOpt('default_power_interface',
+               help=_DEFAULT_IFACE_HELP.format('power')),
+    cfg.StrOpt('default_raid_interface',
+               help=_DEFAULT_IFACE_HELP.format('raid')),
     cfg.StrOpt('default_rescue_interface',
-               help="Ironic default rescue interface."),
+               help=_DEFAULT_IFACE_HELP.format('rescue')),
+    cfg.StrOpt('default_storage_interface',
+               help=_DEFAULT_IFACE_HELP.format('storage')),
+    cfg.StrOpt('default_vendor_interface',
+               help=_DEFAULT_IFACE_HELP.format('vendor')),
     cfg.IntOpt('adjusted_root_disk_size_gb',
                min=0,
                help="Ironic adjusted disk size to use in the standalone tests "
diff --git a/ironic_tempest_plugin/tests/api/admin/test_nodes.py b/ironic_tempest_plugin/tests/api/admin/test_nodes.py
index 2709905..66952fa 100644
--- a/ironic_tempest_plugin/tests/api/admin/test_nodes.py
+++ b/ironic_tempest_plugin/tests/api/admin/test_nodes.py
@@ -476,7 +476,10 @@
                                     [{'path': '/%s' % field,
                                       'op': 'remove'}])
             _, node = self.client.show_node(self.node['uuid'])
-            self.assertEqual('fake', node[field])
+            default_iface_option = getattr(
+                CONF.baremetal, 'default_%s_interface' % iface)
+            expected_value = default_iface_option or 'fake'
+            self.assertEqual(expected_value, node[field])
 
 
 class TestResetInterfaces(TestHardwareInterfaces):