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>
This commit is contained in:
parent
4f44d72d9c
commit
fd247f5922
|
@ -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 @@ class StressAction(object):
|
|||
self.tearDown()
|
||||
sys.exit(1)
|
||||
|
||||
@abc.abstractmethod
|
||||
def run(self):
|
||||
"""This method is where the stress test code runs."""
|
||||
raise NotImplemented()
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue