def getStats(self, viewObject=None, viewName='Flow Statistics', csvFile=None, csvEnableFileTimestamp=False, displayStats=True, silentMode=True, ignoreError=False): """ Description Get stats for any viewName. The method calls two different methods based on the IxNetwork version that you are using. For IxNetwork version prior to 8.50, calls getStatsPage. For IxNetwork version >= 8.50, calls getStatsData. This has new APIs that is more robust and they don't work in versions prior to 8.50. Parameters csvFile = None or . None will not create a CSV file. Provide a .csv to record all stats to a CSV file. Example: getStats(sessionUrl, csvFile='Flow_Statistics.csv') csvEnableFileTimestamp = True or False. If True, timestamp will be appended to the filename. displayStats: True or False. True=Display stats. ignoreError: True or False. Returns None if viewName is not found. viewObject: The view object: http://{apiServerIp:port}/api/v1/sessions/2/ixnetwork/statistics/view/13 A view object handle could be obtained by calling getViewObject(). viewName options (Not case sensitive): NOTE: Not all statistics are listed here. You could get the statistic viewName directly from the IxNetwork GUI in the statistics. """ buildNumber = float(self.ixnObj.getIxNetworkVersion()[:3]) if buildNumber >= 8.5: return self.getStatsData(viewObject=viewObject, viewName=viewName, csvFile=csvFile, csvEnableFileTimestamp=csvEnableFileTimestamp, displayStats=displayStats, silentMode=silentMode, ignoreError=ignoreError) else: return self.getStatsPage(viewObject=viewObject, viewName=viewName, csvFile=csvFile, csvEnableFileTimestamp=csvEnableFileTimestamp, displayStats=displayStats, silentMode=silentMode, ignoreError=ignoreError)