예제 #1
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
예제 #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
    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
예제 #4
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
예제 #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