コード例 #1
0
ファイル: marvinPlugin.py プロジェクト: terod/cloudstack
 def startMarvin(self):
     '''
     @Name : startMarvin
     @Desc : Initializes the Marvin
             creates the test Client
             creates the runlogger for logging
             Parses the config and creates a parsedconfig
             Creates a debugstream for tc debug log
     '''
     try:
         obj_marvininit = MarvinInit(self.__configFile, self.__deployDcFlag,
                                     None, self.__zoneForTests,
                                     self.__hypervisorType,
                                     self.__userLogPath)
         if obj_marvininit and obj_marvininit.init() == SUCCESS:
             self.__testClient = obj_marvininit.getTestClient()
             self.__tcRunLogger = obj_marvininit.getLogger()
             self.__parsedConfig = obj_marvininit.getParsedConfig()
             self.__resultStream = obj_marvininit.getResultFile()
             self.__logFolderPath = obj_marvininit.getLogFolderPath()
             self.__testRunner = nose.core.\
                 TextTestRunner(stream=self.__resultStream,
                                descriptions=True,
                                verbosity=2,
                                config=self.conf)
             return SUCCESS
         return FAILED
     except Exception as e:
         print "Exception Occurred under startMarvin: %s" % \
               GetDetailExceptionInfo(e)
         return FAILED
コード例 #2
0
 def startMarvin(self):
     '''
     @Name : startMarvin
     @Desc : Initializes the Marvin
             creates the test Client
             creates the runlogger for logging
             Parses the config and creates a parsedconfig
             Creates a debugstream for tc debug log
     '''
     try:
         obj_marvininit = MarvinInit(self.__configFile,
                                     self.__deployDcFlag,
                                     None,
                                     self.__zoneForTests,
                                     self.__hypervisorType,
                                     self.__userLogPath)
         if obj_marvininit and obj_marvininit.init() == SUCCESS:
             self.__testClient = obj_marvininit.getTestClient()
             self.__tcRunLogger = obj_marvininit.getLogger()
             self.__parsedConfig = obj_marvininit.getParsedConfig()
             self.__resultStream = obj_marvininit.getResultFile()
             self.__logFolderPath = obj_marvininit.getLogFolderPath()
             self.__testRunner = nose.core.\
                 TextTestRunner(stream=self.__resultStream,
                                descriptions=True,
                                verbosity=2,
                                config=self.conf)
             return SUCCESS
         return FAILED
     except Exception as e:
         print "Exception Occurred under startMarvin: %s" % \
               GetDetailExceptionInfo(e)
         return FAILED
コード例 #3
0
ファイル: marvinPlugin.py プロジェクト: vlinhd11/cloudstack
 def startMarvin(self):
     '''
     Initializes the Marvin
     creates the test Client
     creates the runlogger for logging
     Parses the config and creates a parsedconfig
     Creates a debugstream for tc debug log
     '''
     try:
         obj_marvininit = MarvinInit(self.configFile,
                                     self.loadFlag,
                                     self.logFolderPath)
         if obj_marvininit.init() == SUCCESS:
             self.testClient = obj_marvininit.getTestClient()
             self.tcRunLogger = obj_marvininit.getLogger()
             self.parsedConfig = obj_marvininit.getParsedConfig()
             self.debugStream = obj_marvininit.getDebugFile()
             self.testRunner = nose.core.TextTestRunner(stream=
                                                        self.debugStream,
                                                        descriptions=True,
                                                        verbosity=2,
                                                        config=self.conf)
             return SUCCESS
         else:
             return FAILED
     except Exception, e:
         print "Exception Occurred under startMarvin: %s" % str(e)
         return FAILED
コード例 #4
0
    def marvin_init(cls, cfg):
        try:
            obj_marvininit = MarvinInit(config_file=cfg,
                                            hypervisor_type="kvm",
                                            user_logfolder_path="/tmp")
            if obj_marvininit and obj_marvininit.init() == SUCCESS:
                    obj_marvininit.__testClient = obj_marvininit.getTestClient()
                    obj_marvininit.__tcRunLogger = obj_marvininit.getLogger()
                    obj_marvininit.__parsedConfig = obj_marvininit.getParsedConfig()
                    obj_marvininit.__resultStream = obj_marvininit.getResultFile()
                    obj_marvininit.__logFolderPath = obj_marvininit.getLogFolderPath()
        except Exception as e:
            os.killpg(cls.testClass.mvn_proc_grp, signal.SIGTERM)

            time.sleep(30)
            return FAILED
        return obj_marvininit
コード例 #5
0
 def start_marvin(self):
     '''
     Initialize the Marvin
     '''
     try:
         obj_marvininit = MarvinInit(config_file=self.__configFile,
                                     deploy_dc_flag=self.__deployFlag,
                                     zone=self.__zone,
                                     hypervisor_type=self.__hypervisorType,
                                     user_logfolder_path=None)
         if obj_marvininit and obj_marvininit.init() == SUCCESS:
             self.__testClient = obj_marvininit.getTestClient()
             self.__tcRunLogger = obj_marvininit.getLogger()
             self.__parsedConfig = obj_marvininit.getParsedConfig()
             self.__resultStream = obj_marvininit.getResultFile()
             self.__logFolderPath = obj_marvininit.getLogFolderPath()
             return SUCCESS
         return FAILED
     except Exception as e:
         print "====Exception Occurred under start_marvin: %s ====" % \
               GetDetailExceptionInfo(e)
         return FAILED
コード例 #6
0
ファイル: deployAndRun.py プロジェクト: unodba/cloudstack-1
 def start_marvin(self):
     '''
     Initialize the Marvin
     '''
     try:
         obj_marvininit = MarvinInit(config_file=self.__configFile,
                                     deploy_dc_flag=self.__deployFlag,
                                     zone=self.__zone,
                                     hypervisor_type=self.__hypervisorType,
                                     user_logfolder_path=None)
         if obj_marvininit and obj_marvininit.init() == SUCCESS:
             self.__testClient = obj_marvininit.getTestClient()
             self.__tcRunLogger = obj_marvininit.getLogger()
             self.__parsedConfig = obj_marvininit.getParsedConfig()
             self.__resultStream = obj_marvininit.getResultFile()
             self.__logFolderPath = obj_marvininit.getLogFolderPath()
             return SUCCESS
         return FAILED
     except Exception as e:
         print "====Exception Occurred under start_marvin: %s ====" % \
               GetDetailExceptionInfo(e)
         return FAILED