Coder Social home page Coder Social logo

openixia / bps_restpy Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 2.0 112 KB

This repository contains the python library and samples for controlling the REST API of BreakingPoint and BreakingPoint Virtual Edition tools

Home Page: https://www.ixiacom.com/products/breakingpoint

License: MIT License

Python 100.00%
breakingpoint network-test network-security strikes malware network-traffic-generator bps ddos-simulation bps-rest-api network-analysis

bps_restpy's People

Contributors

ajbalogh avatar hubertgee avatar nutu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mkim2001 skayres

bps_restpy's Issues

stopRun method doesn’t work in separate sessions

testmodel.stopRun method hangs when run in a different bps_restpy session than the testmodel.run. The test does stop but the python API just hangs infinitely. This is pretty useful when you are automating long running tests to split the start and stop between multiple scripts.

from bps_restpy.bps import BPS

bps = BPS(host, user, password)

bps.login()

Successfully connected to x.x.x.x.

Login successful.

Welcome user.

Your session id is 5d180626-49ac-4cf3-b694-1b5b4b229fe2

bps.testmodel.run(modelname='test', group=10)

Out[6]: {'host': '127.0.0.1', 'name': 'test', 'iteration': 30, 'runid': 96}

bps.testmodel.stopRun(96)

Out[7]: b'canceled'

bps.testmodel.run(modelname='test', group=10)

Out[8]: {'host': '127.0.0.1', 'name': 'test', 'iteration': 31, 'runid': 97}

bps.logout()

Logout successful.

Bye user.

Successfully disconnected from x.x.x.x.

bps.login()

Successfully connected to x.x.x.x.

Login successful.

Welcome user.

Your session id is aee3511f-dbed-4de5-a4f1-c9f7179f920d

bps.testmodel.stopRun(97)

The last stopRun call just hangs infinitely. Above when the stopRun was done in the same session it completed with a response of b’canceled’.

Unable to create new test template

Hello,
I am below sequence of APIs to create a new test template. But I am getting 404 error.

print("logging into BPS")
bps = BPS(bps_system, bpsuser, bpspass)
bps.login()

print("Creating new test")
bps.testmodel.new("Test1") --> not working

Below is the error message that, I am getting:
"Exception: {'status_code': 400, 'content': 'ErrorException: Invalid test name "Test1".. Execute: help(.testmodel.new) for more information about the method.'}"

I am able to perform this action on existing test templates.
Ex: bps.testmodel.new("AppSim") --> is working

Kindly help me if I am missing something.

could this project be used in cyber range?

I want to use BreakingPoint VE to simulate attack traffic in cyber range, cloud I use this api to could control the BreakingPoint VE? something like trigger traffic. thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.