Apply Octavia hacking checks to the tempest plugin

Currently we are not applying the custom hacking checks we use in
Octavia to the octavia-tempest-plugin. This leads to style issues
sneaking into the plugin.
This patch copies the same checks from Octavia (for simpler
management) into octavia-tempest-plugin and resolves some of the
existing style violations.

Change-Id: Ic103d8bededfec77ec0034d7c167ac1e49954a5c
diff --git a/tox.ini b/tox.ini
index 4a61222..a419c62 100644
--- a/tox.ini
+++ b/tox.ini
@@ -43,6 +43,7 @@
 deps =
     -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
     -r{toxinidir}/requirements.txt
+    -r{toxinidir}/test-requirements.txt
     -r{toxinidir}/doc/requirements.txt
 whitelist_externals = rm
 commands =
@@ -85,6 +86,24 @@
 # [H904]: Delay string interpolations at logging calls
 enable-extensions=H106,H203,H204,H205,H904
 
+[flake8:local-plugins]
+extension =
+  O316 = checks:assert_true_instance
+  O318 = checks:assert_equal_or_not_none
+  O323 = checks:assert_equal_true_or_false
+  O324 = checks:no_mutable_default_args
+  O338 = checks:assert_equal_in
+  O339 = checks:no_log_warn
+  O341 = checks:no_translate_logs
+  O342 = checks:check_raised_localized_exceptions
+  O345 = checks:check_no_eventlet_imports
+  O346 = checks:check_line_continuation_no_backslash
+  O347 = checks:revert_must_have_kwargs
+  O348 = checks:check_no_logging_imports
+  O349 = checks:check_no_import_mock
+paths =
+  ./octavia_tempest_plugin/hacking
+
 [testenv:genconfig]
 basepython = python3
 whitelist_externals = mkdir