Kobi Ianko has posted comments on this change. Change subject: engine: show the errors from external scheduler in the event log ......................................................................
Patch Set 1: (2 comments) code is looking good :) added some super minor comments. Got another suggestion: what do you think of wrapping the old result in a dummy map instead of splitting some methods into two? http://gerrit.ovirt.org/#/c/24662/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java: Line 144: Line 145: private Object parseResponse(Object result) { Line 146: /* response format Line 147: { Line 148: "status_code": int, is it "status_code" or "result_code"? Line 149: "result": [list of UUIDS], Line 150: "plugin_errors": { "plugin_name": ["errormsgs"] }, Line 151: "errors": ["errormsgs"] Line 152: } Line 159: int status_code = (int)castedResult.get("result_code"); Line 160: Map<String, Object[]> plugin_errors = null; Line 161: Object[] errors = null; Line 162: Line 163: if (status_code != 0) { consider changing 0 to a constant with meaningful name like "STATUS_OK" Line 164: plugin_errors = (HashMap<String, Object[]>)castedResult.get("plugin_errors"); Line 165: errors = (Object[])castedResult.get("errors"); Line 166: Line 167: if (plugin_errors != null) { -- To view, visit http://gerrit.ovirt.org/24662 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd4dbe269d2885a6be04b82a3e2320c4f96c2387 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Jiří Moskovčák <jmosk...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com> Gerrit-Reviewer: Kobi Ianko <k...@redhat.com> Gerrit-Reviewer: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches