Update hacking for Python3

The repo is Python 3 now, so update hacking to version 3.0.1 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Switch to dnspython in requirements.
See also https://review.opendev.org/726353.

Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Depends-On: https://review.opendev.org/715682
Change-Id: I49a0ba49133f9592089d3829405847bf2ff8b425
diff --git a/tox.ini b/tox.ini
index 6211c66..b7f3098 100644
--- a/tox.ini
+++ b/tox.ini
@@ -79,11 +79,21 @@
 # H904 Wrap long lines in parentheses instead of a backslash
 # E126 continuation line over-indented for hanging indent
 # E128 continuation line under-indented for visual indent
-
-ignore = H302,H306,H402,H404,H405,H904,E126,E128
+# W504 line break after binary operator
+ignore = H302,H306,H402,H404,H405,H904,E126,E128,W504
 exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools,.ropeproject
 
-
-[hacking]
-local-check-factory = designate_tempest_plugin.hacking.checks.factory
-
+[flake8:local-plugins]
+extension =
+  T102 = tempest.hacking.checks:import_no_clients_in_api_and_scenario_tests
+  T104 = tempest.hacking.checks:scenario_tests_need_service_tags
+  T105 = tempest.hacking.checks:no_setup_teardown_class_for_tests
+  T107 = tempest.hacking.checks:service_tags_not_in_module_path
+  T108 = tempest.hacking.checks:no_hyphen_at_end_of_rand_name
+  N322 = tempest.hacking.checks:no_mutable_default_args
+  T109 = tempest.hacking.checks:no_testtools_skip_decorator
+  T110 = tempest.hacking.checks:get_resources_on_service_clients
+  T111 = tempest.hacking.checks:delete_resources_on_service_clients
+  T112 = tempest.hacking.checks:dont_import_local_tempest_into_lib
+  T113 = tempest.hacking.checks:dont_use_config_in_tempest_lib
+  T114 = tempest.hacking.checks:use_rand_uuid_instead_of_uuid4