Alon Bar-Lev has posted comments on this change. Change subject: extensions test tool: logger ......................................................................
Patch Set 13: (1 comment) https://gerrit.ovirt.org/#/c/37886/13/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/cli/parser/ParametersParser.java File backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/cli/parser/ParametersParser.java: Line 50: } Line 51: Line 52: public Map<String, Object> parse(String[] args, boolean isModule) throws Exception { Line 53: return parse(new ArrayList<String>(Arrays.asList(args)), isModule); Line 54: } > OK then. yes, looks ok notice that action may be null if begins with -- and you parse anyway and get --help :) if you want to be extremly pedantic you parse 3 times :) first: --arg1 --arg2 others: module action --arg3 --arg4 second others: action --arg3 --arg4 third --arg3 --arg4 this enables you to: --arg1 --arg2 module --arg3 action --arg4 --arg5 but as modules receives the others of first parsing, it can choose how to do this, including optimize as you suggested. only edge is: module --help Line 55: Line 56: public Map<String, Object> parse(List<String> args, boolean isModule) throws Exception { Line 57: String usage = "core"; Line 58: List<Object> others = new ArrayList<>(); -- To view, visit https://gerrit.ovirt.org/37886 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie06113c5d56a49e58d557c851f9ff00b9a9ca409 Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ondřej Macháček <machacek.on...@gmail.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Ondra Machacek <omach...@redhat.com> Gerrit-Reviewer: Ondřej Macháček <machacek.on...@gmail.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: mooli tayer <mta...@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