Commit 00311ecd authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

gtools: Make eventd send beparams and result

Update 'snf-ganeti-eventd' daemon to send the requested beparams in
case of 'OP_INSTANCE_SET_PARAMS' opcodes. Also, if the opcode is
in success state, send the 'result' attribute of Ganeti jobs.

Refs #3870
parent 0e0f08cb
......@@ -244,6 +244,9 @@ class JobFileHandler(pyinotify.ProcessEvent):
"logmsg": logmsg,
"jobId": job_id})
if op.status == "success":
msg["result"] = op.result
if op_id in ["OP_INSTANCE_CREATE", "OP_INSTANCE_SET_PARAMS",
"OP_INSTANCE_STARTUP"]:
if op.status == "success":
......@@ -284,6 +287,11 @@ class JobFileHandler(pyinotify.ProcessEvent):
"instance": instances,
"operation": op_id}
if op_id == "OP_INSTANCE_SET_PARAMS":
beparams = get_field(input, "beparams")
if beparams:
msg["beparams"] = beparams
routekey = "ganeti.%s.event.op" % prefix_from_name(instances)
return msg, routekey
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment