def run(self): try: self.ExitStatus = 0 WE.setPortInfo({}) WE.setPortBSSID2SSID({}) WE.OpenLogging(Path = self.LoggingDirectory, Detailed = self.DetailedFilename) self.setRealtimeCallback(self.PrintRealtimeStats) RoamBenchmarkEventClass.clearStats() self.ConfigureData() self.totalRoamClients = self.getTotalRoamClients() self.generateClientConfig() self.validateInitialConfig() self.configurePorts() self.initailizeCSVfile() #Create and connect Eth Clients clientTuples = self.createNonRoamClientTuple(self.nonRoamGroups) (self.nonRoamClientGroups, clientList) = self.createNonRoamClients(clientTuples) self.connectNonRoamClients(clientList) #Create and Connect Roam Clients allClientsDict = self.createAndConnectRoamClients(False) self.writeAPinformation(allClientsDict) roamFlowObjects = self.configureFlows() self.createFlows(roamFlowObjects) self._configureClientObjectsFlows(self.FlowList) if self.createFlowGroups() == -1: raise WE.RaiseException self.setNATflag() self.doAllArpExchanges() self.checkRoamOppurtunities() WE.ClearAllCounter(self.CardList) self.startFlows() if self.splitRunF == False: self.Generateclients() self.validateRoamConfig() self.startTest(self.RealtimeCallback) else: self.startSplitTest() self.stopFlows() lastRoamDetails = self.collectLastRoamDetails() self.processStats(lastRoamDetails) self.SaveResults() if self.generatePdfReportF: self.PrintReport() #self.SaveResults() #Update the csv results, pdf charts (if opted by the user) in the GUI #'Results' page self.ExitStatus=self.FinalResult self.updateGUIresultsPage() except WE.RaiseException: self.Print("WaveEngine terminating the run\n", 'ERR') (exc_type, exc_value, exc_traceback) = sys.exc_info() self.Print(str(exc_value), 'ERR') self.ExitStatus = 2 self.SaveResults() except Exception, e: # some other error occured (exc_type, exc_value, exc_tb) = sys.exc_info() try: msg = "Fatal script error:\n" for text in traceback.format_exception(exc_type, exc_value, exc_tb): msg += str(text) self.Print(str(msg), 'ERR') except Exception, e: print "ERROR:\n%s\n%s\n" % (str(msg), str(e))
def getClientData(self): return RoamBenchmarkEventClass.getClientStats()
def getLastRoamDetails(self, clientName): return RoamBenchmarkEventClass.getLastRoamDetails(clientName)
def getRoamedClientList(self): return RoamBenchmarkEventClass.getRoamedClientList()