python-esppy
python-esppy copied to clipboard
How to "PUT" an EventGenerator created by EventGenerator.from_xml to the ESP Engine?
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