def showTrafficItems(self): """ Description Show All Traffic Item details. """ queryData = {'from': '/traffic', 'nodes': [{'node': 'trafficItem', 'properties': ['name', 'enabled', 'state', 'biDirectional', 'trafficType', 'warning', 'errors'], 'where': []}, {'node': 'endpointSet', 'properties': ['name', 'sources', 'destinations'], 'where': []}, {'node': 'configElement', 'properties': ['name', 'endpointSetId', ], 'where': []}, {'node': 'frameSize', 'properties': ['type', 'fixedSize'], 'where': []}, {'node': 'framePayload', 'properties': ['type', 'customRepeat'], 'where': []}, {'node': 'frameRate', 'properties': ['type', 'rate'], 'where': []}, {'node': 'frameRateDistribution', 'properties': ['streamDistribution', 'portDistribution'], 'where': []}, {'node': 'transmissionControl', 'properties': ['type', 'frameCount', 'burstPacketCount'], 'where': []}, {'node': 'tracking', 'properties': ['trackBy'], 'where': []}, ] } queryResponse = self.ixnObj.query(data=queryData, silentMode=True) self.ixnObj.logInfo('\n', end='', timestamp=False) for ti in queryResponse.json()['result'][0]['trafficItem']: self.ixnObj.logInfo('TrafficItem: {0}\n\tName: {1} Enabled: {2} State: {3}'.format( ti['id'], ti['name'], ti['enabled'], ti['state']), timestamp=False) self.ixnObj.logInfo('\tTrafficType: {0} BiDirectional: {1}'.format(ti['trafficType'], ti['biDirectional']), timestamp=False) for tracking in ti['tracking']: self.ixnObj.logInfo('\tTrackings: {0}'.format(tracking['trackBy']), timestamp=False) for endpointSet, cElement in zip(ti['endpointSet'], ti['configElement']): self.ixnObj.logInfo('\tEndpointSetId: {0} EndpointSetName: {1}'.format(endpointSet['id'], endpointSet['name']), timestamp=False) srcList = [] for src in endpointSet['sources']: srcList.append(src.split('/ixnetwork')[1]) dstList = [] for dest in endpointSet['destinations']: dstList.append(dest.split('/ixnetwork')[1]) self.ixnObj.logInfo('\t Sources: {0}'.format(srcList), timestamp=False) self.ixnObj.logInfo('\t Destinations: {0}'.format(dstList), timestamp=False) self.ixnObj.logInfo('\t FrameType: {0} FrameSize: {1}'.format(cElement['frameSize']['type'], cElement['frameSize']['fixedSize']), timestamp=False) self.ixnObj.logInfo('\t TranmissionType: {0} FrameCount: {1} BurstPacketCount: {2}'.format( cElement['transmissionControl']['type'], cElement['transmissionControl']['frameCount'], cElement['transmissionControl']['burstPacketCount']), timestamp=False) self.ixnObj.logInfo('\t FrameRateType: {0} FrameRate: {1}'.format( cElement['frameRate']['type'], cElement['frameRate']['rate']), timestamp=False) self.ixnObj.logInfo('\n', end='', timestamp=False)