def StopTrafficByTrafficItemNamePy(tiList=None): # Stop traffic by the Traffic Item name. # Usage: tiList = A list of Traffic Item names to stop. # Requires APIs: StopTrafficPy and VerifyTrafficStatePy if tiList: for item in ixNet.getList(ixNet.getRoot()+'traffic', 'trafficItem'): currentTrafficItemName = ixNet.getAttribute(item, '-name') if currentTrafficItemName in tiList: print '\nStopTraffic:', currentTrafficItemName ixNet.execute('stopStatelessTraffic', item)