Fix trunk scenario for ovn VTEP

When baremetal network uses vxlan or geneve encapsulation
we can't inherit segmentation_type for trunk.

Related-Prod: PRODX-51827
Change-Id: Ief448dbb4949ad9f4c23dd39feaccb5a249047ca
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index b880e9d..d727aa8 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -292,7 +292,12 @@
     cfg.ListOpt('hybrid_topology_bm_netB_network_types',
                 default=['geneve'],
                 help="List of possible network types for BM hybrid topology "
-                     "netB.")
+                     "netB."),
+    cfg.ListOpt('tenant_network_types',
+                default=['vlan'],
+                help="List of possible network types that we can use for BM "
+                     "servers. First network type is default."),
+
 ]
 
 BaremetalFeaturesGroup = [
diff --git a/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py b/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py
index b347431..065a6a6 100644
--- a/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py
+++ b/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py
@@ -222,6 +222,8 @@
             msg = 'Trunks with baremetal are not supported.'
             raise self.skipException(msg)
 
+        default_network_type = CONF.baremetal.tenant_network_types[0]
+
         tenant_a_cidr = '10.0.100.0/24'
         tenant_b_cidr = '10.0.101.0/24'
 
@@ -234,7 +236,13 @@
 
         parent_port = self.create_port(network_id=networkA["id"])
         subport = self.create_port(network_id=networkB["id"])
-        subports = [{'port_id': subport['id'], 'segmentation_type': 'inherit'}]
+        if default_network_type == "vlan":
+            subports = [{'port_id': subport['id'],
+                         'segmentation_type': 'inherit'}]
+        else:
+            subports = [{'port_id': subport['id'],
+                         'segmentation_type': 'vlan',
+                         'segmentation_id': 10}]
         trunk = self.os_primary.trunks_client.create_trunk(
             name="test-trunk", port_id=parent_port['id'],
             sub_ports=subports)['trunk']