stc.perform("CaptureStop", captureProxyId=hCapture) # Save captured frames to a file. stc.perform("CaptureDataSave", captureProxyId=hCapture, FileName="capture.pcap", FileNameFormat="PCAP", IsScap="FALSE") print("Captured frames:\t", stc.get(hCapture, "PktCount")) # Unsubscribe from results print("Unsubscribe results ...") stc.unsubscribe(hAnaResults) stc.unsubscribe(hGenResults) # Release ports. print("Releasing ports ...") stc.release("{0}/{1}/{2} {3}/{4}/{5}".format(szChassisIp, iTxSlot, iTxPort, szChassisIp, iRxSlot, iRxPort)) # Disconnect from a chassis print("Disconnect from the chassis ...") stc.disconnect(szChassisIp) # Delete configuration print("Deleting project") stc.delete(hProject) stc.log("INFO", "Ending Test")
if ENABLE_CAPTURE: from time import gmtime, strftime print strftime("%Y-%m-%d %H:%M:%S", gmtime()), " Retrieving Captured frames..." stc.perform("CaptureStop", captureProxyId=hCapture) # Save captured frames to a file. stc.perform("CaptureDataSave", captureProxyId=hCapture, FileName="capture.pcap", FileNameFormat="PCAP", IsScap="FALSE") print "Captured frames:\t", stc.get(hCapture, "PktCount") # Unsubscribe from results print "Unsubscribe results ..." stc.unsubscribe(hAnaResults) stc.unsubscribe(hGenResults) # Release ports. print "Releasing ports ..." stc.release("%s/%s/%s %s/%s/%s" % (szChassisIp, iTxSlot, iTxPort, szChassisIp, iRxSlot, iRxPort)) # Disconnect from a chassis print "Disconnect from the chassis ..." stc.disconnect(szChassisIp) # Delete configuration print "Deleting project" stc.delete(hProject) stc.log("INFO", "Ending Test")
stc.perform("CaptureStop", captureProxyId=hCapture) # Save captured frames to a file. stc.perform("CaptureDataSave", captureProxyId=hCapture, FileName="capture.pcap", FileNameFormat="PCAP", IsScap="FALSE") print "Captured frames:\t", stc.get(hCapture, "PktCount") # Unsubscribe from results print "Unsubscribe results ..." stc.unsubscribe(hAnaResults) stc.unsubscribe(hGenResults) # Release ports. print "Releasing ports ..." stc.release("%s/%s/%s %s/%s/%s" % (szChassisIp, iTxSlot, iTxPort, szChassisIp, iRxSlot, iRxPort)) # Disconnect from a chassis print "Disconnect from the chassis ..." stc.disconnect(szChassisIp) # Delete configuration print "Deleting project" stc.delete(hProject) stc.log("INFO", "Ending Test")
if ENABLE_CAPTURE: from time import gmtime, strftime print(strftime("%Y-%m-%d %H:%M:%S", gmtime()), " Retrieving Captured frames...") stc.perform("CaptureStop", captureProxyId=hCapture) # Save captured frames to a file. stc.perform("CaptureDataSave", captureProxyId=hCapture, FileName="capture.pcap", FileNameFormat="PCAP", IsScap="FALSE") print("Captured frames:\t", stc.get(hCapture, "PktCount")) # Unsubscribe from results print("Unsubscribe results ...") stc.unsubscribe(hAnaResults) stc.unsubscribe(hGenResults) # Release ports. print("Releasing ports ...") stc.release("{0}/{1}/{2} {3}/{4}/{5}".format(szChassisIp, iTxSlot, iTxPort, szChassisIp, iRxSlot, iRxPort)) # Disconnect from a chassis print("Disconnect from the chassis ...") stc.disconnect(szChassisIp) # Delete configuration print("Deleting project") stc.delete(hProject) stc.log("INFO", "Ending Test")