Package: bps-restpy
The BreakingPoint RESTv2 API Python WrapperBreakingPoint detailNetwork testing withBreakingPointÂ®. By simulating real-world legitimate traffic, distributed denial of service (DDoS), exploits, malware, and fuzzing, BreakingPoint validates an organizationâ€™s security infrastructure, reduces the risk of network degradation by almost 80%, and increases attack readiness by nearly 70%. And with our new TrafficREWIND solution, you'll get even more realistic and high-fidelity validation by adding production network insight into BreakingPoint test traffic configuration
More details:Install the packagepip install --upgrade bps-restpyStart scripting"""This script demonstrates how to get started with bps_restpy scripting.# Title:  Python Script Sample To Run a Canned Test.# Actions:#   1. Login to BPS box#   2. Reserve ports#   3. Load a test from the box and start the run#   4. Wait for the test to finish#   5. Get test result#   6. Get and print the Synopsis page from report#   7. Unreserve ports#   8. Logout#================########################################import time, sys, os# Import corresponding BPS RESTv2 python2.7/ 3 library from outside the folder with samples.sys.path.insert(1, os.path.dirname(os.getcwd()))from bps_restpy.bps import BPS, pp################################################################################# Demo script global variables######################################### Demo script global variablescanned_test_name = 'AppSim'#bps system infobps_system  = '<BPS_BOX_IP/HOSTNAME>'bpsuser     = 'bps user'bpspass     = 'bps pass'slot_number = 2port_list   = [0, 1]################################################################################# Login to BPS boxbps = BPS(bps_system, bpsuser, bpspass)bps.login()########################################print("Load a canned test: ")bps.testmodel.load(canned_test_name)########################################print("Reserve Ports")for p in port_list:bps.topology.reserve([{'slot': slot_number, 'port': p, 'group': 2}])########################################print("Run test and Get Stats:")test_id_json = bps.testmodel.run(modelname=canned_test_name, group=2)testid = str( test_id_json["runid"] )run_id = 'TEST-' + testidprint("Test Run Id:%s"%run_id)#get the ids for all tests running on the chassisrunningTests_Ids = [test['id'] for  test in bps.topology.runningTest.get()]#wait while the test is still runningwhile run_id in runningTests_Ids:run_state =  bps.topology.runningTest[run_id].get()#print progress if test startedtry: print ('progress:%s%%, runtime%ss' % (run_state['progress'], run_state['runtime'] ))except: print ("Starting...")time.sleep(2)#update the current running testsrunningTests_Ids = [test['id'] for  test in bps.topology.runningTest.get()]print("~The test finished the execution.")results = bps.reports.search(searchString=canned_test_name, limit=10, sort="endTime", sortorder="descending")result  = results[0]print ("%sexecution duration%sended with status:%s" % (result['name'], result['duration'], result['result']) )#getting 3.4 Section: Synopsys Summary of Results from the Reporttabledata = bps.reports.getReportTable(runid=testid, sectionId="3.4")pp(tabledata)print ("Unreserving the ports")for p in port_list:bps.topology.unreserve([{'slot': slot_number, 'port': p, 'group': 2}])bps.logout()wewDocumentationDocumentationÂ is available using the following methods:Online web based documentation and samplesOn your BreakingPoint System RestApi found near the BreakingPoint AppDocumentation available in the online doc browser is also inlined in each class, property and method and can be viewed using the python help commandfrombps_restpy.bpsimportBPS,pp#login to your Breaking Point Systemhelp(BPS)bps=BPS('your_bps_IP_or_FQDN','admin','admin')help(bps.testmodel.importModel)Additional SamplesVisit theOpenIxiaÂ breakingpoint-restpyÂ sample site maintained by solution architectsforÂ inÂ depthÂ end-to-endÂ samplesÂ thatÂ demonstrateÂ theÂ following:buildingÂ aÂ configurationfromÂ scratchfromÂ anÂ existingÂ BreakingPointÂ configurationrunningÂ theÂ configurationconnectingÂ portsÂ toÂ hardwarestartingÂ protocolsstartingÂ trafficgettingÂ statisticsportÂ statstrafficÂ stats