Use same flake8 extensions as Octavia

Enabled the same flake8 extensions as the Octavia tree,
fixing the bugs that they now caught.

Trivialfix

Change-Id: I0fc3f5e3a48dc9dc0286cf9b11847a77573ac411
diff --git a/octavia_tempest_plugin/services/load_balancer/v2/availability_zone_profile_client.py b/octavia_tempest_plugin/services/load_balancer/v2/availability_zone_profile_client.py
index 631162d..1aaab90 100644
--- a/octavia_tempest_plugin/services/load_balancer/v2/availability_zone_profile_client.py
+++ b/octavia_tempest_plugin/services/load_balancer/v2/availability_zone_profile_client.py
@@ -156,8 +156,9 @@
                                   return_object_only=return_object_only)
 
     def update_availability_zone_profile(
-        self, availability_zone_profile_id, name=Unset, provider_name=Unset,
-        availability_zone_data=Unset, return_object_only=True):
+            self, availability_zone_profile_id, name=Unset,
+            provider_name=Unset, availability_zone_data=Unset,
+            return_object_only=True):
         """Update an availability zone profile.
 
         :param availability_zone_profile_id: The availability zone profile ID
diff --git a/octavia_tempest_plugin/services/load_balancer/v2/flavor_profile_client.py b/octavia_tempest_plugin/services/load_balancer/v2/flavor_profile_client.py
index 7f359b2..811cff8 100644
--- a/octavia_tempest_plugin/services/load_balancer/v2/flavor_profile_client.py
+++ b/octavia_tempest_plugin/services/load_balancer/v2/flavor_profile_client.py
@@ -145,8 +145,8 @@
                                   return_object_only=return_object_only)
 
     def update_flavor_profile(
-        self, flavorprofile_id, name=Unset, provider_name=Unset,
-        flavor_data=Unset, return_object_only=True):
+            self, flavorprofile_id, name=Unset, provider_name=Unset,
+            flavor_data=Unset, return_object_only=True):
         """Update a flavor profile.
 
         :param flavorprofile_id: The flavor profile ID to update.
diff --git a/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py b/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py
index 2599bee..83f2d50 100644
--- a/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py
+++ b/octavia_tempest_plugin/tests/act_stdby_scenario/v2/test_active_standby_iptables.py
@@ -34,7 +34,7 @@
     CONF.validation.run_validation,
     'Active-Standby tests will not work without run_validation enabled.')
 class ActiveStandbyIptablesScenarioTest(
-    test_base.LoadBalancerBaseTestWithCompute):
+        test_base.LoadBalancerBaseTestWithCompute):
 
     @classmethod
     def skip_checks(cls):
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 622731a..84bfc20 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
@@ -109,13 +109,13 @@
         # Create a CA self-signed cert and key
         cls.ca_cert, ca_key = cert_utils.generate_ca_cert_and_key()
 
-        LOG.debug('CA Cert: %s' % cls.ca_cert.public_bytes(
+        LOG.debug('CA Cert: %s', cls.ca_cert.public_bytes(
             serialization.Encoding.PEM))
-        LOG.debug('CA private Key: %s' % ca_key.private_bytes(
+        LOG.debug('CA private Key: %s', ca_key.private_bytes(
             encoding=serialization.Encoding.PEM,
             format=serialization.PrivateFormat.TraditionalOpenSSL,
             encryption_algorithm=serialization.NoEncryption()))
-        LOG.debug('CA public Key: %s' % ca_key.public_key().public_bytes(
+        LOG.debug('CA public Key: %s', ca_key.public_key().public_bytes(
             encoding=serialization.Encoding.PEM,
             format=serialization.PublicFormat.SubjectPublicKeyInfo))
 
@@ -127,7 +127,7 @@
         # Create a server cert and key
         # This will be used as the "default certificate" in SNI tests.
         cls.server_uuid = uuidutils.generate_uuid()
-        LOG.debug('Server (default) UUID: %s' % cls.server_uuid)
+        LOG.debug('Server (default) UUID: %s', cls.server_uuid)
 
         server_cert, server_key, cls.server_secret_ref = (
             cls._generate_load_certificate(cls.barbican_mgr, cls.ca_cert,
@@ -135,7 +135,7 @@
 
         # Create the SNI1 cert and key
         cls.SNI1_uuid = uuidutils.generate_uuid()
-        LOG.debug('SNI1 UUID: %s' % cls.SNI1_uuid)
+        LOG.debug('SNI1 UUID: %s', cls.SNI1_uuid)
 
         SNI1_cert, SNI1_key, cls.SNI1_secret_ref = (
             cls._generate_load_certificate(cls.barbican_mgr, cls.ca_cert,
@@ -143,7 +143,7 @@
 
         # Create the SNI2 cert and key
         cls.SNI2_uuid = uuidutils.generate_uuid()
-        LOG.debug('SNI2 UUID: %s' % cls.SNI2_uuid)
+        LOG.debug('SNI2 UUID: %s', cls.SNI2_uuid)
 
         SNI2_cert, SNI2_key, cls.SNI2_secret_ref = (
             cls._generate_load_certificate(cls.barbican_mgr, cls.ca_cert,
diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_ipv6_traffic_ops.py b/octavia_tempest_plugin/tests/scenario/v2/test_ipv6_traffic_ops.py
index a1dc6bb..b37ab57 100644
--- a/octavia_tempest_plugin/tests/scenario/v2/test_ipv6_traffic_ops.py
+++ b/octavia_tempest_plugin/tests/scenario/v2/test_ipv6_traffic_ops.py
@@ -24,7 +24,7 @@
 
 
 class IPv6TrafficOperationsScenarioTest(
-    test_base.LoadBalancerBaseTestWithCompute):
+        test_base.LoadBalancerBaseTestWithCompute):
     """Test traffic operations with an IPv6 VIP."""
 
     @classmethod
diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_pool.py b/octavia_tempest_plugin/tests/scenario/v2/test_pool.py
index 31f0178..5e0622c 100644
--- a/octavia_tempest_plugin/tests/scenario/v2/test_pool.py
+++ b/octavia_tempest_plugin/tests/scenario/v2/test_pool.py
@@ -171,7 +171,7 @@
                 const.LB_ALGORITHM_LEAST_CONNECTIONS
 
         if self.protocol == const.HTTP and (
-            self.lb_feature_enabled.session_persistence_enabled):
+                self.lb_feature_enabled.session_persistence_enabled):
             pool_update_kwargs[const.SESSION_PERSISTENCE] = {
                 const.TYPE: const.SESSION_PERSISTENCE_HTTP_COOKIE}
         pool = self.mem_pool_client.update_pool(
diff --git a/tox.ini b/tox.ini
index 33b941c..4a61222 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,7 @@
 
 [testenv:pep8]
 basepython = python3
-commands = flake8 {posargs}
+commands = flake8
 
 [testenv:venv]
 basepython = python3
@@ -74,12 +74,16 @@
 commands = oslo_debug_helper {posargs}
 
 [flake8]
-# E123, E125 skipped as they are invalid PEP-8.
-
 show-source = True
-ignore = E123,E125
 builtins = _
 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
+import-order-style = pep8
+# [H106]: Don't put vim configuration in source files
+# [H203]: Use assertIs(Not)None to check for None
+# [H204]: Use assert(Not)Equal to check for equality
+# [H205]: Use assert(Greater|Less)(Equal) for comparison
+# [H904]: Delay string interpolations at logging calls
+enable-extensions=H106,H203,H204,H205,H904
 
 [testenv:genconfig]
 basepython = python3