wcbench icon indicating copy to clipboard operation
wcbench copied to clipboard

Add a Python API

Open dfarrell07 opened this issue 10 years ago • 5 comments

It would be very helpful to support kicking off simple actions via a well-define Python API. For example, starting and stopping ODL.

dfarrell07 avatar Oct 10 '14 05:10 dfarrell07

I would be interested in this. Do you have some kind of API in mind?

aglenis avatar Apr 16 '15 07:04 aglenis

I would be interested in this.

Wonderful! :+1:

Do you have some kind of API in mind?

Here are some initial thoughts.

  • install_odl [verbose]
  • install_cbench [verbose]
  • start_odl [odl_processors] [verbose]
  • run_cbench [run length in minutes] [verbose]
  • stop_odl [verbose]
  • clean_up [verbose]

dfarrell07 avatar Apr 16 '15 16:04 dfarrell07

Here are some initial thoughts.

Did those make sense @aglenis? Any other info/help/whatever I can provide?

Thanks!

dfarrell07 avatar Apr 20 '15 07:04 dfarrell07

Makes sense to me. How exactly should be start implementing it? My initial though is to wrap every wcbench function with something like this:

http://stackoverflow.com/questions/5826427/can-a-python-script-execute-a-function-inside-a-bash-script

aglenis avatar Apr 20 '15 12:04 aglenis

My initial though is to wrap every wcbench function with something like this:

Yeah, that seems reasonable. Only complication may be moving some of the global state in WCBench to params to function calls.

dfarrell07 avatar Apr 27 '15 20:04 dfarrell07