python-esppy icon indicating copy to clipboard operation
python-esppy copied to clipboard

How to "PUT" an EventGenerator created by EventGenerator.from_xml to the ESP Engine?

Open sas-rocks opened this issue 5 years ago • 0 comments

Hi, I created an EventGenerator using the method "from_xml". Before I can use the method "start", it needs to be available within the ESP engine. Searching through the methods of "ESP" and "EventGenerator" class I found no way to do a "PUT" to get it uploaded. Is that method missing or did I oversee something? I properly assigned the session from ESP class on creation like this:

esp = esppy.ESP(hostname=args.host, port=args.http, protocol=protocol, ca_bundle=args.ca) project = esp.load_project(model, start=False, start_connectors=False) esp.start_project(project.name) eventgenerator = esppy.evtgen.EventGenerator.from_xml(evgen, esp.session) ... eventgenerator.start(args.events, args.blocksize, args.rate, args.pause)

I could use "requests.put", but I'd prefer a method provided by ESPPY.

Thanks, Thomas

sas-rocks avatar Jan 31 '20 14:01 sas-rocks