Omer Frenkel has posted comments on this change. Change subject: core: DI for AuditLoggerDirector ......................................................................
Patch Set 8: (4 comments) https://gerrit.ovirt.org/#/c/33901/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java: Line 44: Line 45: private static final Logger log = LoggerFactory.getLogger(InitBackendServicesOnStartupBean.class); Line 46: Line 47: @Inject Line 48: private PmHealthCheckManager pmHealthCheckManager; is this related to this patch? Line 49: Line 50: /** Line 51: * This method is called upon the bean creation as part Line 52: * of the management Service bean life cycle. https://gerrit.ovirt.org/#/c/33901/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java: Line 88: private boolean monitoringNeeded; Line 89: private List<Pair<VM, VmInternalData>> lastVmsList = Collections.emptyList(); Line 90: Line 91: public VdsManager(VDS vds, AuditLogDirector auditLogDirector) { Line 92: this.auditLogDirector = auditLogDirector; why not just inject it here as well? Line 93: log.info("Entered VdsManager constructor"); Line 94: cachedVds = vds; Line 95: vdsId = vds.getId(); Line 96: monitoringStrategy = MonitoringStrategyFactory.getMonitoringStrategyForVds(vds); https://gerrit.ovirt.org/#/c/33901/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmAnalyzer.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmAnalyzer.java: Line 91: } Line 92: UNCHANGEABLE_FIELDS_BY_VDSM = Collections.unmodifiableList(tmpList); Line 93: } Line 94: Line 95: private final AuditLogDirector auditLogDirector; and here Line 96: Line 97: // FIXME auditlogger is a dependency and realy doesn't belong in the constructor but Line 98: // there is no way to mock it otherwise. Line 99: public VmAnalyzer(VM dbVm, VmInternalData vdsmVm, VmsMonitoring vmsMonitoring, AuditLogDirector auditLogDirector) { https://gerrit.ovirt.org/#/c/33901/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java: Line 65: /** Line 66: * A collection of VMs that has changes in devices. Line 67: */ Line 68: private List<Pair<VM, VmInternalData>> vmsWithChangedDevices; Line 69: private final AuditLogDirector auditLogDirector; and here..? Line 70: /** Line 71: * The managers of the monitored VMs in this cycle. Line 72: */ Line 73: private Map<Guid, VmManager> vmManagers = new HashMap<>(); -- To view, visit https://gerrit.ovirt.org/33901 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifab56339a634234bbc51fa09719fb87b5cc69501 Gerrit-PatchSet: 8 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.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