Fix test_with_ipv6 = False failure

This fixes a failure when running the tempest tests with
test_with_ipv6 = False in the tempest.conf.

Change-Id: Ida2f4bfe04654c1652e673ad056db12ee0c5ace8
Story: 2003465
Task: 24725
diff --git a/octavia_tempest_plugin/tests/test_base.py b/octavia_tempest_plugin/tests/test_base.py
index c30932c..c70c2f1 100644
--- a/octavia_tempest_plugin/tests/test_base.py
+++ b/octavia_tempest_plugin/tests/test_base.py
@@ -191,15 +191,16 @@
         if cls.lb_member_2_subnet:
             LOG.debug('Octavia Setup: lb_member_2_subnet = {}'.format(
                 cls.lb_member_2_subnet[const.ID]))
-        if cls.lb_member_vip_ipv6_subnet:
-            LOG.debug('Octavia Setup: lb_member_vip_ipv6_subnet = {}'.format(
-                cls.lb_member_vip_ipv6_subnet[const.ID]))
-        if cls.lb_member_1_ipv6_subnet:
-            LOG.debug('Octavia Setup: lb_member_1_ipv6_subnet = {}'.format(
-                cls.lb_member_1_ipv6_subnet[const.ID]))
-        if cls.lb_member_2_ipv6_subnet:
-            LOG.debug('Octavia Setup: lb_member_2_ipv6_subnet = {}'.format(
-                cls.lb_member_2_ipv6_subnet[const.ID]))
+        if CONF.load_balancer.test_with_ipv6:
+            if cls.lb_member_vip_ipv6_subnet:
+                LOG.debug('Octavia Setup: lb_member_vip_ipv6_subnet = '
+                          '{}'.format(cls.lb_member_vip_ipv6_subnet[const.ID]))
+            if cls.lb_member_1_ipv6_subnet:
+                LOG.debug('Octavia Setup: lb_member_1_ipv6_subnet = {}'.format(
+                    cls.lb_member_1_ipv6_subnet[const.ID]))
+            if cls.lb_member_2_ipv6_subnet:
+                LOG.debug('Octavia Setup: lb_member_2_ipv6_subnet = {}'.format(
+                    cls.lb_member_2_ipv6_subnet[const.ID]))
 
     @classmethod
     def _create_networks(cls):