Use python abc in StressAction class
Fix pylint error about NotImplemented raised instead of
NotImplementedError.
Use the abc class instead of NotImplementedError.
Partial-Bug: #1346797
Change-Id: Ia9a75a53f68c28594654a07146a2a30c1ae3c412
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
diff --git a/tempest/stress/stressaction.py b/tempest/stress/stressaction.py
index f6770ab..286e022 100644
--- a/tempest/stress/stressaction.py
+++ b/tempest/stress/stressaction.py
@@ -12,12 +12,16 @@
# License for the specific language governing permissions and limitations
# under the License.
+import abc
import signal
import sys
+import six
+
from tempest.openstack.common import log as logging
+@six.add_metaclass(abc.ABCMeta)
class StressAction(object):
def __init__(self, manager, max_runs=None, stop_on_error=False):
@@ -83,6 +87,7 @@
self.tearDown()
sys.exit(1)
+ @abc.abstractmethod
def run(self):
"""This method is where the stress test code runs."""
- raise NotImplemented()
+ return