Use the same ssl module httpx uses

Depending on what other tempest plugins are installed
the eventlet might've been imported by the time we instantiate
a httpx.Client as part of the test.
Since dnspython 2.2.0, importing eventlet or any part of it effectively
instantiates a dummy httpx.Client instance too, thus pinning the ssl
implementation in httpx to the eventlet's one.
This leads to error in the Client() call of the test, as the ssl lib in
the test module is different from ssl lib in httpx._config,
which fails isinstance check for ssl.SSLContext.

Use the ssl module that is actually currently used by httpx to instantiate
the SSL context to be used with httpx.Client.

Story: 2010902
Task: 48716
Change-Id: I72d80a9981c465723b7fa9aad426118e243b7129
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 0c23cd7..504be0a 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
@@ -1232,7 +1232,18 @@
                                 const.ACTIVE,
                                 CONF.load_balancer.build_interval,
                                 CONF.load_balancer.build_timeout)
-
+        # TODO(johnsom) - Remove this once eventlet is removed from OpenStack
+        # NOTE(pas-ha): depending on what other tempest plugins are installed
+        # the eventlet might've been imported by that time, and, since
+        # dnspython 2.2.0, importing eventlet or any part of it effectively
+        # instantiates a dummy httpx.Client instance, thus pinning the ssl
+        # implementation in httpx to the eventlet's one.
+        # This leads to error in the Client() call below, as the ssl lib in
+        # this module is different from ssl lib in httpx._config,
+        # which fails isinstance check for ssl.SSLContext.
+        # Use the ssl module that is actually used by httpx to instantiate
+        # the SSL context to be used with httpx.
+        ssl = httpx._config.ssl
         context = ssl.create_default_context(cadata=self.ca_cert.public_bytes(
             serialization.Encoding.PEM).decode('utf-8'))
         context.check_hostname = False