def parse_result(mcoll_reply, app=nil, command=nil)
mcoll_result = mcoll_reply[0]
output = nil
if (mcoll_result && (defined? mcoll_result.results) && !mcoll_result.results[:data].nil?)
output = mcoll_result.results[:data][:output]
exitcode = mcoll_result.results[:data][:exitcode]
else
server_identity = app ? MCollectiveApplicationContainerProxy.find_app(app.uuid, app.name) : nil
if server_identity && @id != server_identity
raise OpenShift::InvalidNodeException.new("Node execution failure (invalid node). If the problem persists please contact Red Hat support.", 143, nil, server_identity)
else
raise OpenShift::NodeException.new("Node execution failure (error getting result from node). If the problem persists please contact Red Hat support.", 143)
end
end
result = MCollectiveApplicationContainerProxy.sanitize_result(output)
result.exitcode = exitcode
result
end