Alon Bar-Lev has posted comments on this change. Change subject: extensions test tool: logger ......................................................................
Patch Set 6: (3 comments) https://gerrit.ovirt.org/#/c/37886/6/backend/manager/extension-tool/src/main/java/org/ovirt/engine/exttool/core/ExtensionsToolExecutor.java File backend/manager/extension-tool/src/main/java/org/ovirt/engine/exttool/core/ExtensionsToolExecutor.java: Line 43: String module = others.remove(0); Line 44: ModuleService moduleService = moduleServices.get(module); Line 45: if (moduleService == null) { Line 46: throw new IllegalArgumentException( Line 47: String.format("No such '%1$s' module exists. To list existing modules use --help argument.", module) "No such module exists" is sufficient error to be displayed in logs and such. Line 48: ); Line 49: } Line 50: if(moduleService.parseArguments(others)) { Line 51: System.out.println(module + " help"); // TODO: help printer https://gerrit.ovirt.org/#/c/37886/6/backend/manager/extension-tool/src/main/java/org/ovirt/engine/exttool/logger/services/LoggerServiceImpl.java File backend/manager/extension-tool/src/main/java/org/ovirt/engine/exttool/logger/services/LoggerServiceImpl.java: Line 33: public void run() { Line 34: logrecord(); Line 35: } Line 36: } Line 37: ); > Because the solution would be I can access astatic inner class from static then use global context: it can be in class context, no? private Map<String, Runnable> actions = new HashMap<>(); { actions.put(); } Line 38: } Line 39: Line 40: @Override Line 41: public String getName() { https://gerrit.ovirt.org/#/c/37886/6/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 23: private Map<String, ParserArgument> arguments; Line 24: private Set<String> mandatory; Line 25: private List<String> defaults; Line 26: Line 27: public ParametersParser(Properties properties, Properties defaultPropeties) { > The name of the argument is missing so put: arg.__any__.mandatory and use same parsing method, seek for argname and fallback to __any__ Line 28: this.arguments = new HashMap<>(); Line 29: this.mandatory = new HashSet<>(); Line 30: this.defaults = new ArrayList<>(); Line 31: parseProperties(properties, defaultPropeties); -- 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: 6 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: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches