Merge "Use the same ssl module httpx uses" into mcp/caracal
diff --git a/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby.py b/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby.py
index 11b0cec..eab5e3f 100644
--- a/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby.py
+++ b/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby.py
@@ -31,6 +31,8 @@
 LOG = logging.getLogger(__name__)
 
 
+@testtools.skipIf(CONF.load_balancer.provider == 'tungstenfabric',
+                  "Not supported by TungstenFabric")
 @testtools.skipUnless(
     CONF.validation.run_validation,
     'Active-Standby tests will not work without run_validation enabled.')
@@ -61,6 +63,16 @@
             cls.mem_lb_client.cleanup_loadbalancer,
             cls.lb_id)
 
+        # (gzimin): Add additional waiter in case of TungstenFabric
+        # because for correct assignment of Floating IP for loadbalancer
+        # we need to wait for amphora port
+        if config.is_tungstenfabric_backend_enabled():
+            waiters.wait_for_status(cls.mem_lb_client.show_loadbalancer,
+                                    cls.lb_id, const.PROVISIONING_STATUS,
+                                    const.ACTIVE,
+                                    CONF.load_balancer.lb_build_interval,
+                                    CONF.load_balancer.lb_build_timeout)
+
         if CONF.validation.connect_method == 'floating':
             port_id = lb[const.VIP_PORT_ID]
             result = cls.lb_mem_float_ip_client.create_floatingip(
diff --git a/octavia_tempest_plugin/tests/api/v2/test_listener.py b/octavia_tempest_plugin/tests/api/v2/test_listener.py
index b60fb20..973e641 100644
--- a/octavia_tempest_plugin/tests/api/v2/test_listener.py
+++ b/octavia_tempest_plugin/tests/api/v2/test_listener.py
@@ -82,6 +82,8 @@
     def test_tcp_listener_create(self):
         self._test_listener_create(const.TCP, 8002)
 
+    @testtools.skipIf(CONF.load_balancer.provider == 'tungstenfabric',
+                      "Not supported by TungstenFabric")
     @decorators.idempotent_id('1a6ba0d0-f309-4088-a686-dda0e9ab7e43')
     @testtools.skipUnless(
         CONF.loadbalancer_feature_enabled.prometheus_listener_enabled,
@@ -449,6 +451,8 @@
     def test_https_listener_list(self):
         self._test_listener_list(const.HTTPS, 8030)
 
+    @testtools.skipIf(CONF.load_balancer.provider == 'tungstenfabric',
+                      "Not supported by TungstenFabric")
     @decorators.idempotent_id('5473e071-8277-4ac5-9277-01ecaf46e274')
     @testtools.skipUnless(
         CONF.loadbalancer_feature_enabled.prometheus_listener_enabled,
@@ -827,6 +831,8 @@
     def test_https_listener_show(self):
         self._test_listener_show(const.HTTPS, 8051)
 
+    @testtools.skipIf(CONF.load_balancer.provider == 'tungstenfabric',
+                      "Not supported by TungstenFabric")
     @decorators.idempotent_id('b851b754-4333-4115-9063-a9fce44c2e46')
     @testtools.skipUnless(
         CONF.loadbalancer_feature_enabled.prometheus_listener_enabled,
@@ -997,6 +1003,8 @@
     def test_https_listener_update(self):
         self._test_listener_update(const.HTTPS, 8061)
 
+    @testtools.skipIf(CONF.load_balancer.provider == 'tungstenfabric',
+                      "Not supported by TungstenFabric")
     @decorators.idempotent_id('cbba6bf8-9184-4da5-95e9-5efe1f89ddf0')
     @testtools.skipUnless(
         CONF.loadbalancer_feature_enabled.prometheus_listener_enabled,
@@ -1266,6 +1274,8 @@
     def test_https_listener_delete(self):
         self._test_listener_delete(const.HTTPS, 8071)
 
+    @testtools.skipIf(CONF.load_balancer.provider == 'tungstenfabric',
+                      "Not supported by TungstenFabric")
     @decorators.idempotent_id('322a6372-6b56-4a3c-87e3-dd82074bc83e')
     @testtools.skipUnless(
         CONF.loadbalancer_feature_enabled.prometheus_listener_enabled,
diff --git a/octavia_tempest_plugin/tests/barbican_scenario/v2/test_tls_barbican.py b/octavia_tempest_plugin/tests/barbican_scenario/v2/test_tls_barbican.py
index 9378a86..325670d 100644
--- a/octavia_tempest_plugin/tests/barbican_scenario/v2/test_tls_barbican.py
+++ b/octavia_tempest_plugin/tests/barbican_scenario/v2/test_tls_barbican.py
@@ -874,6 +874,14 @@
                                 CONF.load_balancer.build_interval,
                                 CONF.load_balancer.build_timeout)
 
+        if not CONF.load_balancer.test_with_noop:
+            waiters.wait_for_status(
+                self.mem_listener_client.show_listener,
+                self.listener_id, const.OPERATING_STATUS,
+                const.ONLINE,
+                CONF.load_balancer.build_interval,
+                CONF.load_balancer.build_timeout)
+
         # Test that no client certificate connects
         response = requests.get(
             'https://{0}:{1}'.format(self.lb_vip_address, LISTENER1_TCP_PORT),
@@ -979,6 +987,14 @@
                                 CONF.load_balancer.build_interval,
                                 CONF.load_balancer.build_timeout)
 
+        if not CONF.load_balancer.test_with_noop:
+            waiters.wait_for_status(
+                self.mem_listener_client.show_listener,
+                self.listener_id, const.OPERATING_STATUS,
+                const.ONLINE,
+                CONF.load_balancer.build_interval,
+                CONF.load_balancer.build_timeout)
+
         LISTENER2_TCP_PORT = '8443'
         listener_name = data_utils.rand_name(
             "lb_member_listener2-multi-list-client-auth")
@@ -1005,7 +1021,13 @@
                                 const.ACTIVE,
                                 CONF.load_balancer.build_interval,
                                 CONF.load_balancer.build_timeout)
-
+        if not CONF.load_balancer.test_with_noop:
+            waiters.wait_for_status(
+                self.mem_listener_client.show_listener,
+                self.listener2_id, const.OPERATING_STATUS,
+                const.ONLINE,
+                CONF.load_balancer.build_interval,
+                CONF.load_balancer.build_timeout)
         # Test that no client certificate fails to connect to listener1
         self.assertRaises(
             requests.exceptions.SSLError,
diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py b/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py
index a704b88..9452b26 100644
--- a/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py
+++ b/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py
@@ -1568,6 +1568,8 @@
                     CONF.load_balancer.check_timeout,
                     error_ok=True, pool_id=pool_id)
 
+    @testtools.skipIf(CONF.load_balancer.provider == 'tungstenfabric',
+                      "Not supported by TungstenFabric")
     @decorators.idempotent_id('05e99fb3-2b37-478e-889b-77f1c731a471')
     @testtools.skipUnless(
         CONF.loadbalancer_feature_enabled.prometheus_listener_enabled,