dovetail tool: use python new-style classes which inherit from object 73/27273/2
authorxudan <xudan16@huawei.com>
Fri, 20 Jan 2017 06:46:57 +0000 (06:46 +0000)
committerxudan <xudan16@huawei.com>
Fri, 20 Jan 2017 06:49:28 +0000 (06:49 +0000)
JIRA: DOVETAIL-187

Change-Id: Id6fa50a3a3cec7a18d27ca8feb383b53836a339b
Signed-off-by: xudan <xudan16@huawei.com>
dovetail/cli/commands/cli_testcase.py
dovetail/container.py
dovetail/parser.py
dovetail/report.py
dovetail/testcase.py
dovetail/utils/dovetail_config.py
dovetail/utils/dovetail_logger.py

index b1c38fd..a498d49 100644 (file)
@@ -17,7 +17,7 @@ from dovetail.utils.dovetail_config import DovetailConfig as dt_cfg
 from dovetail.testcase import Testsuite
 
 
-class CliTestcase:
+class CliTestcase(object):
 
     @classmethod
     def testsuite_load(cls):
index b46ae88..3c2c294 100644 (file)
@@ -14,7 +14,7 @@ import utils.dovetail_utils as dt_utils
 from utils.dovetail_config import DovetailConfig as dt_cfg
 
 
-class Container:
+class Container(object):
 
     container_list = {}
     has_pull_latest_image = {'yardstick': False, 'functest': False}
index 95130cd..fdde4f9 100644 (file)
@@ -15,7 +15,7 @@ import utils.dovetail_utils as dt_utils
 from utils.dovetail_config import DovetailConfig as dt_cfg
 
 
-class Parser:
+class Parser(object):
     """preprocess configuration files"""
 
     logger = None
index 91a4ebd..11e3c24 100644 (file)
@@ -30,7 +30,7 @@ def get_pass_str(passed):
         return 'FAIL'
 
 
-class Report:
+class Report(object):
 
     results = {'functest': {}, 'yardstick': {}, 'shell': {}}
 
@@ -190,7 +190,7 @@ class Report:
         return result
 
 
-class FunctestCrawler:
+class FunctestCrawler(object):
 
     logger = None
 
@@ -261,7 +261,7 @@ class FunctestCrawler:
             return None
 
 
-class YardstickCrawler:
+class YardstickCrawler(object):
 
     logger = None
 
@@ -305,7 +305,7 @@ class YardstickCrawler:
         return None
 
 
-class ShellCrawler:
+class ShellCrawler(object):
 
     def __init__(self):
         self.type = 'shell'
@@ -326,7 +326,7 @@ class ShellCrawler:
             return None
 
 
-class CrawlerFactory:
+class CrawlerFactory(object):
 
     CRAWLER_MAP = {'functest': FunctestCrawler,
                    'yardstick': YardstickCrawler,
@@ -340,14 +340,14 @@ class CrawlerFactory:
             return None
 
 
-class ResultChecker:
+class ResultChecker(object):
 
     @staticmethod
     def check():
         return 'PASS'
 
 
-class FunctestChecker:
+class FunctestChecker(object):
 
     logger = None
 
@@ -387,7 +387,7 @@ class FunctestChecker:
         testcase.passed(all_passed)
 
 
-class YardstickChecker:
+class YardstickChecker(object):
 
     logger = None
 
@@ -405,7 +405,7 @@ class YardstickChecker:
         return
 
 
-class ShellChecker:
+class ShellChecker(object):
 
     @staticmethod
     def check(testcase, result):
@@ -415,7 +415,7 @@ class ShellChecker:
             testcase.passed(False)
 
 
-class CheckerFactory:
+class CheckerFactory(object):
 
     CHECKER_MAP = {'functest': FunctestChecker,
                    'yardstick': YardstickChecker,
index ed7b832..5ca23c4 100644 (file)
@@ -249,7 +249,7 @@ class TestcaseFactory(object):
             return None
 
 
-class Testsuite:
+class Testsuite(object):
 
     logger = None
 
index 7d2c164..1efb4d8 100644 (file)
@@ -12,7 +12,7 @@ import os
 import re
 
 
-class DovetailConfig:
+class DovetailConfig(object):
 
     dovetail_config = {}
 
index 0fe4103..feb7aef 100644 (file)
@@ -28,7 +28,7 @@ import sys
 from dovetail_config import DovetailConfig as dt_cfg
 
 
-class Logger:
+class Logger(object):
     def __init__(self, logger_name):
 
         DEBUG = os.getenv('DEBUG')