Merge "Split tests out to speed it up a bit" into mcp/caracal
diff --git a/octavia_tempest_plugin/config.py b/octavia_tempest_plugin/config.py
index 0587a5c..58ddf13 100644
--- a/octavia_tempest_plugin/config.py
+++ b/octavia_tempest_plugin/config.py
@@ -15,7 +15,6 @@
 
 from oslo_config import cfg
 from oslo_log import log as logging
-from tempest import config
 
 from octavia_tempest_plugin.common import constants as const
 
@@ -311,12 +310,3 @@
                      'scope? This configuration value should be same as '
                      'octavia.conf: [oslo_policy].enforce_scope option.'),
 ]
-
-
-def is_tungstenfabric_backend_enabled():
-    """Return True if TungstenFabric is used as a backend."""
-    try:
-        sdn = getattr(config.CONF, 'sdn')
-        return getattr(sdn, 'service_name', None) == 'tungstenfabric'
-    except cfg.NoSuchOptError:
-        return False
diff --git a/octavia_tempest_plugin/services/load_balancer/v2/base_client.py b/octavia_tempest_plugin/services/load_balancer/v2/base_client.py
index 5e2298c..ce3aa55 100644
--- a/octavia_tempest_plugin/services/load_balancer/v2/base_client.py
+++ b/octavia_tempest_plugin/services/load_balancer/v2/base_client.py
@@ -60,7 +60,8 @@
         retry=tenacity.retry_if_exception_type(exceptions.Conflict),
         wait=tenacity.wait_incrementing(
             const.RETRY_INITIAL_DELAY, const.RETRY_BACKOFF, const.RETRY_MAX),
-        stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS))
+        stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS),
+        reraise=True)
     def _create_object(self, parent_id=None, return_object_only=True,
                        **kwargs):
         """Create an object.
@@ -221,7 +222,8 @@
         retry=tenacity.retry_if_exception_type(exceptions.Conflict),
         wait=tenacity.wait_incrementing(
             const.RETRY_INITIAL_DELAY, const.RETRY_BACKOFF, const.RETRY_MAX),
-        stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS))
+        stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS),
+        reraise=True)
     def _update_object(self, obj_id, parent_id=None, return_object_only=True,
                        **kwargs):
         """Update an object.
@@ -279,7 +281,8 @@
         retry=tenacity.retry_if_exception_type(exceptions.Conflict),
         wait=tenacity.wait_incrementing(
             const.RETRY_INITIAL_DELAY, const.RETRY_BACKOFF, const.RETRY_MAX),
-        stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS))
+        stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS),
+        reraise=True)
     def _delete_obj(self, obj_id, parent_id=None, ignore_errors=False,
                     cascade=False):
         """Delete an object.
diff --git a/octavia_tempest_plugin/tests/test_base.py b/octavia_tempest_plugin/tests/test_base.py
index e758be3..55e4d1b 100644
--- a/octavia_tempest_plugin/tests/test_base.py
+++ b/octavia_tempest_plugin/tests/test_base.py
@@ -34,7 +34,6 @@
 
 from octavia_tempest_plugin.common import cert_utils
 from octavia_tempest_plugin.common import constants as const
-from octavia_tempest_plugin import config as config_octavia
 from octavia_tempest_plugin.tests import RBAC_tests
 from octavia_tempest_plugin.tests import validators
 from octavia_tempest_plugin.tests import waiters
@@ -875,7 +874,7 @@
             cls.webserver2_public_ip))
 
         if (CONF.load_balancer.test_with_ipv6 and not
-                config_octavia.is_tungstenfabric_backend_enabled()):
+                config.is_tungstenfabric_backend_enabled()):
             # Enable the IPv6 nic in webserver 1
             cls._enable_ipv6_nic_webserver(
                 cls.webserver1_public_ip, cls.lb_member_keypair['private_key'],
@@ -1055,7 +1054,7 @@
                 network_id=network['id'],
                 mac_address=instance_network[0]['OS-EXT-IPS-MAC:mac_addr'])
             port_id = result['ports'][0]['id']
-            if config_octavia.is_tungstenfabric_backend_enabled():
+            if config.is_tungstenfabric_backend_enabled():
                 port = result['ports'][0]
                 fixed_ip = None
                 for ip in port["fixed_ips"]: