Moti Asayag has posted comments on this change. Change subject: engine: Retrieve errata from satellite/katello ......................................................................
Patch Set 4: (2 comments) http://gerrit.ovirt.org/#/c/37434/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java: Line 331: Line 332: return latestRegisteredHost; Line 333: } Line 334: Line 335: private List<ContentHost> runContentHostListMethod(String relativeUrl) { > This is used only once in the code, do we really need it? why not have its this method can be inlined, but you don't extract into method only for re-usability, you also does it to maintain small methods with a single responsibility. Line 336: try { Line 337: ContentHostsWrapper wrapper = Line 338: objectMapper.readValue(runHttpGetMethod(relativeUrl), ContentHostsWrapper.class); Line 339: return Arrays.asList(wrapper.getResults()); Line 381: if (contentHost == null) { Line 382: return Collections.emptyList(); Line 383: } Line 384: Line 385: return runErrataListMethod(String.format(CONTENT_HOST_ERRATA_ENTRY_POINT, contentHost.getId())); > and on the other hand you have here and in the next method some code duplic i don't see any duplication. The first method attempt to fetch a list of erratum (errata) and the second method tries to fetch a single erratum. Line 386: } Line 387: Line 388: @Override Line 389: public Erratum getErratumForHost(VdsStatic host, String erratumId) { -- To view, visit http://gerrit.ovirt.org/37434 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0d2b79d731dcd605aa567e544d09b56090174756 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.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