From 435328e54f1da43f75b53f5c3a2c33f6a22bdb85 Mon Sep 17 00:00:00 2001
From: "John L. Villalovos" <john.l.villalovos@intel.com>
Date: Tue, 19 Dec 2017 09:24:23 -0800
Subject: [PATCH] Prevent changes to the ironic_tempest_plugin/ directory

Add a check to the PEP8 test to prevent changes to the
ironic_tempest_plugin/ directory.

This will be removed when we remove the ironic_tempest_plugin/
directory.

Change-Id: I3cdbb39ebc661652ff9ceba5f3115ac26667953b
---
 tools/flake8wrap.sh                   | 18 +++++++++++++
 tools/ironic_tempest_plugin.SHA256SUM | 38 +++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 tools/ironic_tempest_plugin.SHA256SUM

diff --git a/tools/flake8wrap.sh b/tools/flake8wrap.sh
index 531b407d6a..bcd47b22dd 100755
--- a/tools/flake8wrap.sh
+++ b/tools/flake8wrap.sh
@@ -9,6 +9,24 @@
 #   tox -epep8 -- -HEAD
 #
 
+TEMP_SHA_FILE="plugin.$$.SHA256SUM"
+find ironic_tempest_plugin/ -type f | xargs sha256sum | sort > ${TEMP_SHA_FILE}
+if ! diff -q ${TEMP_SHA_FILE} tools/ironic_tempest_plugin.SHA256SUM;
+then
+    rm ${TEMP_SHA_FILE}
+    echo ""
+    echo "*******************************************************"
+    echo "ERROR: Detected changes made to the ironic_tempest_plugin/ directory"
+    echo "ERROR: Changes to the ironic_tempest_plugin/ are not allowed as"
+    echo "ERROR: we no longer use that content and it will be removed"
+    echo "ERROR: Please add changes to the tempest tests in the repository:"
+    echo "ERROR:    openstack/ironic-tempest-plugin"
+    echo "*******************************************************"
+    echo ""
+    exit 1
+fi
+rm ${TEMP_SHA_FILE}
+
 if test "x$1" = "x-HEAD" ; then
     shift
     files=$(git diff --name-only HEAD~1 | tr '\n' ' ')
diff --git a/tools/ironic_tempest_plugin.SHA256SUM b/tools/ironic_tempest_plugin.SHA256SUM
new file mode 100644
index 0000000000..3dc646db51
--- /dev/null
+++ b/tools/ironic_tempest_plugin.SHA256SUM
@@ -0,0 +1,38 @@
+0ab102bcc2208285e9390ba5582648eb90be9a78e46ca847832caa7364a4b71d  ironic_tempest_plugin/tests/api/admin/test_ports.py
+0e298a785d0d76cfc0bd35460e9cf20e68d06275f4af4e6cc534c86b0c77bfba  ironic_tempest_plugin/tests/scenario/test_baremetal_basic_ops.py
+1217c75e72b8d2ed84f1f34ca9886032bbf0923d21a9930b4f8ea7520723b0ae  ironic_tempest_plugin/tests/api/admin/test_portgroups.py
+20c648134441fd39a72a24b011b012f0e58057560ff713eb261eebfa9a8f402c  ironic_tempest_plugin/README.rst
+3226a0449cae731d9706c6d036e1cc4d189d52ab854e0a5f7321122deba87c67  ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py
+41d9589c33d784c7d0b1c094f8052ce742a32fd5c6c1ecbfd45c23a42277fcf5  ironic_tempest_plugin/tests/api/admin/test_chassis.py
+49446e3dfe214cdecec7121fe0d8a4f83a1db9c5b1dc6cd370427fff19bac072  ironic_tempest_plugin/tests/scenario/baremetal_manager.py
+5ef9ed14ee2bdd1e0c94f35f2e7b9daf633ac4ca347f008fac224db245a20697  ironic_tempest_plugin/services/baremetal/base.py
+727c722b1012c006226904456a96ac891e23be2ecbd9f301c4dfb7cf4b2412d6  ironic_tempest_plugin/clients.py
+79fc7402060de6bdbb198148314bcdead6bae6350ccdee6407acb88b72990eff  ironic_tempest_plugin/common/utils.py
+891e10aac2728237718f9116d721ef61cb5c8ffa431fa3d2da55e125934e8c25  ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py
+9836f4687f371942db76d987b3c9e6aa7cf72b98e040ac7f7844133f6ac371f1  ironic_tempest_plugin/tests/api/admin/api_microversion_fixture.py
+9b82de2d28ca5cf76d03bcf2c6ff72898718c4516fa65040cdda63ee7e1482a1  ironic_tempest_plugin/tests/api/admin/test_nodes.py
+9e69376e083d1abcb288aabe35e8d8903c1afa47796c65357fd193e681c30743  ironic_tempest_plugin/manager.py
+ac50364f648c8b4d581c428aa65ef530f4382f07cb2c01a87589234a8373c5a3  ironic_tempest_plugin/tests/api/admin/test_volume_target.py
+b5f2aed1f89b4c716d4b3915a388ccf3ed9c0eb72be20ec5b8857259e9db8664  ironic_tempest_plugin/common/waiters.py
+bc899847544846a0413c25cc6656c7bdec7d1a772b4681f8bb09d3e71bdae61a  ironic_tempest_plugin/config.py
+bdcf5b98ee3c63d5d54bd824e650be19b5b991ba54ce60dc951a942c44f9fcd8  ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+c396d4d00f4d3078cbf5f89c06ac5db107d82f1fa5bae00da5bff5e3ddd56cb5  ironic_tempest_plugin/tests/api/admin/base.py
+ccb280293b155925fec767a8e3c9add917f9e14a5fccd73dde2fe57ce62ce367  ironic_tempest_plugin/tests/scenario/test_baremetal_boot_from_volume.py
+d7390c03610c91a71f2b9864a213c2751b9b269c2701982942054fd5f3b0a7cd  ironic_tempest_plugin/tests/api/admin/test_api_discovery.py
+d9543670e0de470f6a2ed2957cd712fcef1bf32006fc07dc4152f546bd5dd175  ironic_tempest_plugin/tests/api/admin/test_ports_negative.py
+db55378fdc5a4a3c00b8901d25ba83e82cd02e8232ae0627ba31f46edc5f5f9c  ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/common/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/services/baremetal/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/services/baremetal/v1/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/services/baremetal/v1/json/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/services/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/tests/api/admin/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/tests/api/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/tests/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/tests/scenario/__init__.py
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  ironic_tempest_plugin/tests/scenario/ironic_standalone/__init__.py
+eb4fddf42a72dce35bfc42a50367708e596ecdc158a14052d1c5f226e13332ed  ironic_tempest_plugin/plugin.py
+f60331afe7291c0068a42589b756ad51ec4941c8c1231b7b657a0a82ade6f958  ironic_tempest_plugin/tests/api/admin/test_drivers.py
+f8ee75c2687ae8b99832201f459ffe5f7b6eac16b50a5713ee224039bd997110  ironic_tempest_plugin/tests/api/admin/test_volume_connector.py
+fdf8369063f1fb2b357012b9d864421be98e3a2c4f52987b240b1980a66cbedc  ironic_tempest_plugin/tests/api/admin/test_nodestates.py